toku-ui 4.4.0 → 4.5.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/TCardButton/TCardButton.stories.d.ts +16 -0
- package/dist/components/TCardButton/TCardButton.stories.d.ts.map +1 -0
- package/dist/components/TCardButton/TCardButton.vue.d.ts +58 -0
- package/dist/components/TCardButton/TCardButton.vue.d.ts.map +1 -0
- package/dist/components/TCardButton/index.d.ts +3 -0
- package/dist/components/TCardButton/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.es.js +466 -422
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -910,155 +910,155 @@ function At(e) {
|
|
|
910
910
|
function jt(e, t, n) {
|
|
911
911
|
return kt("#" + At(e) + At(t) + At(n));
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function U(e, t, n) {
|
|
914
914
|
return z(e, t, n, jt);
|
|
915
915
|
}
|
|
916
|
-
function
|
|
917
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return
|
|
918
|
-
if (typeof e == "object" && t === void 0 && n === void 0) return
|
|
916
|
+
function Mt(e, t, n) {
|
|
917
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return U(e, t, n);
|
|
918
|
+
if (typeof e == "object" && t === void 0 && n === void 0) return U(e.hue, e.saturation, e.lightness);
|
|
919
919
|
throw new R(1);
|
|
920
920
|
}
|
|
921
|
-
function
|
|
922
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ?
|
|
923
|
-
if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ?
|
|
921
|
+
function Nt(e, t, n, r) {
|
|
922
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ? U(e, t, n) : "rgba(" + z(e, t, n) + "," + r + ")";
|
|
923
|
+
if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ? U(e.hue, e.saturation, e.lightness) : "rgba(" + z(e.hue, e.saturation, e.lightness) + "," + e.alpha + ")";
|
|
924
924
|
throw new R(2);
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function Pt(e, t, n) {
|
|
927
927
|
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return kt("#" + H(e) + H(t) + H(n));
|
|
928
928
|
if (typeof e == "object" && t === void 0 && n === void 0) return kt("#" + H(e.red) + H(e.green) + H(e.blue));
|
|
929
929
|
throw new R(6);
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function W(e, t, n, r) {
|
|
932
932
|
if (typeof e == "string" && typeof t == "number") {
|
|
933
933
|
var i = B(e);
|
|
934
934
|
return "rgba(" + i.red + "," + i.green + "," + i.blue + "," + t + ")";
|
|
935
|
-
} else if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ?
|
|
936
|
-
else if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ?
|
|
935
|
+
} else if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ? Pt(e, t, n) : "rgba(" + e + "," + t + "," + n + "," + r + ")";
|
|
936
|
+
else if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ? Pt(e.red, e.green, e.blue) : "rgba(" + e.red + "," + e.green + "," + e.blue + "," + e.alpha + ")";
|
|
937
937
|
throw new R(7);
|
|
938
938
|
}
|
|
939
|
-
var
|
|
939
|
+
var Ft = function(e) {
|
|
940
940
|
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && (typeof e.alpha != "number" || e.alpha === void 0);
|
|
941
|
-
},
|
|
941
|
+
}, It = function(e) {
|
|
942
942
|
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && typeof e.alpha == "number";
|
|
943
|
-
},
|
|
943
|
+
}, Lt = function(e) {
|
|
944
944
|
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && (typeof e.alpha != "number" || e.alpha === void 0);
|
|
945
|
-
},
|
|
945
|
+
}, Rt = function(e) {
|
|
946
946
|
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && typeof e.alpha == "number";
|
|
947
947
|
};
|
|
948
|
-
function
|
|
948
|
+
function G(e) {
|
|
949
949
|
if (typeof e != "object") throw new R(8);
|
|
950
|
-
if (
|
|
951
|
-
if (
|
|
952
|
-
if (zt(e)) return Pt(e);
|
|
950
|
+
if (It(e)) return W(e);
|
|
951
|
+
if (Ft(e)) return Pt(e);
|
|
953
952
|
if (Rt(e)) return Nt(e);
|
|
953
|
+
if (Lt(e)) return Mt(e);
|
|
954
954
|
throw new R(8);
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function zt(e, t, n) {
|
|
957
957
|
return function() {
|
|
958
958
|
var r = n.concat(Array.prototype.slice.call(arguments));
|
|
959
|
-
return r.length >= t ? e.apply(this, r) :
|
|
959
|
+
return r.length >= t ? e.apply(this, r) : zt(e, t, r);
|
|
960
960
|
};
|
|
961
961
|
}
|
|
962
|
-
function
|
|
963
|
-
return
|
|
962
|
+
function K(e) {
|
|
963
|
+
return zt(e, e.length, []);
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function Bt(e, t) {
|
|
966
966
|
if (t === "transparent") return t;
|
|
967
967
|
var n = V(t);
|
|
968
|
-
return
|
|
968
|
+
return G(I({}, n, { hue: n.hue + parseFloat(e) }));
|
|
969
969
|
}
|
|
970
|
-
|
|
971
|
-
function
|
|
970
|
+
K(Bt);
|
|
971
|
+
function q(e, t, n) {
|
|
972
972
|
return Math.max(e, Math.min(t, n));
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function Vt(e, t) {
|
|
975
975
|
if (t === "transparent") return t;
|
|
976
976
|
var n = V(t);
|
|
977
|
-
return
|
|
977
|
+
return G(I({}, n, { lightness: q(0, 1, n.lightness - parseFloat(e)) }));
|
|
978
978
|
}
|
|
979
|
-
var
|
|
980
|
-
function
|
|
979
|
+
var J = K(Vt);
|
|
980
|
+
function Ht(e, t) {
|
|
981
981
|
if (t === "transparent") return t;
|
|
982
982
|
var n = V(t);
|
|
983
|
-
return
|
|
983
|
+
return G(I({}, n, { saturation: q(0, 1, n.saturation - parseFloat(e)) }));
|
|
984
984
|
}
|
|
985
|
-
|
|
986
|
-
function
|
|
985
|
+
K(Ht);
|
|
986
|
+
function Ut(e, t) {
|
|
987
987
|
if (t === "transparent") return t;
|
|
988
988
|
var n = V(t);
|
|
989
|
-
return
|
|
989
|
+
return G(I({}, n, { lightness: q(0, 1, n.lightness + parseFloat(e)) }));
|
|
990
990
|
}
|
|
991
|
-
var
|
|
992
|
-
function
|
|
991
|
+
var Y = K(Ut);
|
|
992
|
+
function Wt(e, t, n) {
|
|
993
993
|
if (t === "transparent") return n;
|
|
994
994
|
if (n === "transparent") return t;
|
|
995
995
|
if (e === 0) return n;
|
|
996
996
|
var r = B(t), i = I({}, r, { alpha: typeof r.alpha == "number" ? r.alpha : 1 }), a = B(n), o = I({}, 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;
|
|
997
|
-
return
|
|
997
|
+
return W({
|
|
998
998
|
red: Math.floor(i.red * l + o.red * u),
|
|
999
999
|
green: Math.floor(i.green * l + o.green * u),
|
|
1000
1000
|
blue: Math.floor(i.blue * l + o.blue * u),
|
|
1001
1001
|
alpha: i.alpha * parseFloat(e) + o.alpha * (1 - parseFloat(e))
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
|
-
var
|
|
1005
|
-
function
|
|
1004
|
+
var Gt = K(Wt);
|
|
1005
|
+
function Kt(e, t) {
|
|
1006
1006
|
if (t === "transparent") return t;
|
|
1007
1007
|
var n = B(t);
|
|
1008
|
-
return
|
|
1008
|
+
return W(I({}, n, { alpha: q(0, 1, ((typeof n.alpha == "number" ? n.alpha : 1) * 100 + parseFloat(e) * 100) / 100) }));
|
|
1009
1009
|
}
|
|
1010
|
-
|
|
1011
|
-
function
|
|
1010
|
+
K(Kt);
|
|
1011
|
+
function qt(e, t) {
|
|
1012
1012
|
if (t === "transparent") return t;
|
|
1013
1013
|
var n = V(t);
|
|
1014
|
-
return
|
|
1014
|
+
return G(I({}, n, { saturation: q(0, 1, n.saturation + parseFloat(e)) }));
|
|
1015
1015
|
}
|
|
1016
|
-
|
|
1016
|
+
K(qt);
|
|
1017
|
+
function Jt(e, t) {
|
|
1018
|
+
return t === "transparent" ? t : G(I({}, V(t), { hue: parseFloat(e) }));
|
|
1019
|
+
}
|
|
1020
|
+
K(Jt);
|
|
1017
1021
|
function Yt(e, t) {
|
|
1018
|
-
return t === "transparent" ? t :
|
|
1022
|
+
return t === "transparent" ? t : G(I({}, V(t), { lightness: parseFloat(e) }));
|
|
1019
1023
|
}
|
|
1020
|
-
|
|
1024
|
+
K(Yt);
|
|
1021
1025
|
function Xt(e, t) {
|
|
1022
|
-
return t === "transparent" ? t :
|
|
1026
|
+
return t === "transparent" ? t : G(I({}, V(t), { saturation: parseFloat(e) }));
|
|
1023
1027
|
}
|
|
1024
|
-
|
|
1028
|
+
K(Xt);
|
|
1025
1029
|
function Zt(e, t) {
|
|
1026
|
-
return t === "transparent" ? t :
|
|
1030
|
+
return t === "transparent" ? t : Gt(parseFloat(e), "rgb(0, 0, 0)", t);
|
|
1027
1031
|
}
|
|
1028
|
-
|
|
1032
|
+
K(Zt);
|
|
1029
1033
|
function Qt(e, t) {
|
|
1030
|
-
return t === "transparent" ? t :
|
|
1034
|
+
return t === "transparent" ? t : Gt(parseFloat(e), "rgb(255, 255, 255)", t);
|
|
1031
1035
|
}
|
|
1032
|
-
|
|
1036
|
+
K(Qt);
|
|
1033
1037
|
function $t(e, t) {
|
|
1034
|
-
return t === "transparent" ? t : Kt(parseFloat(e), "rgb(255, 255, 255)", t);
|
|
1035
|
-
}
|
|
1036
|
-
G($t);
|
|
1037
|
-
function en(e, t) {
|
|
1038
1038
|
if (t === "transparent") return t;
|
|
1039
1039
|
var n = B(t);
|
|
1040
|
-
return
|
|
1040
|
+
return W(I({}, n, { alpha: q(0, 1, ((typeof n.alpha == "number" ? n.alpha : 1) * 100 - parseFloat(e) * 100).toFixed(2) / 100) }));
|
|
1041
1041
|
}
|
|
1042
|
-
var
|
|
1042
|
+
var en = K($t);
|
|
1043
1043
|
//#endregion
|
|
1044
1044
|
//#region src/theme/utils.ts
|
|
1045
|
-
function
|
|
1045
|
+
function tn(e) {
|
|
1046
1046
|
return {
|
|
1047
|
-
1:
|
|
1048
|
-
2:
|
|
1049
|
-
3:
|
|
1050
|
-
4:
|
|
1051
|
-
5:
|
|
1052
|
-
6:
|
|
1053
|
-
7:
|
|
1054
|
-
8:
|
|
1047
|
+
1: Y(.35, e),
|
|
1048
|
+
2: Y(.3, e),
|
|
1049
|
+
3: Y(.25, e),
|
|
1050
|
+
4: Y(.2, e),
|
|
1051
|
+
5: Y(.15, e),
|
|
1052
|
+
6: Y(.12, e),
|
|
1053
|
+
7: Y(.08, e),
|
|
1054
|
+
8: Y(.04, e),
|
|
1055
1055
|
9: e,
|
|
1056
|
-
10:
|
|
1057
|
-
11:
|
|
1058
|
-
12:
|
|
1056
|
+
10: J(.08, e),
|
|
1057
|
+
11: J(.1, e),
|
|
1058
|
+
12: J(.15, e)
|
|
1059
1059
|
};
|
|
1060
1060
|
}
|
|
1061
|
-
var
|
|
1061
|
+
var nn = [
|
|
1062
1062
|
.03,
|
|
1063
1063
|
.05,
|
|
1064
1064
|
.1,
|
|
@@ -1072,22 +1072,22 @@ var rn = [
|
|
|
1072
1072
|
.8,
|
|
1073
1073
|
.9
|
|
1074
1074
|
];
|
|
1075
|
-
function
|
|
1075
|
+
function rn(e = {}) {
|
|
1076
1076
|
let t = F({}, se, e), n = e.colors?.brand?.base ?? e.colors?.primary?.main, r;
|
|
1077
1077
|
if (n) {
|
|
1078
|
-
let e =
|
|
1078
|
+
let e = tn(n);
|
|
1079
1079
|
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[7], 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 = {};
|
|
1080
1080
|
for (let [t, n] of Object.entries(e)) r[`--color-brand-${t}`] = n;
|
|
1081
|
-
for (let e = 1; e <= 12; e++) r[`--color-brand-a-${e}`] =
|
|
1081
|
+
for (let e = 1; e <= 12; e++) r[`--color-brand-a-${e}`] = en(1 - nn[e - 1], n);
|
|
1082
1082
|
}
|
|
1083
1083
|
return Object.assign(t, { cssVars: r });
|
|
1084
1084
|
}
|
|
1085
1085
|
//#endregion
|
|
1086
1086
|
//#region src/composables/theme.ts
|
|
1087
|
-
var
|
|
1088
|
-
let e = f(
|
|
1087
|
+
var an = Symbol("theme"), X = () => {
|
|
1088
|
+
let e = f(an, void 0);
|
|
1089
1089
|
return n(() => e?.value ?? se);
|
|
1090
|
-
},
|
|
1090
|
+
}, on = /* @__PURE__ */ u({
|
|
1091
1091
|
__name: "TChip",
|
|
1092
1092
|
props: { variant: { default: "default" } },
|
|
1093
1093
|
setup(e) {
|
|
@@ -1097,15 +1097,15 @@ var on = Symbol("theme"), Y = () => {
|
|
|
1097
1097
|
v2d9fac57: E(n).colors.primary.main,
|
|
1098
1098
|
v4320e4fd: E(n).colors.primary.light5
|
|
1099
1099
|
}));
|
|
1100
|
-
let t = e, n =
|
|
1100
|
+
let t = e, n = X();
|
|
1101
1101
|
return (e, n) => (x(), o("div", { class: _(["t-chip", [`t-chip--${t.variant}`]]) }, [w(e.$slots, "default", {}, void 0, !0)], 2));
|
|
1102
1102
|
}
|
|
1103
|
-
}),
|
|
1103
|
+
}), sn = (e, t) => {
|
|
1104
1104
|
let n = e.__vccOpts || e;
|
|
1105
1105
|
for (let [e, r] of t) n[e] = r;
|
|
1106
1106
|
return n;
|
|
1107
|
-
},
|
|
1108
|
-
let t =
|
|
1107
|
+
}, cn = /* @__PURE__ */ sn(on, [["__scopeId", "data-v-519905d4"]]), ln = (e) => ot(e), un = (e) => {
|
|
1108
|
+
let t = X(), r = n(() => ln(e.value)), i = n(() => r.value === "primary" ? t.value.colors.primary.toku : J(.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 : Y(.15, t.value.colors[r.value])), s = n(() => r.value === "primary" ? t.value.colors.primary.light2 : Y(.2, t.value.colors[r.value])), c = n(() => r.value === "primary" ? t.value.colors.primary.light3 : Y(.25, t.value.colors[r.value]));
|
|
1109
1109
|
return n(() => j({
|
|
1110
1110
|
"&, *": {
|
|
1111
1111
|
margin: 0,
|
|
@@ -1199,12 +1199,12 @@ var on = Symbol("theme"), Y = () => {
|
|
|
1199
1199
|
"&--tertiary:disabled &__spinner": { color: t.value.colors.gray.medium1 },
|
|
1200
1200
|
"&--secondary &__spinner, &--tertiary &__spinner": { color: a.value }
|
|
1201
1201
|
}));
|
|
1202
|
-
},
|
|
1202
|
+
}, dn = {
|
|
1203
1203
|
variant: "primary",
|
|
1204
1204
|
size: "medium",
|
|
1205
1205
|
type: "button",
|
|
1206
1206
|
color: "primary"
|
|
1207
|
-
},
|
|
1207
|
+
}, fn = /* @__PURE__ */ u({
|
|
1208
1208
|
name: "TButton",
|
|
1209
1209
|
props: {
|
|
1210
1210
|
variant: String,
|
|
@@ -1219,7 +1219,7 @@ var on = Symbol("theme"), Y = () => {
|
|
|
1219
1219
|
},
|
|
1220
1220
|
emits: ["click"],
|
|
1221
1221
|
setup(e, { attrs: t, slots: r, emit: i }) {
|
|
1222
|
-
let a = n(() => F({},
|
|
1222
|
+
let a = n(() => F({}, dn, e, t)), o = un(n(() => a.value.color)), s = X(), c = n(() => [
|
|
1223
1223
|
o.value,
|
|
1224
1224
|
`${o.value}--${a.value.variant}`,
|
|
1225
1225
|
`${o.value}--${a.value.size}`,
|
|
@@ -1245,8 +1245,188 @@ var on = Symbol("theme"), Y = () => {
|
|
|
1245
1245
|
}, null)
|
|
1246
1246
|
]);
|
|
1247
1247
|
}
|
|
1248
|
+
}), pn = {
|
|
1249
|
+
color: "#000",
|
|
1250
|
+
size: "medium",
|
|
1251
|
+
variant: "outline"
|
|
1252
|
+
}, Z = /* @__PURE__ */ u({
|
|
1253
|
+
name: "TIcon",
|
|
1254
|
+
props: {
|
|
1255
|
+
icon: {
|
|
1256
|
+
type: String,
|
|
1257
|
+
required: !0
|
|
1258
|
+
},
|
|
1259
|
+
color: String,
|
|
1260
|
+
size: String,
|
|
1261
|
+
variant: String
|
|
1262
|
+
},
|
|
1263
|
+
setup(e, { attrs: t }) {
|
|
1264
|
+
let r = n(() => F({}, pn, e, t)), i = X(), a = n(() => me(i.value.colors, r.value.color) || r.value.color), o = n(() => `${i.value.iconSet}:${r.value.icon}${r.value.variant === "solid" ? "-solid" : ""}`), s = {
|
|
1265
|
+
miniature: "6px",
|
|
1266
|
+
"extra-small": "10px",
|
|
1267
|
+
small: "16px",
|
|
1268
|
+
medium: "19px",
|
|
1269
|
+
large: "24px",
|
|
1270
|
+
"extra-large": "28px",
|
|
1271
|
+
huge: "44px"
|
|
1272
|
+
}, c = n(() => s[r.value.size]);
|
|
1273
|
+
return () => l(A, h({
|
|
1274
|
+
icon: o.value,
|
|
1275
|
+
color: a.value,
|
|
1276
|
+
height: c.value,
|
|
1277
|
+
width: c.value
|
|
1278
|
+
}, t), null);
|
|
1279
|
+
}
|
|
1248
1280
|
}), mn = () => {
|
|
1249
|
-
let e =
|
|
1281
|
+
let e = X();
|
|
1282
|
+
return n(() => j({
|
|
1283
|
+
"&, *": {
|
|
1284
|
+
margin: 0,
|
|
1285
|
+
boxSizing: "border-box"
|
|
1286
|
+
},
|
|
1287
|
+
borderRadius: "0.25rem",
|
|
1288
|
+
padding: "0.125rem 0.5rem",
|
|
1289
|
+
display: "flex",
|
|
1290
|
+
alignItems: "center",
|
|
1291
|
+
justifyContent: "center",
|
|
1292
|
+
textAlign: "center",
|
|
1293
|
+
position: "relative",
|
|
1294
|
+
"&--large": {
|
|
1295
|
+
maxWidth: "9.5rem",
|
|
1296
|
+
width: "100%"
|
|
1297
|
+
},
|
|
1298
|
+
"&--medium": {
|
|
1299
|
+
maxWidth: "8rem",
|
|
1300
|
+
width: "100%"
|
|
1301
|
+
},
|
|
1302
|
+
"&--small": {
|
|
1303
|
+
maxWidth: "6.813rem",
|
|
1304
|
+
width: "100%",
|
|
1305
|
+
padding: "0rem 0.5rem"
|
|
1306
|
+
},
|
|
1307
|
+
"&--miniature": {
|
|
1308
|
+
width: "1rem",
|
|
1309
|
+
height: "1rem"
|
|
1310
|
+
},
|
|
1311
|
+
"&__text": {
|
|
1312
|
+
fontWeight: e.value.typography.fontWeight.semibold,
|
|
1313
|
+
fontSize: "1rem"
|
|
1314
|
+
},
|
|
1315
|
+
"&__text--large": {
|
|
1316
|
+
fontSize: "0.75rem",
|
|
1317
|
+
lineHeight: "1.125rem"
|
|
1318
|
+
},
|
|
1319
|
+
"&__text--medium": {
|
|
1320
|
+
fontSize: "0.75rem",
|
|
1321
|
+
lineHeight: "1.125rem"
|
|
1322
|
+
},
|
|
1323
|
+
"&__text--small": {
|
|
1324
|
+
fontSize: "0.625rem",
|
|
1325
|
+
lineHeight: "1rem"
|
|
1326
|
+
},
|
|
1327
|
+
"&__status-indicator": {
|
|
1328
|
+
width: "0.625rem",
|
|
1329
|
+
height: "0.625rem",
|
|
1330
|
+
position: "absolute",
|
|
1331
|
+
borderRadius: "0.125rem"
|
|
1332
|
+
},
|
|
1333
|
+
"&--default": {
|
|
1334
|
+
color: e.value.colors.gray.medium1,
|
|
1335
|
+
background: e.value.colors.gray.light3
|
|
1336
|
+
},
|
|
1337
|
+
"&--default > &__text": { color: e.value.colors.gray.medium1 },
|
|
1338
|
+
"&--default > &__status-indicator": { background: e.value.colors.gray.medium1 },
|
|
1339
|
+
"&--success": {
|
|
1340
|
+
color: e.value.colors.success,
|
|
1341
|
+
background: W(e.value.colors.success, .1)
|
|
1342
|
+
},
|
|
1343
|
+
"&--success > &__text": { color: e.value.colors.success },
|
|
1344
|
+
"&--success > &__status-indicator": { background: e.value.colors.success },
|
|
1345
|
+
"&--in-process": { background: W(e.value.colors.inProcess, .1) },
|
|
1346
|
+
"&--in-process > &__text": { color: e.value.colors.inProcessDark },
|
|
1347
|
+
"&--in-process > &__status-indicator": { background: e.value.colors.inProcessDark },
|
|
1348
|
+
"&--pending": { background: W(e.value.colors.info, .1) },
|
|
1349
|
+
"&--pending > &__text": { color: e.value.colors.info },
|
|
1350
|
+
"&--pending > &__status-indicator": { background: e.value.colors.info },
|
|
1351
|
+
"&--toku": { background: W(e.value.colors.primary.light4, 1) },
|
|
1352
|
+
"&--toku > &__text": { color: e.value.colors.primary.main },
|
|
1353
|
+
"&--toku > &__status-indicator": { background: e.value.colors.primary.main },
|
|
1354
|
+
"&--error": {
|
|
1355
|
+
color: e.value.colors.error,
|
|
1356
|
+
background: W(e.value.colors.error, .1)
|
|
1357
|
+
},
|
|
1358
|
+
"&--error > &__text": { color: e.value.colors.error },
|
|
1359
|
+
"&--error > &__status-indicator": { background: e.value.colors.error }
|
|
1360
|
+
}));
|
|
1361
|
+
}, hn = {
|
|
1362
|
+
size: "medium",
|
|
1363
|
+
variant: "default"
|
|
1364
|
+
}, gn = /* @__PURE__ */ u({
|
|
1365
|
+
name: "TTag",
|
|
1366
|
+
props: {
|
|
1367
|
+
size: String,
|
|
1368
|
+
variant: String
|
|
1369
|
+
},
|
|
1370
|
+
setup(e, { slots: t }) {
|
|
1371
|
+
let r = n(() => F({}, hn, e)), i = mn(), a = n(() => [
|
|
1372
|
+
i.value,
|
|
1373
|
+
`${i.value}--${r.value.variant}`,
|
|
1374
|
+
`${i.value}--${r.value.size}`
|
|
1375
|
+
]);
|
|
1376
|
+
return () => l("div", { class: a.value }, [r.value.size === "miniature" ? l("div", {
|
|
1377
|
+
"data-testid": "t-tag-status-indicator",
|
|
1378
|
+
class: `${i.value}__status-indicator`
|
|
1379
|
+
}, null) : l("p", {
|
|
1380
|
+
"data-testid": "t-tag-text",
|
|
1381
|
+
class: `${i.value}__text ${i.value}__text--${r.value.size}`
|
|
1382
|
+
}, [t.default?.()])]);
|
|
1383
|
+
}
|
|
1384
|
+
}), _n = ["data-borderless", "disabled"], vn = ["data-media"], yn = { class: "t-card-button__text" }, bn = { class: "t-card-button__title" }, xn = {
|
|
1385
|
+
key: 0,
|
|
1386
|
+
class: "t-card-button__subtitle"
|
|
1387
|
+
}, Sn = {
|
|
1388
|
+
key: 1,
|
|
1389
|
+
class: "t-card-button__tag"
|
|
1390
|
+
}, Cn = { class: "t-card-button__trailing" }, wn = /* @__PURE__ */ sn(/* @__PURE__ */ u({
|
|
1391
|
+
name: "TCardButton",
|
|
1392
|
+
__name: "TCardButton",
|
|
1393
|
+
props: {
|
|
1394
|
+
title: {},
|
|
1395
|
+
subtitle: {},
|
|
1396
|
+
tag: {},
|
|
1397
|
+
tagVariant: { default: "default" },
|
|
1398
|
+
borderless: { type: Boolean },
|
|
1399
|
+
disabled: { type: Boolean }
|
|
1400
|
+
},
|
|
1401
|
+
setup(e) {
|
|
1402
|
+
return (t, n) => (x(), o("button", {
|
|
1403
|
+
type: "button",
|
|
1404
|
+
class: "t-card-button",
|
|
1405
|
+
"data-borderless": e.borderless || void 0,
|
|
1406
|
+
disabled: e.disabled
|
|
1407
|
+
}, [
|
|
1408
|
+
t.$slots.icon || t.$slots.image ? (x(), o("div", {
|
|
1409
|
+
key: 0,
|
|
1410
|
+
class: "t-card-button__media",
|
|
1411
|
+
"data-media": t.$slots.icon ? "icon" : "image"
|
|
1412
|
+
}, [t.$slots.icon ? w(t.$slots, "icon", { key: 0 }, void 0, !0) : w(t.$slots, "image", { key: 1 }, void 0, !0)], 8, vn)) : a("", !0),
|
|
1413
|
+
s("div", yn, [w(t.$slots, "title", {}, () => [s("p", bn, T(e.title), 1)], !0), e.subtitle ? (x(), o("p", xn, T(e.subtitle), 1)) : a("", !0)]),
|
|
1414
|
+
e.tag || t.$slots.tag ? (x(), o("span", Sn, [w(t.$slots, "tag", {}, () => [l(E(gn), {
|
|
1415
|
+
size: "small",
|
|
1416
|
+
variant: e.tagVariant
|
|
1417
|
+
}, {
|
|
1418
|
+
default: k(() => [c(T(e.tag), 1)]),
|
|
1419
|
+
_: 1
|
|
1420
|
+
}, 8, ["variant"])], !0)])) : a("", !0),
|
|
1421
|
+
s("span", Cn, [w(t.$slots, "trailing", {}, () => [l(E(Z), {
|
|
1422
|
+
icon: "chevron-right",
|
|
1423
|
+
size: "small",
|
|
1424
|
+
color: "currentColor"
|
|
1425
|
+
})], !0)])
|
|
1426
|
+
], 8, _n));
|
|
1427
|
+
}
|
|
1428
|
+
}), [["__scopeId", "data-v-6da3ddef"]]), Tn = () => {
|
|
1429
|
+
let e = X(), t = e.value.colors.gray.light1, r = (e, t) => {
|
|
1250
1430
|
switch (t) {
|
|
1251
1431
|
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">
|
|
1252
1432
|
<path d="M0.833344 3.79167L3.75001 6.70834L9.16668 1.29167" stroke="${e}" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -1342,10 +1522,10 @@ var on = Symbol("theme"), Y = () => {
|
|
|
1342
1522
|
}
|
|
1343
1523
|
}
|
|
1344
1524
|
}));
|
|
1345
|
-
},
|
|
1525
|
+
}, En = () => `checkbox-${Math.random().toString(36).substring(2, 9)}-${Date.now()}`, Dn = {
|
|
1346
1526
|
size: "large",
|
|
1347
1527
|
value: !1
|
|
1348
|
-
},
|
|
1528
|
+
}, On = /* @__PURE__ */ u({
|
|
1349
1529
|
name: "TCheckbox",
|
|
1350
1530
|
props: {
|
|
1351
1531
|
labelPosition: String,
|
|
@@ -1361,7 +1541,7 @@ var on = Symbol("theme"), Y = () => {
|
|
|
1361
1541
|
"update:modelValue"
|
|
1362
1542
|
],
|
|
1363
1543
|
setup(e, { attrs: t, slots: r, emit: i }) {
|
|
1364
|
-
let a =
|
|
1544
|
+
let a = En(), o = n(() => F({}, Dn, e, t, { id: e.id ?? t.id ?? a })), s = Tn(), c = n(() => [s.value, `${s.value}--${o.value.size}`]), u = n(() => [
|
|
1365
1545
|
s.value,
|
|
1366
1546
|
`${s.value}--${o.value.size}`,
|
|
1367
1547
|
{ [`${s.value}--disabled`]: o.value.disabled }
|
|
@@ -1391,8 +1571,8 @@ var on = Symbol("theme"), Y = () => {
|
|
|
1391
1571
|
}, [r.default()])
|
|
1392
1572
|
]);
|
|
1393
1573
|
}
|
|
1394
|
-
}),
|
|
1395
|
-
let t =
|
|
1574
|
+
}), kn = (e) => {
|
|
1575
|
+
let t = X();
|
|
1396
1576
|
return n(() => j({
|
|
1397
1577
|
"&, *": {
|
|
1398
1578
|
margin: 0,
|
|
@@ -1454,7 +1634,7 @@ var on = Symbol("theme"), Y = () => {
|
|
|
1454
1634
|
marginBlock: "0.5rem"
|
|
1455
1635
|
}
|
|
1456
1636
|
}));
|
|
1457
|
-
},
|
|
1637
|
+
}, An = () => n(() => j({
|
|
1458
1638
|
position: "fixed",
|
|
1459
1639
|
display: "none",
|
|
1460
1640
|
padding: "0.625rem",
|
|
@@ -1483,21 +1663,21 @@ var on = Symbol("theme"), Y = () => {
|
|
|
1483
1663
|
borderTopRightRadius: "0.5rem",
|
|
1484
1664
|
borderBottomLeftRadius: "0"
|
|
1485
1665
|
}
|
|
1486
|
-
})),
|
|
1666
|
+
})), jn = (e) => {
|
|
1487
1667
|
let t = [];
|
|
1488
1668
|
return e?.forEach((e) => {
|
|
1489
|
-
e.type?.name === "TDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...
|
|
1669
|
+
e.type?.name === "TDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...jn(e.children));
|
|
1490
1670
|
}), t;
|
|
1491
1671
|
};
|
|
1492
1672
|
//#endregion
|
|
1493
1673
|
//#region src/components/TDropdown/TDropdown.tsx
|
|
1494
|
-
function
|
|
1674
|
+
function Mn(e) {
|
|
1495
1675
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !p(e);
|
|
1496
1676
|
}
|
|
1497
|
-
var
|
|
1677
|
+
var Nn = {
|
|
1498
1678
|
size: "small",
|
|
1499
1679
|
position: "center"
|
|
1500
|
-
},
|
|
1680
|
+
}, Pn = /* @__PURE__ */ u({
|
|
1501
1681
|
name: "TDropdown",
|
|
1502
1682
|
props: {
|
|
1503
1683
|
open: Boolean,
|
|
@@ -1508,7 +1688,7 @@ var Sn = {
|
|
|
1508
1688
|
},
|
|
1509
1689
|
emits: ["cancel"],
|
|
1510
1690
|
setup(t, { slots: r, attrs: i, emit: a }) {
|
|
1511
|
-
let o = n(() => F({},
|
|
1691
|
+
let o = n(() => F({}, Nn, t, i)), s = C(null), c = C(null), u = C(null), d = C({
|
|
1512
1692
|
top: 0,
|
|
1513
1693
|
left: 0
|
|
1514
1694
|
}), f = () => {
|
|
@@ -1544,7 +1724,7 @@ var Sn = {
|
|
|
1544
1724
|
top: r,
|
|
1545
1725
|
left: i
|
|
1546
1726
|
};
|
|
1547
|
-
}, p =
|
|
1727
|
+
}, p = An(), m = n(() => [
|
|
1548
1728
|
p.value,
|
|
1549
1729
|
`${p.value}--${o.value.size}`,
|
|
1550
1730
|
`${p.value}--${o.value.position}`,
|
|
@@ -1553,7 +1733,7 @@ var Sn = {
|
|
|
1553
1733
|
top: `${d.value.top}px`,
|
|
1554
1734
|
left: `${d.value.left}px`,
|
|
1555
1735
|
width: o.value.fullWidth ? `${c.value?.clientWidth}px` : void 0
|
|
1556
|
-
})), g =
|
|
1736
|
+
})), g = kn(n(() => u.value?.clientHeight ?? 0)), _ = n(() => [
|
|
1557
1737
|
g.value,
|
|
1558
1738
|
`${g.value}--${o.value.size}`,
|
|
1559
1739
|
`${g.value}--${o.value.position}`,
|
|
@@ -1585,7 +1765,7 @@ var Sn = {
|
|
|
1585
1765
|
}), b(() => {
|
|
1586
1766
|
o.value.attachToBody && (window.removeEventListener("scroll", f), window.removeEventListener("resize", f)), document.removeEventListener("click", v), document.removeEventListener("keydown", x);
|
|
1587
1767
|
});
|
|
1588
|
-
let w = n(() =>
|
|
1768
|
+
let w = n(() => jn(r.default?.() || [])), T = () => l("div", {
|
|
1589
1769
|
ref: u,
|
|
1590
1770
|
class: o.value.attachToBody ? m.value : `${g.value}__menu`,
|
|
1591
1771
|
style: o.value.attachToBody ? h.value : void 0,
|
|
@@ -1597,11 +1777,11 @@ var Sn = {
|
|
|
1597
1777
|
return l("div", {
|
|
1598
1778
|
ref: s,
|
|
1599
1779
|
class: _.value
|
|
1600
|
-
}, [l("div", { ref: c }, [r.trigger?.()]), o.value.open && (o.value.attachToBody ? l(e, { to: "body" },
|
|
1780
|
+
}, [l("div", { ref: c }, [r.trigger?.()]), o.value.open && (o.value.attachToBody ? l(e, { to: "body" }, Mn(t = T()) ? t : { default: () => [t] }) : T())]);
|
|
1601
1781
|
};
|
|
1602
1782
|
}
|
|
1603
|
-
}),
|
|
1604
|
-
let e =
|
|
1783
|
+
}), Fn = () => {
|
|
1784
|
+
let e = X();
|
|
1605
1785
|
return n(() => j({
|
|
1606
1786
|
"&, *": {
|
|
1607
1787
|
margin: 0,
|
|
@@ -1624,12 +1804,12 @@ var Sn = {
|
|
|
1624
1804
|
cursor: "not-allowed"
|
|
1625
1805
|
}
|
|
1626
1806
|
}));
|
|
1627
|
-
},
|
|
1807
|
+
}, In = /* @__PURE__ */ u({
|
|
1628
1808
|
name: "TDropdownItem",
|
|
1629
1809
|
emits: ["click"],
|
|
1630
1810
|
props: { disabled: Boolean },
|
|
1631
1811
|
setup(e, { slots: t, emit: r, attrs: i }) {
|
|
1632
|
-
let a = n(() => F({}, e, i)), o =
|
|
1812
|
+
let a = n(() => F({}, e, i)), o = Fn(), s = n(() => [o.value, { [`${o.value}--disabled`]: a.value.disabled }]), c = () => {
|
|
1633
1813
|
a.value.disabled || r("click");
|
|
1634
1814
|
}, u = (e) => {
|
|
1635
1815
|
e.key === "Enter" && !a.value.disabled && (r("click"), e.preventDefault());
|
|
@@ -1643,8 +1823,8 @@ var Sn = {
|
|
|
1643
1823
|
"aria-disabled": a.value.disabled
|
|
1644
1824
|
}, [t.default?.()]);
|
|
1645
1825
|
}
|
|
1646
|
-
}),
|
|
1647
|
-
let e =
|
|
1826
|
+
}), Ln = () => {
|
|
1827
|
+
let e = X();
|
|
1648
1828
|
return n(() => j({
|
|
1649
1829
|
"&, *": {
|
|
1650
1830
|
margin: 0,
|
|
@@ -1719,7 +1899,7 @@ var Sn = {
|
|
|
1719
1899
|
transform: "translateY(50%)"
|
|
1720
1900
|
}
|
|
1721
1901
|
}));
|
|
1722
|
-
},
|
|
1902
|
+
}, Rn = { type: "text" }, zn = /* @__PURE__ */ u({
|
|
1723
1903
|
name: "TTextInput",
|
|
1724
1904
|
emits: [
|
|
1725
1905
|
"input",
|
|
@@ -1755,7 +1935,7 @@ var Sn = {
|
|
|
1755
1935
|
step: [String, Number]
|
|
1756
1936
|
},
|
|
1757
1937
|
setup(e, { attrs: t, emit: r, slots: i, expose: a }) {
|
|
1758
|
-
let o = n(() => F({},
|
|
1938
|
+
let o = n(() => F({}, Rn, e, t)), s = Ln(), c = X(), u = n({
|
|
1759
1939
|
get: () => o.value.modelValue === void 0 ? o.value.value : o.value.modelValue,
|
|
1760
1940
|
set: (e) => {
|
|
1761
1941
|
r("update:modelValue", e), r("input", e), r("change", e);
|
|
@@ -1819,7 +1999,7 @@ var Sn = {
|
|
|
1819
1999
|
i.helperText?.() || o.value.helperText && l("p", { class: `${s.value}__helper-text` }, [o.value.helperText])
|
|
1820
2000
|
]);
|
|
1821
2001
|
}
|
|
1822
|
-
}),
|
|
2002
|
+
}), Bn = (e) => e.toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu, ""), Vn = /* @__PURE__ */ u({
|
|
1823
2003
|
name: "TCombobox",
|
|
1824
2004
|
emits: [
|
|
1825
2005
|
"input",
|
|
@@ -1867,7 +2047,7 @@ var Sn = {
|
|
|
1867
2047
|
}, x = (e) => {
|
|
1868
2048
|
e.key === "Escape" && (f(), m(), p());
|
|
1869
2049
|
}, S = n(() => i.value === "" ? e.options : e.options.filter((e) => {
|
|
1870
|
-
let t =
|
|
2050
|
+
let t = Bn(e.label), n = Bn(i.value);
|
|
1871
2051
|
return t.includes(n);
|
|
1872
2052
|
}));
|
|
1873
2053
|
y(() => {
|
|
@@ -1875,7 +2055,7 @@ var Sn = {
|
|
|
1875
2055
|
}), b(() => {
|
|
1876
2056
|
document.removeEventListener("click", _), s.value?.removeEventListener("keydown", x);
|
|
1877
2057
|
});
|
|
1878
|
-
let w = () => l(
|
|
2058
|
+
let w = () => l(zn, {
|
|
1879
2059
|
ref: c,
|
|
1880
2060
|
modelValue: i.value,
|
|
1881
2061
|
label: e.label,
|
|
@@ -1892,48 +2072,16 @@ var Sn = {
|
|
|
1892
2072
|
role: "combobox",
|
|
1893
2073
|
"aria-controls": "menu",
|
|
1894
2074
|
"aria-expanded": o.value
|
|
1895
|
-
}, [l(
|
|
2075
|
+
}, [l(Pn, {
|
|
1896
2076
|
open: o.value,
|
|
1897
2077
|
"full-width": !0
|
|
1898
2078
|
}, {
|
|
1899
2079
|
trigger: () => l(w, null, null),
|
|
1900
|
-
default: () => S.value.map((e) => l(
|
|
2080
|
+
default: () => S.value.map((e) => l(In, { onClick: () => v(e) }, { default: () => [e.label] }))
|
|
1901
2081
|
})]);
|
|
1902
2082
|
}
|
|
1903
|
-
}),
|
|
1904
|
-
|
|
1905
|
-
size: "medium",
|
|
1906
|
-
variant: "outline"
|
|
1907
|
-
}, X = /* @__PURE__ */ u({
|
|
1908
|
-
name: "TIcon",
|
|
1909
|
-
props: {
|
|
1910
|
-
icon: {
|
|
1911
|
-
type: String,
|
|
1912
|
-
required: !0
|
|
1913
|
-
},
|
|
1914
|
-
color: String,
|
|
1915
|
-
size: String,
|
|
1916
|
-
variant: String
|
|
1917
|
-
},
|
|
1918
|
-
setup(e, { attrs: t }) {
|
|
1919
|
-
let r = n(() => F({}, jn, e, t)), i = Y(), a = n(() => me(i.value.colors, r.value.color) || r.value.color), o = n(() => `${i.value.iconSet}:${r.value.icon}${r.value.variant === "solid" ? "-solid" : ""}`), s = {
|
|
1920
|
-
miniature: "6px",
|
|
1921
|
-
"extra-small": "10px",
|
|
1922
|
-
small: "16px",
|
|
1923
|
-
medium: "19px",
|
|
1924
|
-
large: "24px",
|
|
1925
|
-
"extra-large": "28px",
|
|
1926
|
-
huge: "44px"
|
|
1927
|
-
}, c = n(() => s[r.value.size]);
|
|
1928
|
-
return () => l(A, h({
|
|
1929
|
-
icon: o.value,
|
|
1930
|
-
color: a.value,
|
|
1931
|
-
height: c.value,
|
|
1932
|
-
width: c.value
|
|
1933
|
-
}, t), null);
|
|
1934
|
-
}
|
|
1935
|
-
}), Mn = () => {
|
|
1936
|
-
let e = Y();
|
|
2083
|
+
}), Hn = () => {
|
|
2084
|
+
let e = X();
|
|
1937
2085
|
return n(() => j({
|
|
1938
2086
|
"&, & > *": {
|
|
1939
2087
|
margin: 0,
|
|
@@ -2005,7 +2153,7 @@ var Sn = {
|
|
|
2005
2153
|
zIndex: 45
|
|
2006
2154
|
}
|
|
2007
2155
|
}));
|
|
2008
|
-
},
|
|
2156
|
+
}, Un = { size: "medium" }, Wn = /* @__PURE__ */ u({
|
|
2009
2157
|
name: "TModal",
|
|
2010
2158
|
props: {
|
|
2011
2159
|
open: Boolean,
|
|
@@ -2016,7 +2164,7 @@ var Sn = {
|
|
|
2016
2164
|
},
|
|
2017
2165
|
emits: ["close", "cancel"],
|
|
2018
2166
|
setup(e, { slots: t, attrs: r, emit: i, expose: a }) {
|
|
2019
|
-
let o = n(() => F({},
|
|
2167
|
+
let o = n(() => F({}, Un, e, r)), s = C(o.value.open), c = Hn(), u = n(() => [
|
|
2020
2168
|
c.value,
|
|
2021
2169
|
`${c.value}--${o.value.size}`,
|
|
2022
2170
|
{
|
|
@@ -2069,7 +2217,7 @@ var Sn = {
|
|
|
2069
2217
|
class: `${c.value}__close-button`,
|
|
2070
2218
|
onClick: h,
|
|
2071
2219
|
"aria-label": "Close"
|
|
2072
|
-
}, [l(
|
|
2220
|
+
}, [l(Z, { icon: "x-mark" }, null)])]),
|
|
2073
2221
|
(t.body || t.default) && l("div", {
|
|
2074
2222
|
id: "modal-body",
|
|
2075
2223
|
class: `${c.value}__body`
|
|
@@ -2078,8 +2226,8 @@ var Sn = {
|
|
|
2078
2226
|
]);
|
|
2079
2227
|
return o.value.nonBlocking ? () => l("div", null, [o.value.nonBlocking && s.value && l("div", { class: `${c.value}__backdrop` }, null), l(v, null, null)]) : () => l(v, null, null);
|
|
2080
2228
|
}
|
|
2081
|
-
}),
|
|
2082
|
-
let t =
|
|
2229
|
+
}), Gn = (e) => {
|
|
2230
|
+
let t = X();
|
|
2083
2231
|
return n(() => j({
|
|
2084
2232
|
margin: 0,
|
|
2085
2233
|
padding: 0,
|
|
@@ -2153,7 +2301,7 @@ var Sn = {
|
|
|
2153
2301
|
"&--normal": { fontStyle: "normal" },
|
|
2154
2302
|
"&--italic": { fontStyle: "italic" }
|
|
2155
2303
|
}));
|
|
2156
|
-
},
|
|
2304
|
+
}, Kn = {
|
|
2157
2305
|
h1: "h1",
|
|
2158
2306
|
h2: "h2",
|
|
2159
2307
|
h3: "h3",
|
|
@@ -2169,13 +2317,13 @@ var Sn = {
|
|
|
2169
2317
|
b4: "p",
|
|
2170
2318
|
b5: "p",
|
|
2171
2319
|
b6: "p"
|
|
2172
|
-
},
|
|
2320
|
+
}, qn = [
|
|
2173
2321
|
"http:",
|
|
2174
2322
|
"https:",
|
|
2175
2323
|
"mailto:",
|
|
2176
2324
|
"tel:",
|
|
2177
2325
|
"ftp:"
|
|
2178
|
-
],
|
|
2326
|
+
], Jn = (e) => qn.some((t) => e.trim().toLowerCase().startsWith(t)), Yn = (e) => {
|
|
2179
2327
|
let t = [
|
|
2180
2328
|
{
|
|
2181
2329
|
regex: /\*\*([\s\S]+?)\*\*/g,
|
|
@@ -2199,59 +2347,59 @@ var Sn = {
|
|
|
2199
2347
|
url: a ? t[2]?.trim() : void 0
|
|
2200
2348
|
});
|
|
2201
2349
|
return n;
|
|
2202
|
-
},
|
|
2350
|
+
}, Xn = (e) => {
|
|
2203
2351
|
let t = [...e].sort((e, t) => e.start - t.start || t.end - e.end), n = [], r = 0;
|
|
2204
2352
|
for (let e of t) e.start >= r && (n.push(e), r = e.end);
|
|
2205
2353
|
return n;
|
|
2206
|
-
},
|
|
2354
|
+
}, Q = (e) => {
|
|
2207
2355
|
if (!e) return [e];
|
|
2208
|
-
let t =
|
|
2356
|
+
let t = Yn(e);
|
|
2209
2357
|
if (t.length === 0) return [e];
|
|
2210
|
-
let n =
|
|
2358
|
+
let n = Xn(t), r = [], i = 0;
|
|
2211
2359
|
for (let t of n) {
|
|
2212
2360
|
t.start > i && r.push(e.substring(i, t.start));
|
|
2213
|
-
let n =
|
|
2214
|
-
t.tag === "a" ? t.url &&
|
|
2361
|
+
let n = Q(t.content);
|
|
2362
|
+
t.tag === "a" ? t.url && Jn(t.url) ? r.push(d("a", {
|
|
2215
2363
|
href: t.url,
|
|
2216
2364
|
target: "_blank",
|
|
2217
2365
|
rel: "noopener noreferrer"
|
|
2218
2366
|
}, n)) : r.push(...n) : r.push(d(t.tag, n)), i = t.end;
|
|
2219
2367
|
}
|
|
2220
2368
|
return i < e.length && r.push(e.substring(i)), r.length > 0 ? r : [e];
|
|
2221
|
-
},
|
|
2222
|
-
if (e.type === t) return
|
|
2369
|
+
}, Zn = (e) => typeof e == "object" && !!e && "type" in e && e.type !== void 0, Qn = (e) => {
|
|
2370
|
+
if (e.type === t) return Q(typeof e.children == "string" ? e.children : "");
|
|
2223
2371
|
if (!e.children) return e;
|
|
2224
2372
|
let n;
|
|
2225
2373
|
if (Array.isArray(e.children)) n = e.children.flatMap((e) => {
|
|
2226
|
-
if (typeof e == "string") return
|
|
2227
|
-
if (
|
|
2228
|
-
let t =
|
|
2374
|
+
if (typeof e == "string") return Q(e);
|
|
2375
|
+
if (Zn(e)) {
|
|
2376
|
+
let t = Qn(e);
|
|
2229
2377
|
return Array.isArray(t) ? t : [t];
|
|
2230
2378
|
}
|
|
2231
2379
|
return [];
|
|
2232
2380
|
});
|
|
2233
|
-
else if (typeof e.children == "string") n =
|
|
2234
|
-
else if (
|
|
2235
|
-
let t =
|
|
2381
|
+
else if (typeof e.children == "string") n = Q(e.children);
|
|
2382
|
+
else if (Zn(e.children)) {
|
|
2383
|
+
let t = Qn(e.children);
|
|
2236
2384
|
n = Array.isArray(t) ? t : [t];
|
|
2237
2385
|
} else return e;
|
|
2238
2386
|
return d(e.type, { ...e.props }, n);
|
|
2239
|
-
},
|
|
2240
|
-
if (typeof e == "string") return
|
|
2387
|
+
}, $n = (e) => {
|
|
2388
|
+
if (typeof e == "string") return Q(e);
|
|
2241
2389
|
if (Array.isArray(e)) return e.flatMap((e) => {
|
|
2242
|
-
if (typeof e == "string") return
|
|
2243
|
-
if (
|
|
2244
|
-
let t =
|
|
2390
|
+
if (typeof e == "string") return Q(e);
|
|
2391
|
+
if (Zn(e)) {
|
|
2392
|
+
let t = Qn(e);
|
|
2245
2393
|
return Array.isArray(t) ? t : [t];
|
|
2246
2394
|
}
|
|
2247
2395
|
return [e];
|
|
2248
2396
|
});
|
|
2249
|
-
if (
|
|
2250
|
-
let t =
|
|
2397
|
+
if (Zn(e)) {
|
|
2398
|
+
let t = Qn(e);
|
|
2251
2399
|
return Array.isArray(t) ? t : [t];
|
|
2252
2400
|
}
|
|
2253
2401
|
return [e];
|
|
2254
|
-
},
|
|
2402
|
+
}, er = {
|
|
2255
2403
|
fontStyle: "normal",
|
|
2256
2404
|
fontWeight: "regular",
|
|
2257
2405
|
variant: "b0",
|
|
@@ -2266,21 +2414,21 @@ var Sn = {
|
|
|
2266
2414
|
color: String
|
|
2267
2415
|
},
|
|
2268
2416
|
setup(e, { attrs: t, slots: r }) {
|
|
2269
|
-
let i = n(() => F({},
|
|
2417
|
+
let i = n(() => F({}, er, e, t)), a = X(), o = Gn(n(() => me(a.value.colors, i.value.color) || a.value.typography.color).value), s = n(() => [
|
|
2270
2418
|
o.value,
|
|
2271
2419
|
`${o.value}--${i.value.variant}`,
|
|
2272
2420
|
`${o.value}--${i.value.fontWeight}`,
|
|
2273
2421
|
`${o.value}--${i.value.fontStyle}`
|
|
2274
|
-
]), c = n(() => i.value.as ||
|
|
2422
|
+
]), c = n(() => i.value.as || Kn[i.value.variant]);
|
|
2275
2423
|
return () => {
|
|
2276
2424
|
let e = r.default?.();
|
|
2277
2425
|
if (!e) return d(c.value, { class: s.value });
|
|
2278
2426
|
if (!a.value.parseMarkdown) return d(c.value, { class: s.value }, e);
|
|
2279
|
-
let t =
|
|
2427
|
+
let t = $n(e);
|
|
2280
2428
|
return d(c.value, { class: s.value }, t);
|
|
2281
2429
|
};
|
|
2282
2430
|
}
|
|
2283
|
-
}),
|
|
2431
|
+
}), tr = () => n(() => j({
|
|
2284
2432
|
"& > [class$=\"__body\"]": { paddingBlock: 0 },
|
|
2285
2433
|
"&__body": {
|
|
2286
2434
|
display: "flex",
|
|
@@ -2293,16 +2441,16 @@ var Sn = {
|
|
|
2293
2441
|
width: "3.5rem",
|
|
2294
2442
|
height: "auto"
|
|
2295
2443
|
}
|
|
2296
|
-
})),
|
|
2444
|
+
})), nr = {
|
|
2297
2445
|
cancelText: "Cancel",
|
|
2298
2446
|
confirmText: "OK"
|
|
2299
|
-
},
|
|
2447
|
+
}, rr = /* @__PURE__ */ u({
|
|
2300
2448
|
name: "TDialog",
|
|
2301
2449
|
components: {
|
|
2302
2450
|
TTypography: $,
|
|
2303
|
-
TModal:
|
|
2304
|
-
TButton:
|
|
2305
|
-
TIcon:
|
|
2451
|
+
TModal: Wn,
|
|
2452
|
+
TButton: fn,
|
|
2453
|
+
TIcon: Z
|
|
2306
2454
|
},
|
|
2307
2455
|
props: {
|
|
2308
2456
|
title: {
|
|
@@ -2326,10 +2474,10 @@ var Sn = {
|
|
|
2326
2474
|
"close"
|
|
2327
2475
|
],
|
|
2328
2476
|
setup(e, { emit: t }) {
|
|
2329
|
-
let r = n(() => F({},
|
|
2330
|
-
if (r.value.color) return r.value.color === "primary" ? "primary.main" :
|
|
2477
|
+
let r = n(() => F({}, nr, e)), i = tr(), a = n(() => {
|
|
2478
|
+
if (r.value.color) return r.value.color === "primary" ? "primary.main" : ln(r.value.color);
|
|
2331
2479
|
});
|
|
2332
|
-
return () => d(
|
|
2480
|
+
return () => d(Wn, {
|
|
2333
2481
|
onClose: () => r.value.cancellable && t("close"),
|
|
2334
2482
|
onCancel: () => r.value.cancellable && t("cancel"),
|
|
2335
2483
|
onConfirm: () => t("confirm"),
|
|
@@ -2341,7 +2489,7 @@ var Sn = {
|
|
|
2341
2489
|
variant: "s2",
|
|
2342
2490
|
fontWeight: "semibold"
|
|
2343
2491
|
}, () => r.value.title),
|
|
2344
|
-
default: () => d("div", { class: `${i.value}__body` }, [r.value.icon ? d(
|
|
2492
|
+
default: () => d("div", { class: `${i.value}__body` }, [r.value.icon ? d(Z, {
|
|
2345
2493
|
class: `${i.value}__body-icon`,
|
|
2346
2494
|
variant: "solid",
|
|
2347
2495
|
color: a.value,
|
|
@@ -2351,17 +2499,17 @@ var Sn = {
|
|
|
2351
2499
|
variant: "b1",
|
|
2352
2500
|
innerHTML: r.value.message
|
|
2353
2501
|
})]),
|
|
2354
|
-
footer: () => [r.value.cancellable ? d(
|
|
2502
|
+
footer: () => [r.value.cancellable ? d(fn, {
|
|
2355
2503
|
onClick: () => t("cancel"),
|
|
2356
2504
|
color: r.value.color,
|
|
2357
2505
|
variant: "secondary"
|
|
2358
|
-
}, () => r.value.cancelText) : void 0, d(
|
|
2506
|
+
}, () => r.value.cancelText) : void 0, d(fn, {
|
|
2359
2507
|
onClick: () => t("confirm"),
|
|
2360
2508
|
color: r.value.color
|
|
2361
2509
|
}, () => r.value.confirmText)]
|
|
2362
2510
|
});
|
|
2363
2511
|
}
|
|
2364
|
-
}),
|
|
2512
|
+
}), ir = () => {
|
|
2365
2513
|
let e = new Set(["class", "style"]), t = ([t]) => e.has(t), r = ([e]) => /^on[A-Z]/.test(e), i = ee(), a = n(() => Object.entries(i).filter(([e]) => e !== "data-state")), o = n(() => Object.fromEntries(a.value.filter(t))), s = n(() => Object.fromEntries(a.value.filter(r))), c = n(() => Object.fromEntries(a.value.filter((e) => !t(e) && !r(e))));
|
|
2366
2514
|
return {
|
|
2367
2515
|
wrapperAttrs: o,
|
|
@@ -2369,20 +2517,20 @@ var Sn = {
|
|
|
2369
2517
|
staticAttrs: c,
|
|
2370
2518
|
listenerAttrs: s
|
|
2371
2519
|
};
|
|
2372
|
-
},
|
|
2520
|
+
}, ar = {
|
|
2373
2521
|
key: 0,
|
|
2374
2522
|
class: "t-file-upload__label"
|
|
2375
|
-
},
|
|
2523
|
+
}, or = ["for"], sr = { class: "t-file-upload__filename" }, cr = ["aria-label", "disabled"], lr = [
|
|
2376
2524
|
"id",
|
|
2377
2525
|
"name",
|
|
2378
2526
|
"required",
|
|
2379
2527
|
"disabled",
|
|
2380
2528
|
"form",
|
|
2381
2529
|
"accept"
|
|
2382
|
-
],
|
|
2530
|
+
], ur = {
|
|
2383
2531
|
key: 4,
|
|
2384
2532
|
class: "t-file-upload__hints"
|
|
2385
|
-
},
|
|
2533
|
+
}, dr = { key: 1 }, fr = /* @__PURE__ */ sn(/* @__PURE__ */ u({
|
|
2386
2534
|
name: "TFileUpload",
|
|
2387
2535
|
inheritAttrs: !1,
|
|
2388
2536
|
__name: "TFileUpload",
|
|
@@ -2408,7 +2556,7 @@ var Sn = {
|
|
|
2408
2556
|
}),
|
|
2409
2557
|
emits: /* @__PURE__ */ m(["error"], ["update:modelValue"]),
|
|
2410
2558
|
setup(e, { expose: t, emit: r }) {
|
|
2411
|
-
let u = r, d = ne(e, "modelValue"), f = C(null), p = te(), m = n(() => e.id ?? p), { wrapperAttrs: g, staticAttrs: _, listenerAttrs: v } =
|
|
2559
|
+
let u = r, d = ne(e, "modelValue"), f = C(null), p = te(), m = n(() => e.id ?? p), { wrapperAttrs: g, staticAttrs: _, listenerAttrs: v } = ir(), b = n(() => e.loading ? "loading" : d.value ? "loaded" : "empty"), S = n(() => {
|
|
2412
2560
|
if (!(!e.accept || e.accept.length === 0)) return e.accept.map((e) => `.${e}`).join(",");
|
|
2413
2561
|
}), ee = n(() => b.value === "empty" && (!!e.formatsHint || !!e.maxSizeHint)), D = () => {
|
|
2414
2562
|
let e = f.value;
|
|
@@ -2452,7 +2600,7 @@ var Sn = {
|
|
|
2452
2600
|
"data-disabled": e.disabled || void 0
|
|
2453
2601
|
}), {
|
|
2454
2602
|
default: k(() => [
|
|
2455
|
-
e.label || t.$slots.label ? (x(), o("div",
|
|
2603
|
+
e.label || t.$slots.label ? (x(), o("div", ar, [w(t.$slots, "label", {}, () => [l(E($), {
|
|
2456
2604
|
variant: "b3",
|
|
2457
2605
|
"font-weight": "semibold"
|
|
2458
2606
|
}, {
|
|
@@ -2463,7 +2611,7 @@ var Sn = {
|
|
|
2463
2611
|
class: "t-file-upload__box",
|
|
2464
2612
|
"data-state": "empty",
|
|
2465
2613
|
for: m.value
|
|
2466
|
-
}), [l(E(
|
|
2614
|
+
}), [l(E(Z), {
|
|
2467
2615
|
icon: "paper-clip",
|
|
2468
2616
|
size: "small",
|
|
2469
2617
|
color: "gray.main"
|
|
@@ -2473,10 +2621,10 @@ var Sn = {
|
|
|
2473
2621
|
}, {
|
|
2474
2622
|
default: k(() => [w(t.$slots, "cta", {}, () => [c(T(e.ctaText), 1)], !0)]),
|
|
2475
2623
|
_: 3
|
|
2476
|
-
})], 16,
|
|
2624
|
+
})], 16, or)) : b.value === "loading" ? (x(), o("div", h({ key: 2 }, E(v), {
|
|
2477
2625
|
class: "t-file-upload__box",
|
|
2478
2626
|
"data-state": "loading"
|
|
2479
|
-
}), [l(E(
|
|
2627
|
+
}), [l(E(Z), {
|
|
2480
2628
|
icon: "arrow-path",
|
|
2481
2629
|
size: "small",
|
|
2482
2630
|
color: "primary.main"
|
|
@@ -2491,12 +2639,12 @@ var Sn = {
|
|
|
2491
2639
|
class: "t-file-upload__box",
|
|
2492
2640
|
"data-state": "loaded"
|
|
2493
2641
|
}), [
|
|
2494
|
-
l(E(
|
|
2642
|
+
l(E(Z), {
|
|
2495
2643
|
icon: "document",
|
|
2496
2644
|
size: "small",
|
|
2497
2645
|
color: "primary.main"
|
|
2498
2646
|
}),
|
|
2499
|
-
s("div",
|
|
2647
|
+
s("div", sr, [w(t.$slots, "file", { file: d.value }, () => [l(E($), {
|
|
2500
2648
|
variant: "b3",
|
|
2501
2649
|
color: "primary.main",
|
|
2502
2650
|
class: "t-file-upload__filename-text"
|
|
@@ -2510,12 +2658,12 @@ var Sn = {
|
|
|
2510
2658
|
"aria-label": e.removeLabel,
|
|
2511
2659
|
disabled: e.disabled,
|
|
2512
2660
|
onClick: j
|
|
2513
|
-
}, [l(E(
|
|
2661
|
+
}, [l(E(Z), {
|
|
2514
2662
|
icon: "x-circle",
|
|
2515
2663
|
color: "#FFFFFF",
|
|
2516
2664
|
width: 18,
|
|
2517
2665
|
height: 18
|
|
2518
|
-
})], 8,
|
|
2666
|
+
})], 8, cr)
|
|
2519
2667
|
], 16)),
|
|
2520
2668
|
s("input", h({
|
|
2521
2669
|
id: m.value,
|
|
@@ -2531,15 +2679,15 @@ var Sn = {
|
|
|
2531
2679
|
form: e.form,
|
|
2532
2680
|
accept: S.value,
|
|
2533
2681
|
onChange: A
|
|
2534
|
-
}), null, 16,
|
|
2535
|
-
ee.value ? (x(), o("div",
|
|
2682
|
+
}), null, 16, lr),
|
|
2683
|
+
ee.value ? (x(), o("div", ur, [e.formatsHint ? (x(), i(E($), {
|
|
2536
2684
|
key: 0,
|
|
2537
2685
|
variant: "b4",
|
|
2538
2686
|
color: "gray.medium1"
|
|
2539
2687
|
}, {
|
|
2540
2688
|
default: k(() => [c(T(e.formatsHint), 1)]),
|
|
2541
2689
|
_: 1
|
|
2542
|
-
})) : (x(), o("span",
|
|
2690
|
+
})) : (x(), o("span", dr)), e.maxSizeHint ? (x(), i(E($), {
|
|
2543
2691
|
key: 2,
|
|
2544
2692
|
variant: "b4",
|
|
2545
2693
|
color: "gray.medium1"
|
|
@@ -2555,8 +2703,8 @@ var Sn = {
|
|
|
2555
2703
|
"data-disabled"
|
|
2556
2704
|
]));
|
|
2557
2705
|
}
|
|
2558
|
-
}), [["__scopeId", "data-v-0e554550"]]),
|
|
2559
|
-
let t =
|
|
2706
|
+
}), [["__scopeId", "data-v-0e554550"]]), pr = (e) => {
|
|
2707
|
+
let t = X(), r = n(() => ln(e.value)), i = n(() => r.value === "primary" ? t.value.colors.primary.toku : J(.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 : Y(.15, t.value.colors[r.value])), s = n(() => r.value === "primary" ? t.value.colors.primary.light2 : Y(.2, t.value.colors[r.value])), c = n(() => r.value === "primary" ? t.value.colors.primary.light3 : Y(.25, t.value.colors[r.value]));
|
|
2560
2708
|
return {
|
|
2561
2709
|
baseClass: n(() => j({
|
|
2562
2710
|
"&, *": {
|
|
@@ -2639,13 +2787,13 @@ var Sn = {
|
|
|
2639
2787
|
"&--small": { height: "1rem" }
|
|
2640
2788
|
}))
|
|
2641
2789
|
};
|
|
2642
|
-
},
|
|
2790
|
+
}, mr = {
|
|
2643
2791
|
variant: "primary",
|
|
2644
2792
|
size: "medium",
|
|
2645
2793
|
icon: "academic-cap",
|
|
2646
2794
|
type: "button",
|
|
2647
2795
|
color: "primary"
|
|
2648
|
-
},
|
|
2796
|
+
}, hr = /* @__PURE__ */ u({
|
|
2649
2797
|
name: "TIconButton",
|
|
2650
2798
|
props: {
|
|
2651
2799
|
variant: String,
|
|
@@ -2659,7 +2807,7 @@ var Sn = {
|
|
|
2659
2807
|
},
|
|
2660
2808
|
emits: ["click"],
|
|
2661
2809
|
setup(e, { attrs: t, emit: r }) {
|
|
2662
|
-
let i = n(() => F({},
|
|
2810
|
+
let i = n(() => F({}, mr, e, t)), { baseClass: a, iconClass: o } = pr(n(() => i.value.color)), s = X(), c = n(() => [
|
|
2663
2811
|
a.value,
|
|
2664
2812
|
`${a.value}--${i.value.variant}`,
|
|
2665
2813
|
`${a.value}--${i.value.size}`,
|
|
@@ -2685,8 +2833,8 @@ var Sn = {
|
|
|
2685
2833
|
class: u.value
|
|
2686
2834
|
}, null)]);
|
|
2687
2835
|
}
|
|
2688
|
-
}),
|
|
2689
|
-
let e =
|
|
2836
|
+
}), gr = () => {
|
|
2837
|
+
let e = X();
|
|
2690
2838
|
return n(() => j({
|
|
2691
2839
|
margin: 0,
|
|
2692
2840
|
padding: 0,
|
|
@@ -2715,10 +2863,10 @@ var Sn = {
|
|
|
2715
2863
|
fontSize: "0.875rem"
|
|
2716
2864
|
}
|
|
2717
2865
|
}));
|
|
2718
|
-
},
|
|
2866
|
+
}, _r = {
|
|
2719
2867
|
variant: "primary",
|
|
2720
2868
|
size: "medium"
|
|
2721
|
-
},
|
|
2869
|
+
}, vr = /* @__PURE__ */ u({
|
|
2722
2870
|
name: "TButton",
|
|
2723
2871
|
props: {
|
|
2724
2872
|
variant: String,
|
|
@@ -2728,7 +2876,7 @@ var Sn = {
|
|
|
2728
2876
|
rightIcon: String
|
|
2729
2877
|
},
|
|
2730
2878
|
setup(e, { attrs: t, slots: r }) {
|
|
2731
|
-
let i = n(() => F({},
|
|
2879
|
+
let i = n(() => F({}, _r, e, t)), a = gr(), o = X(), s = n(() => [
|
|
2732
2880
|
a.value,
|
|
2733
2881
|
`${a.value}--${i.value.variant}`,
|
|
2734
2882
|
`${a.value}--${i.value.size}`
|
|
@@ -2742,8 +2890,8 @@ var Sn = {
|
|
|
2742
2890
|
i.value.rightIcon ? l(A, { icon: `${o.value.iconSet}:${i.value.rightIcon}` }, null) : null
|
|
2743
2891
|
]);
|
|
2744
2892
|
}
|
|
2745
|
-
}),
|
|
2746
|
-
let t = n(() => e.color), r =
|
|
2893
|
+
}), yr = (e) => {
|
|
2894
|
+
let t = n(() => e.color), r = X();
|
|
2747
2895
|
return n(() => j({
|
|
2748
2896
|
margin: 0,
|
|
2749
2897
|
padding: 0,
|
|
@@ -2768,20 +2916,20 @@ var Sn = {
|
|
|
2768
2916
|
"100%": { transform: "rotate(360deg)" }
|
|
2769
2917
|
}
|
|
2770
2918
|
}));
|
|
2771
|
-
},
|
|
2919
|
+
}, br = {
|
|
2772
2920
|
size: "auto",
|
|
2773
2921
|
color: "#3C1053"
|
|
2774
|
-
},
|
|
2922
|
+
}, xr = /* @__PURE__ */ u({
|
|
2775
2923
|
name: "TSpinner",
|
|
2776
2924
|
props: {
|
|
2777
2925
|
size: String,
|
|
2778
2926
|
color: String
|
|
2779
2927
|
},
|
|
2780
2928
|
setup(e, { attrs: t }) {
|
|
2781
|
-
let r = n(() => F({},
|
|
2929
|
+
let r = n(() => F({}, br, e, t)), i = X(), a = yr({ color: n(() => me(i.value.colors, r.value.color) || r.value.color).value }), o = n(() => [a.value, `${a.value}--${r.value.size}`]);
|
|
2782
2930
|
return () => l("div", { class: o.value }, null);
|
|
2783
2931
|
}
|
|
2784
|
-
}),
|
|
2932
|
+
}), Sr = () => n(() => j({
|
|
2785
2933
|
bottom: 0,
|
|
2786
2934
|
left: 0,
|
|
2787
2935
|
position: "absolute",
|
|
@@ -2798,7 +2946,7 @@ var Sn = {
|
|
|
2798
2946
|
position: "fixed",
|
|
2799
2947
|
zIndex: 999
|
|
2800
2948
|
}
|
|
2801
|
-
})),
|
|
2949
|
+
})), Cr = { size: "auto" }, wr = /* @__PURE__ */ u({
|
|
2802
2950
|
name: "TLoading",
|
|
2803
2951
|
props: {
|
|
2804
2952
|
active: Boolean,
|
|
@@ -2806,14 +2954,14 @@ var Sn = {
|
|
|
2806
2954
|
size: String
|
|
2807
2955
|
},
|
|
2808
2956
|
setup(e, { attrs: t }) {
|
|
2809
|
-
let r = n(() => F({},
|
|
2957
|
+
let r = n(() => F({}, Cr, e, t)), i = Sr(), a = n(() => [i.value, {
|
|
2810
2958
|
[`${i.value}--active`]: r.value.active,
|
|
2811
2959
|
[`${i.value}--full-page`]: r.value.fullPage
|
|
2812
2960
|
}]);
|
|
2813
|
-
return () => l("div", { class: a.value }, [l(
|
|
2961
|
+
return () => l("div", { class: a.value }, [l(xr, { size: r.value.size }, null)]);
|
|
2814
2962
|
}
|
|
2815
|
-
}),
|
|
2816
|
-
let e =
|
|
2963
|
+
}), Tr = () => {
|
|
2964
|
+
let e = X();
|
|
2817
2965
|
return n(() => j({
|
|
2818
2966
|
"&, *": {
|
|
2819
2967
|
margin: 0,
|
|
@@ -2861,7 +3009,7 @@ var Sn = {
|
|
|
2861
3009
|
"&--disabled &__radio::after": { background: e.value.colors.gray.medium2 },
|
|
2862
3010
|
"&--disabled &__label": { color: e.value.colors.gray.medium2 }
|
|
2863
3011
|
}));
|
|
2864
|
-
},
|
|
3012
|
+
}, Er = { labelPosition: "right" }, Dr = /* @__PURE__ */ u({
|
|
2865
3013
|
name: "TRadio",
|
|
2866
3014
|
props: {
|
|
2867
3015
|
id: String,
|
|
@@ -2899,11 +3047,11 @@ var Sn = {
|
|
|
2899
3047
|
"update:modelValue"
|
|
2900
3048
|
],
|
|
2901
3049
|
setup(e, { emit: t, attrs: r }) {
|
|
2902
|
-
let i = n(() => F({},
|
|
3050
|
+
let i = n(() => F({}, Er, e, r)), a = C(i.value.modelValue === i.value.value);
|
|
2903
3051
|
O(() => [i.value.modelValue, i.value.value], () => {
|
|
2904
3052
|
a.value = i.value.modelValue === i.value.value;
|
|
2905
3053
|
});
|
|
2906
|
-
let o =
|
|
3054
|
+
let o = Tr(), s = n(() => [
|
|
2907
3055
|
o.value,
|
|
2908
3056
|
`${o.value}--label-${i.value.labelPosition}`,
|
|
2909
3057
|
{
|
|
@@ -2929,15 +3077,15 @@ var Sn = {
|
|
|
2929
3077
|
for: i.value.id
|
|
2930
3078
|
}, [i.value.label])]);
|
|
2931
3079
|
}
|
|
2932
|
-
}),
|
|
3080
|
+
}), Or = {
|
|
2933
3081
|
railTopInset: 3,
|
|
2934
3082
|
railBottomInset: 8,
|
|
2935
3083
|
minThumbHeight: 6,
|
|
2936
3084
|
thumbHeightFactor: .65
|
|
2937
3085
|
};
|
|
2938
|
-
function
|
|
3086
|
+
function kr(e, t = {}) {
|
|
2939
3087
|
let { railTopInset: r, railBottomInset: i, minThumbHeight: a, thumbHeightFactor: o, onDragStart: s, onDragEnd: c } = {
|
|
2940
|
-
...
|
|
3088
|
+
...Or,
|
|
2941
3089
|
...t
|
|
2942
3090
|
}, l = C(0), u = C(0), d = C(!1), f = C(0), p = C(0), m = n(() => l.value > 0);
|
|
2943
3091
|
function h() {
|
|
@@ -2979,8 +3127,8 @@ function vr(e, t = {}) {
|
|
|
2979
3127
|
}
|
|
2980
3128
|
//#endregion
|
|
2981
3129
|
//#region src/components/TSelect/TSelect.styles.tsx
|
|
2982
|
-
var
|
|
2983
|
-
let e =
|
|
3130
|
+
var Ar = () => {
|
|
3131
|
+
let e = X();
|
|
2984
3132
|
return n(() => j({
|
|
2985
3133
|
"&, *": {
|
|
2986
3134
|
margin: 0,
|
|
@@ -3109,30 +3257,30 @@ var yr = () => {
|
|
|
3109
3257
|
"&--error &__helper-text": { color: e.value.colors.error },
|
|
3110
3258
|
"&--full-width": { width: "100%" }
|
|
3111
3259
|
}));
|
|
3112
|
-
},
|
|
3113
|
-
e.type === "option" ? t.push(e) : Array.isArray(e.children) &&
|
|
3114
|
-
}), t),
|
|
3260
|
+
}, jr = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map((e) => jr(e)).join("").trim() : e && typeof e == "object" && "children" in e ? jr(e.children) : "", Mr = (e, t = []) => (e?.forEach((e) => {
|
|
3261
|
+
e.type === "option" ? t.push(e) : Array.isArray(e.children) && Mr(e.children, t);
|
|
3262
|
+
}), t), Nr = (e) => Mr(e).map((e) => ({
|
|
3115
3263
|
value: e.props?.value,
|
|
3116
3264
|
disabled: !!e.props?.disabled,
|
|
3117
|
-
label:
|
|
3118
|
-
})),
|
|
3265
|
+
label: jr(e.children)
|
|
3266
|
+
})), Pr = (e, t) => {
|
|
3119
3267
|
if (e === t) return !0;
|
|
3120
3268
|
if (e == null || t == null || typeof e != "object" || typeof t != "object") return !1;
|
|
3121
3269
|
let n = Object.getPrototypeOf(e);
|
|
3122
3270
|
if (n !== Object.prototype || Object.getPrototypeOf(t) !== n) return !1;
|
|
3123
3271
|
let r = Object.keys(e), i = Object.keys(t);
|
|
3124
3272
|
return r.length === i.length ? r.every((n) => e[n] === t[n]) : !1;
|
|
3125
|
-
},
|
|
3126
|
-
let n = e.findIndex((e) =>
|
|
3273
|
+
}, Fr = (e, t) => {
|
|
3274
|
+
let n = e.findIndex((e) => Pr(e.value, t) && !e.disabled);
|
|
3127
3275
|
if (n >= 0) return n;
|
|
3128
3276
|
let r = e.findIndex((e) => !e.disabled);
|
|
3129
3277
|
return r >= 0 ? r : -1;
|
|
3130
|
-
},
|
|
3278
|
+
}, Ir = (e) => {
|
|
3131
3279
|
if (typeof e.leftIcon == "string") return e.leftIcon;
|
|
3132
3280
|
let t = e["left-icon"];
|
|
3133
3281
|
return typeof t == "string" ? t : "";
|
|
3134
|
-
},
|
|
3135
|
-
let e =
|
|
3282
|
+
}, Lr = (e, t) => e ? e.includes(":") ? e : `${t}:${e}` : "", Rr = () => {
|
|
3283
|
+
let e = X();
|
|
3136
3284
|
return n(() => j({
|
|
3137
3285
|
"&, *": { boxSizing: "border-box" },
|
|
3138
3286
|
listStyle: "none",
|
|
@@ -3163,7 +3311,7 @@ var yr = () => {
|
|
|
3163
3311
|
pointerEvents: "none"
|
|
3164
3312
|
}
|
|
3165
3313
|
}));
|
|
3166
|
-
},
|
|
3314
|
+
}, zr = /* @__PURE__ */ u({
|
|
3167
3315
|
name: "TSelectOption",
|
|
3168
3316
|
emits: ["select", "hover"],
|
|
3169
3317
|
props: {
|
|
@@ -3174,7 +3322,7 @@ var yr = () => {
|
|
|
3174
3322
|
withSeparator: Boolean
|
|
3175
3323
|
},
|
|
3176
3324
|
setup(e, { slots: t, emit: r }) {
|
|
3177
|
-
let i =
|
|
3325
|
+
let i = Rr(), a = n(() => [i.value, {
|
|
3178
3326
|
[`${i.value}--selected`]: e.selected,
|
|
3179
3327
|
[`${i.value}--highlighted`]: e.highlighted,
|
|
3180
3328
|
[`${i.value}--disabled`]: e.disabled,
|
|
@@ -3192,16 +3340,16 @@ var yr = () => {
|
|
|
3192
3340
|
onMouseenter: o
|
|
3193
3341
|
}, [t.default?.() || e.label]);
|
|
3194
3342
|
}
|
|
3195
|
-
}),
|
|
3196
|
-
function
|
|
3343
|
+
}), Br = 36;
|
|
3344
|
+
function Vr(e, t, n) {
|
|
3197
3345
|
let r = C(!1), i = C(-1), a = C(null), o = C(null), s = C(null), c = C(!1), l = C(!1), u = () => {
|
|
3198
|
-
n.value || !e.value.length || (r.value = !0, i.value =
|
|
3346
|
+
n.value || !e.value.length || (r.value = !0, i.value = Fr(e.value, t.value));
|
|
3199
3347
|
}, d = () => {
|
|
3200
3348
|
r.value = !1, i.value = -1, c.value = !1, l.value = !1;
|
|
3201
3349
|
}, f = (e) => {
|
|
3202
3350
|
let t = s.value;
|
|
3203
3351
|
t && t.scrollBy({
|
|
3204
|
-
top: e *
|
|
3352
|
+
top: e * Br,
|
|
3205
3353
|
behavior: "smooth"
|
|
3206
3354
|
});
|
|
3207
3355
|
}, p = (e) => {
|
|
@@ -3256,7 +3404,7 @@ function Ar(e, t, n) {
|
|
|
3256
3404
|
}
|
|
3257
3405
|
//#endregion
|
|
3258
3406
|
//#region src/components/TSelect/TSelect.tsx
|
|
3259
|
-
var
|
|
3407
|
+
var Hr = /* @__PURE__ */ u({
|
|
3260
3408
|
name: "TSelect",
|
|
3261
3409
|
emits: [
|
|
3262
3410
|
"input",
|
|
@@ -3300,7 +3448,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3300
3448
|
id: String
|
|
3301
3449
|
},
|
|
3302
3450
|
setup(e, { attrs: t, emit: r, slots: i, expose: a }) {
|
|
3303
|
-
let o = n(() => F({}, e, t)), s =
|
|
3451
|
+
let o = n(() => F({}, e, t)), s = X(), c = C(null), u = Ar(), d = n(() => [
|
|
3304
3452
|
u.value,
|
|
3305
3453
|
`${u.value}__container`,
|
|
3306
3454
|
{
|
|
@@ -3316,7 +3464,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3316
3464
|
set: (e) => {
|
|
3317
3465
|
c.value = e, r("update:modelValue", e), r("input", e), r("change", e);
|
|
3318
3466
|
}
|
|
3319
|
-
}), p = n(() =>
|
|
3467
|
+
}), p = n(() => Nr(i.default?.() ?? [])), m = n(() => p.value.find((e) => Pr(e.value, f.value))), g = n(() => !!m.value), _ = n(() => m.value ? m.value.label : o.value.placeholder ? o.value.placeholder : ""), v = n(() => Ir(o.value)), y = n(() => Lr(v.value, s.value.iconSet)), b = Vr(p, f, n(() => !!o.value.disabled)), x = kr(b.menuRef, {
|
|
3320
3468
|
onDragStart: () => {
|
|
3321
3469
|
b.isInteractingWithMenu.value = !0;
|
|
3322
3470
|
},
|
|
@@ -3373,10 +3521,10 @@ var jr = /* @__PURE__ */ u({
|
|
|
3373
3521
|
role: "listbox",
|
|
3374
3522
|
ref: b.menuRef,
|
|
3375
3523
|
onScroll: x.update
|
|
3376
|
-
}, [p.value.map((e, t) => l(
|
|
3524
|
+
}, [p.value.map((e, t) => l(zr, {
|
|
3377
3525
|
key: `${String(e.value)}-${t}`,
|
|
3378
3526
|
label: e.label,
|
|
3379
|
-
selected:
|
|
3527
|
+
selected: Pr(e.value, f.value),
|
|
3380
3528
|
highlighted: t === b.highlightedIndex.value,
|
|
3381
3529
|
disabled: e.disabled,
|
|
3382
3530
|
withSeparator: t < p.value.length - 1,
|
|
@@ -3396,8 +3544,8 @@ var jr = /* @__PURE__ */ u({
|
|
|
3396
3544
|
i.helperText?.() || o.value.helperText && l("p", { class: `${u.value}__helper-text` }, [o.value.helperText])
|
|
3397
3545
|
]);
|
|
3398
3546
|
}
|
|
3399
|
-
}),
|
|
3400
|
-
let e =
|
|
3547
|
+
}), Ur = () => {
|
|
3548
|
+
let e = X();
|
|
3401
3549
|
return n(() => j({
|
|
3402
3550
|
"&, *": {
|
|
3403
3551
|
margin: 0,
|
|
@@ -3479,12 +3627,12 @@ var jr = /* @__PURE__ */ u({
|
|
|
3479
3627
|
"&--error &__select:not(:disabled), &--error &__select:focus": { borderColor: e.value.colors.error },
|
|
3480
3628
|
"&--error + &__helper-text": { color: e.value.colors.error }
|
|
3481
3629
|
}));
|
|
3482
|
-
},
|
|
3630
|
+
}, Wr = (e) => {
|
|
3483
3631
|
let t = [];
|
|
3484
3632
|
return e?.forEach((e) => {
|
|
3485
|
-
e.type?.name === "TSelectDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...
|
|
3633
|
+
e.type?.name === "TSelectDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...Wr(e.children));
|
|
3486
3634
|
}), t;
|
|
3487
|
-
},
|
|
3635
|
+
}, Gr = /* @__PURE__ */ u({
|
|
3488
3636
|
name: "TSelectDropdown",
|
|
3489
3637
|
props: {
|
|
3490
3638
|
open: Boolean,
|
|
@@ -3498,7 +3646,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3498
3646
|
},
|
|
3499
3647
|
emits: ["cancel", "click"],
|
|
3500
3648
|
setup(e, { slots: t, attrs: r, emit: i }) {
|
|
3501
|
-
let a = n(() => F({}, e, r)), o =
|
|
3649
|
+
let a = n(() => F({}, e, r)), o = Ur(), s = n(() => [
|
|
3502
3650
|
o.value,
|
|
3503
3651
|
`${o.value}__menu_container`,
|
|
3504
3652
|
{
|
|
@@ -3519,7 +3667,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3519
3667
|
}), b(() => {
|
|
3520
3668
|
document.removeEventListener("click", d), u.value?.removeEventListener("keydown", f);
|
|
3521
3669
|
});
|
|
3522
|
-
let p = n(() =>
|
|
3670
|
+
let p = n(() => Wr(t.default?.() || [])), m = () => {
|
|
3523
3671
|
i("click");
|
|
3524
3672
|
};
|
|
3525
3673
|
return () => l("div", { class: c.value }, [
|
|
@@ -3542,8 +3690,8 @@ var jr = /* @__PURE__ */ u({
|
|
|
3542
3690
|
t.helperText?.() || a.value.helperText && l("p", { class: `${o.value}__helper-text` }, [a.value.helperText])
|
|
3543
3691
|
]);
|
|
3544
3692
|
}
|
|
3545
|
-
}),
|
|
3546
|
-
let e =
|
|
3693
|
+
}), Kr = () => {
|
|
3694
|
+
let e = X();
|
|
3547
3695
|
return n(() => j({
|
|
3548
3696
|
"&, *": {
|
|
3549
3697
|
margin: 0,
|
|
@@ -3571,12 +3719,12 @@ var jr = /* @__PURE__ */ u({
|
|
|
3571
3719
|
float: "right"
|
|
3572
3720
|
}
|
|
3573
3721
|
}));
|
|
3574
|
-
},
|
|
3722
|
+
}, qr = /* @__PURE__ */ u({
|
|
3575
3723
|
name: "TSelectDropdownItem",
|
|
3576
3724
|
emits: ["click"],
|
|
3577
3725
|
props: { label: String },
|
|
3578
3726
|
setup(e, { slots: t, emit: r, attrs: i }) {
|
|
3579
|
-
let a = n(() => F({}, e, i)), o =
|
|
3727
|
+
let a = n(() => F({}, e, i)), o = Kr(), s = () => {
|
|
3580
3728
|
r("click");
|
|
3581
3729
|
}, c = (e) => {
|
|
3582
3730
|
e.key === "Enter" && !a.value.disabled && (r("click"), e.preventDefault());
|
|
@@ -3589,7 +3737,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3589
3737
|
tabindex: 0
|
|
3590
3738
|
}, [t.default?.(), t.label?.() || a.value.label && l("label", { class: `${o.value}__label` }, [a.value.label])]);
|
|
3591
3739
|
}
|
|
3592
|
-
}),
|
|
3740
|
+
}), Jr = /* @__PURE__ */ sn(/* @__PURE__ */ u({
|
|
3593
3741
|
name: "TSwitch",
|
|
3594
3742
|
inheritAttrs: !1,
|
|
3595
3743
|
__name: "TSwitch",
|
|
@@ -3609,7 +3757,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3609
3757
|
}),
|
|
3610
3758
|
emits: /* @__PURE__ */ m(["change", "input"], ["update:modelValue"]),
|
|
3611
3759
|
setup(e, { emit: t }) {
|
|
3612
|
-
let r = t, o = ne(e, "modelValue"), s = n(() => e.modelValue ?? e.value), u = te(), d = n(() => e.id ?? u), { wrapperAttrs: f, controlAttrs: p } =
|
|
3760
|
+
let r = t, o = ne(e, "modelValue"), s = n(() => e.modelValue ?? e.value), u = te(), d = n(() => e.id ?? u), { wrapperAttrs: f, controlAttrs: p } = ir(), m = (e) => {
|
|
3613
3761
|
o.value = e, r("change", e), r("input", e);
|
|
3614
3762
|
};
|
|
3615
3763
|
return (t, n) => (x(), i(E(ie), h(E(f), {
|
|
@@ -3650,8 +3798,8 @@ var jr = /* @__PURE__ */ u({
|
|
|
3650
3798
|
"data-disabled"
|
|
3651
3799
|
]));
|
|
3652
3800
|
}
|
|
3653
|
-
}), [["__scopeId", "data-v-f80e4486"]]),
|
|
3654
|
-
let e =
|
|
3801
|
+
}), [["__scopeId", "data-v-f80e4486"]]), Yr = () => {
|
|
3802
|
+
let e = X();
|
|
3655
3803
|
return n(() => j({
|
|
3656
3804
|
"&, *": {
|
|
3657
3805
|
margin: 0,
|
|
@@ -3697,7 +3845,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3697
3845
|
}
|
|
3698
3846
|
}
|
|
3699
3847
|
}));
|
|
3700
|
-
},
|
|
3848
|
+
}, Xr = /* @__PURE__ */ u({
|
|
3701
3849
|
name: "TTabBar",
|
|
3702
3850
|
emits: [
|
|
3703
3851
|
"input",
|
|
@@ -3710,7 +3858,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3710
3858
|
modelValue: String
|
|
3711
3859
|
},
|
|
3712
3860
|
setup(e, { attrs: t, emit: r }) {
|
|
3713
|
-
let i = n(() => F({}, e, t)), a =
|
|
3861
|
+
let i = n(() => F({}, e, t)), a = Yr(), o = C(i.value.modelValue === void 0 ? i.value.value : i.value.modelValue);
|
|
3714
3862
|
O([() => i.value.modelValue, () => i.value.value], () => {
|
|
3715
3863
|
o.value = i.value.modelValue === void 0 ? i.value.value : i.value.modelValue;
|
|
3716
3864
|
});
|
|
@@ -3732,8 +3880,8 @@ var jr = /* @__PURE__ */ u({
|
|
|
3732
3880
|
onClick: () => s(e)
|
|
3733
3881
|
}, [e])]))])]);
|
|
3734
3882
|
}
|
|
3735
|
-
}),
|
|
3736
|
-
let e =
|
|
3883
|
+
}), Zr = () => {
|
|
3884
|
+
let e = X();
|
|
3737
3885
|
return n(() => j({
|
|
3738
3886
|
paddingBottom: "0.625rem",
|
|
3739
3887
|
color: e.value.colors.gray.main,
|
|
@@ -3756,7 +3904,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3756
3904
|
color: e.value.colors.primary.dark
|
|
3757
3905
|
}
|
|
3758
3906
|
}));
|
|
3759
|
-
},
|
|
3907
|
+
}, Qr = /* @__PURE__ */ u({
|
|
3760
3908
|
name: "TTab",
|
|
3761
3909
|
props: {
|
|
3762
3910
|
id: {
|
|
@@ -3779,7 +3927,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3779
3927
|
}
|
|
3780
3928
|
},
|
|
3781
3929
|
setup(e, { slots: t }) {
|
|
3782
|
-
let r =
|
|
3930
|
+
let r = Zr(), i = f("tabSelection");
|
|
3783
3931
|
if (!i) throw Error("tabSelection provider missing.");
|
|
3784
3932
|
let { selectTab: a } = i, o = () => {
|
|
3785
3933
|
a(e.id);
|
|
@@ -3795,15 +3943,15 @@ var jr = /* @__PURE__ */ u({
|
|
|
3795
3943
|
tabindex: 0
|
|
3796
3944
|
}, [t.default?.()]);
|
|
3797
3945
|
}
|
|
3798
|
-
}),
|
|
3799
|
-
let e =
|
|
3946
|
+
}), $r = () => {
|
|
3947
|
+
let e = X();
|
|
3800
3948
|
return n(() => j({
|
|
3801
3949
|
width: "100%",
|
|
3802
3950
|
borderBottom: `0.125rem solid ${e.value.colors.gray.medium2}`,
|
|
3803
3951
|
display: "flex",
|
|
3804
3952
|
gap: "2.5rem"
|
|
3805
3953
|
}));
|
|
3806
|
-
},
|
|
3954
|
+
}, ei = /* @__PURE__ */ u({
|
|
3807
3955
|
name: "TTabBarExtended",
|
|
3808
3956
|
emits: ["select"],
|
|
3809
3957
|
props: {
|
|
@@ -3820,7 +3968,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3820
3968
|
] }
|
|
3821
3969
|
},
|
|
3822
3970
|
setup(e, { emit: t }) {
|
|
3823
|
-
let r =
|
|
3971
|
+
let r = $r(), i = Zr(), a = n(() => e.tabs.map((e, t) => ({
|
|
3824
3972
|
id: `${t}`,
|
|
3825
3973
|
label: e.label,
|
|
3826
3974
|
value: e.value
|
|
@@ -3844,7 +3992,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3844
3992
|
e.preventDefault(), e.key === "Enter" && _();
|
|
3845
3993
|
}, x = (e) => {
|
|
3846
3994
|
f(e), v();
|
|
3847
|
-
}, w = () => l(
|
|
3995
|
+
}, w = () => l(Pn, {
|
|
3848
3996
|
open: d.value,
|
|
3849
3997
|
position: "center",
|
|
3850
3998
|
onCancel: _
|
|
@@ -3856,7 +4004,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
3856
4004
|
tabindex: 0,
|
|
3857
4005
|
role: "button"
|
|
3858
4006
|
}, [c(". . .")]),
|
|
3859
|
-
default: () => a.value.map((e) => l(
|
|
4007
|
+
default: () => a.value.map((e) => l(In, {
|
|
3860
4008
|
disabled: u.value.id === e.id,
|
|
3861
4009
|
onClick: () => x(e.id)
|
|
3862
4010
|
}, { default: () => [e.label] }))
|
|
@@ -3864,119 +4012,15 @@ var jr = /* @__PURE__ */ u({
|
|
|
3864
4012
|
return () => l("nav", {
|
|
3865
4013
|
role: "navigation",
|
|
3866
4014
|
class: [r.value]
|
|
3867
|
-
}, [h.value.map((e) => l(
|
|
4015
|
+
}, [h.value.map((e) => l(Qr, {
|
|
3868
4016
|
key: `${e.label}-${e.id}`,
|
|
3869
4017
|
id: e.id,
|
|
3870
4018
|
selected: u.value.id === e.id,
|
|
3871
4019
|
value: e.value
|
|
3872
4020
|
}, { default: () => [e.label] })), g.value ? l(w, null, null) : null]);
|
|
3873
4021
|
}
|
|
3874
|
-
}),
|
|
3875
|
-
let e =
|
|
3876
|
-
return n(() => j({
|
|
3877
|
-
"&, *": {
|
|
3878
|
-
margin: 0,
|
|
3879
|
-
boxSizing: "border-box"
|
|
3880
|
-
},
|
|
3881
|
-
borderRadius: "0.25rem",
|
|
3882
|
-
padding: "0.125rem 0.5rem",
|
|
3883
|
-
display: "flex",
|
|
3884
|
-
alignItems: "center",
|
|
3885
|
-
justifyContent: "center",
|
|
3886
|
-
textAlign: "center",
|
|
3887
|
-
position: "relative",
|
|
3888
|
-
"&--large": {
|
|
3889
|
-
maxWidth: "9.5rem",
|
|
3890
|
-
width: "100%"
|
|
3891
|
-
},
|
|
3892
|
-
"&--medium": {
|
|
3893
|
-
maxWidth: "8rem",
|
|
3894
|
-
width: "100%"
|
|
3895
|
-
},
|
|
3896
|
-
"&--small": {
|
|
3897
|
-
maxWidth: "6.813rem",
|
|
3898
|
-
width: "100%",
|
|
3899
|
-
padding: "0rem 0.5rem"
|
|
3900
|
-
},
|
|
3901
|
-
"&--miniature": {
|
|
3902
|
-
width: "1rem",
|
|
3903
|
-
height: "1rem"
|
|
3904
|
-
},
|
|
3905
|
-
"&__text": {
|
|
3906
|
-
fontWeight: e.value.typography.fontWeight.semibold,
|
|
3907
|
-
fontSize: "1rem"
|
|
3908
|
-
},
|
|
3909
|
-
"&__text--large": {
|
|
3910
|
-
fontSize: "0.75rem",
|
|
3911
|
-
lineHeight: "1.125rem"
|
|
3912
|
-
},
|
|
3913
|
-
"&__text--medium": {
|
|
3914
|
-
fontSize: "0.75rem",
|
|
3915
|
-
lineHeight: "1.125rem"
|
|
3916
|
-
},
|
|
3917
|
-
"&__text--small": {
|
|
3918
|
-
fontSize: "0.625rem",
|
|
3919
|
-
lineHeight: "1rem"
|
|
3920
|
-
},
|
|
3921
|
-
"&__status-indicator": {
|
|
3922
|
-
width: "0.625rem",
|
|
3923
|
-
height: "0.625rem",
|
|
3924
|
-
position: "absolute",
|
|
3925
|
-
borderRadius: "0.125rem"
|
|
3926
|
-
},
|
|
3927
|
-
"&--default": {
|
|
3928
|
-
color: e.value.colors.gray.medium1,
|
|
3929
|
-
background: e.value.colors.gray.light3
|
|
3930
|
-
},
|
|
3931
|
-
"&--default > &__text": { color: e.value.colors.gray.medium1 },
|
|
3932
|
-
"&--default > &__status-indicator": { background: e.value.colors.gray.medium1 },
|
|
3933
|
-
"&--success": {
|
|
3934
|
-
color: e.value.colors.success,
|
|
3935
|
-
background: U(e.value.colors.success, .1)
|
|
3936
|
-
},
|
|
3937
|
-
"&--success > &__text": { color: e.value.colors.success },
|
|
3938
|
-
"&--success > &__status-indicator": { background: e.value.colors.success },
|
|
3939
|
-
"&--in-process": { background: U(e.value.colors.inProcess, .1) },
|
|
3940
|
-
"&--in-process > &__text": { color: e.value.colors.inProcessDark },
|
|
3941
|
-
"&--in-process > &__status-indicator": { background: e.value.colors.inProcessDark },
|
|
3942
|
-
"&--pending": { background: U(e.value.colors.info, .1) },
|
|
3943
|
-
"&--pending > &__text": { color: e.value.colors.info },
|
|
3944
|
-
"&--pending > &__status-indicator": { background: e.value.colors.info },
|
|
3945
|
-
"&--toku": { background: U(e.value.colors.primary.light4, 1) },
|
|
3946
|
-
"&--toku > &__text": { color: e.value.colors.primary.main },
|
|
3947
|
-
"&--toku > &__status-indicator": { background: e.value.colors.primary.main },
|
|
3948
|
-
"&--error": {
|
|
3949
|
-
color: e.value.colors.error,
|
|
3950
|
-
background: U(e.value.colors.error, .1)
|
|
3951
|
-
},
|
|
3952
|
-
"&--error > &__text": { color: e.value.colors.error },
|
|
3953
|
-
"&--error > &__status-indicator": { background: e.value.colors.error }
|
|
3954
|
-
}));
|
|
3955
|
-
}, Gr = {
|
|
3956
|
-
size: "medium",
|
|
3957
|
-
variant: "default"
|
|
3958
|
-
}, Kr = /* @__PURE__ */ u({
|
|
3959
|
-
name: "TTag",
|
|
3960
|
-
props: {
|
|
3961
|
-
size: String,
|
|
3962
|
-
variant: String
|
|
3963
|
-
},
|
|
3964
|
-
setup(e, { slots: t }) {
|
|
3965
|
-
let r = n(() => F({}, Gr, e)), i = Wr(), a = n(() => [
|
|
3966
|
-
i.value,
|
|
3967
|
-
`${i.value}--${r.value.variant}`,
|
|
3968
|
-
`${i.value}--${r.value.size}`
|
|
3969
|
-
]);
|
|
3970
|
-
return () => l("div", { class: a.value }, [r.value.size === "miniature" ? l("div", {
|
|
3971
|
-
"data-testid": "t-tag-status-indicator",
|
|
3972
|
-
class: `${i.value}__status-indicator`
|
|
3973
|
-
}, null) : l("p", {
|
|
3974
|
-
"data-testid": "t-tag-text",
|
|
3975
|
-
class: `${i.value}__text ${i.value}__text--${r.value.size}`
|
|
3976
|
-
}, [t.default?.()])]);
|
|
3977
|
-
}
|
|
3978
|
-
}), qr = () => {
|
|
3979
|
-
let e = Y();
|
|
4022
|
+
}), ti = () => {
|
|
4023
|
+
let e = X();
|
|
3980
4024
|
return n(() => j({
|
|
3981
4025
|
"&, *": {
|
|
3982
4026
|
margin: 0,
|
|
@@ -4035,7 +4079,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
4035
4079
|
"&--error &__helper-text": { color: e.value.colors.error },
|
|
4036
4080
|
"&--full-width": { width: "100%" }
|
|
4037
4081
|
}));
|
|
4038
|
-
},
|
|
4082
|
+
}, ni = 1, ri = /* @__PURE__ */ u({
|
|
4039
4083
|
name: "TTextArea",
|
|
4040
4084
|
emits: [
|
|
4041
4085
|
"input",
|
|
@@ -4062,7 +4106,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
4062
4106
|
}
|
|
4063
4107
|
},
|
|
4064
4108
|
setup(e, { attrs: t, emit: r, slots: i, expose: a }) {
|
|
4065
|
-
let o = n(() => F({}, e, t)), s =
|
|
4109
|
+
let o = n(() => F({}, e, t)), s = ti(), c = n({
|
|
4066
4110
|
get: () => o.value.modelValue === void 0 ? o.value.value : o.value.modelValue,
|
|
4067
4111
|
set: (e) => {
|
|
4068
4112
|
r("update:modelValue", e), r("input", e), r("change", e);
|
|
@@ -4105,7 +4149,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
4105
4149
|
id: o.value.id,
|
|
4106
4150
|
class: [`${s.value}__textarea`, { [`${s.value}__textarea--auto-resize`]: o.value.autoResize }],
|
|
4107
4151
|
style: o.value.autoResize ? { height: "auto" } : void 0,
|
|
4108
|
-
rows: o.value.autoResize ?
|
|
4152
|
+
rows: o.value.autoResize ? ni : void 0,
|
|
4109
4153
|
placeholder: o.value.placeholder,
|
|
4110
4154
|
value: c.value,
|
|
4111
4155
|
onInput: d,
|
|
@@ -4118,7 +4162,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
4118
4162
|
i.helperText?.() || o.value.helperText && l("p", { class: `${s.value}__helper-text` }, [o.value.helperText])
|
|
4119
4163
|
]);
|
|
4120
4164
|
}
|
|
4121
|
-
}),
|
|
4165
|
+
}), ii = /* @__PURE__ */ u({
|
|
4122
4166
|
name: "TThemeProvider",
|
|
4123
4167
|
inheritAttrs: !1,
|
|
4124
4168
|
props: { theme: {
|
|
@@ -4126,8 +4170,8 @@ var jr = /* @__PURE__ */ u({
|
|
|
4126
4170
|
default: () => ({})
|
|
4127
4171
|
} },
|
|
4128
4172
|
setup(e, { slots: t, attrs: r }) {
|
|
4129
|
-
let i = n(() =>
|
|
4130
|
-
return S(
|
|
4173
|
+
let i = n(() => rn(e.theme ?? {}));
|
|
4174
|
+
return S(an, i), () => {
|
|
4131
4175
|
let { cssVars: e } = i.value;
|
|
4132
4176
|
return d("div", {
|
|
4133
4177
|
...r,
|
|
@@ -4139,7 +4183,7 @@ var jr = /* @__PURE__ */ u({
|
|
|
4139
4183
|
});
|
|
4140
4184
|
//#endregion
|
|
4141
4185
|
//#region src/composables/click.ts
|
|
4142
|
-
function
|
|
4186
|
+
function ai(e, t) {
|
|
4143
4187
|
let n = (n) => {
|
|
4144
4188
|
let r = e();
|
|
4145
4189
|
r && !r.contains(n.target) && t();
|
|
@@ -4152,7 +4196,7 @@ function Zr(e, t) {
|
|
|
4152
4196
|
}
|
|
4153
4197
|
//#endregion
|
|
4154
4198
|
//#region src/composables/tooltip.ts
|
|
4155
|
-
var
|
|
4199
|
+
var oi = (e) => {
|
|
4156
4200
|
let t = C(!1), r = null, i = () => {
|
|
4157
4201
|
t.value = !0, r && clearTimeout(r);
|
|
4158
4202
|
}, a = () => t.value = !1, o = {
|
|
@@ -4164,13 +4208,13 @@ var Qr = (e) => {
|
|
|
4164
4208
|
},
|
|
4165
4209
|
click: { onClick: () => t.value ? a() : i() }
|
|
4166
4210
|
}, s = n(() => o[e.value ?? "hover"]), c = C(null);
|
|
4167
|
-
return
|
|
4211
|
+
return ai(() => c.value, a), {
|
|
4168
4212
|
isVisible: t,
|
|
4169
4213
|
triggerHandler: s,
|
|
4170
4214
|
wrapperRef: c
|
|
4171
4215
|
};
|
|
4172
|
-
},
|
|
4173
|
-
let e =
|
|
4216
|
+
}, si = () => {
|
|
4217
|
+
let e = X();
|
|
4174
4218
|
return n(() => j({
|
|
4175
4219
|
position: "relative",
|
|
4176
4220
|
width: "fit-content",
|
|
@@ -4261,11 +4305,11 @@ var Qr = (e) => {
|
|
|
4261
4305
|
"&--medium &__tooltip": { maxWidth: "30ch" },
|
|
4262
4306
|
"&--large &__tooltip": { maxWidth: "35ch" }
|
|
4263
4307
|
}));
|
|
4264
|
-
},
|
|
4308
|
+
}, ci = {
|
|
4265
4309
|
position: "right",
|
|
4266
4310
|
size: "medium",
|
|
4267
4311
|
trigger: "hover"
|
|
4268
|
-
},
|
|
4312
|
+
}, li = /* @__PURE__ */ u({
|
|
4269
4313
|
name: "TTooltip",
|
|
4270
4314
|
props: {
|
|
4271
4315
|
label: String,
|
|
@@ -4275,7 +4319,7 @@ var Qr = (e) => {
|
|
|
4275
4319
|
trigger: String
|
|
4276
4320
|
},
|
|
4277
4321
|
setup(e, { slots: t, attrs: r }) {
|
|
4278
|
-
let i = n(() => F({},
|
|
4322
|
+
let i = n(() => F({}, ci, e, r)), { isVisible: a, wrapperRef: o, triggerHandler: s } = oi(n(() => i.value.trigger)), c = si(), u = n(() => [
|
|
4279
4323
|
c.value,
|
|
4280
4324
|
`${c.value}--${i.value.position}`,
|
|
4281
4325
|
`${c.value}--${i.value.trigger}`,
|
|
@@ -4293,8 +4337,8 @@ var Qr = (e) => {
|
|
|
4293
4337
|
class: `${c.value}__tooltip`
|
|
4294
4338
|
}, [t.label?.() || i.value.label])]);
|
|
4295
4339
|
}
|
|
4296
|
-
}),
|
|
4297
|
-
let e =
|
|
4340
|
+
}), ui = () => {
|
|
4341
|
+
let e = X();
|
|
4298
4342
|
return n(() => j({
|
|
4299
4343
|
"&, *": {
|
|
4300
4344
|
margin: 0,
|
|
@@ -4320,31 +4364,31 @@ var Qr = (e) => {
|
|
|
4320
4364
|
"&--success": {
|
|
4321
4365
|
borderColor: e.value.colors.success,
|
|
4322
4366
|
color: e.value.colors.success,
|
|
4323
|
-
background:
|
|
4367
|
+
background: W(e.value.colors.success, .2)
|
|
4324
4368
|
},
|
|
4325
4369
|
"&--success > &__text": { color: e.value.colors.success },
|
|
4326
4370
|
"&--in-process": {
|
|
4327
4371
|
borderColor: e.value.colors.inProcess,
|
|
4328
4372
|
color: e.value.colors.inProcess,
|
|
4329
|
-
background:
|
|
4373
|
+
background: W(e.value.colors.inProcess, .2)
|
|
4330
4374
|
},
|
|
4331
4375
|
"&--in-process > &__text": { color: e.value.colors.inProcessDark },
|
|
4332
4376
|
"&--warning": {
|
|
4333
4377
|
borderColor: e.value.colors.warning,
|
|
4334
4378
|
color: e.value.colors.warning,
|
|
4335
|
-
background:
|
|
4379
|
+
background: W(e.value.colors.warning, .2)
|
|
4336
4380
|
},
|
|
4337
4381
|
"&--warning > &__text": { color: e.value.colors.warning },
|
|
4338
4382
|
"&--error": {
|
|
4339
4383
|
borderColor: e.value.colors.error,
|
|
4340
4384
|
color: e.value.colors.error,
|
|
4341
|
-
background:
|
|
4385
|
+
background: W(e.value.colors.error, .2)
|
|
4342
4386
|
},
|
|
4343
4387
|
"&--error > &__text": { color: e.value.colors.error },
|
|
4344
4388
|
"&--info": {
|
|
4345
4389
|
borderColor: e.value.colors.info,
|
|
4346
4390
|
color: e.value.colors.info,
|
|
4347
|
-
background:
|
|
4391
|
+
background: W(e.value.colors.info, .2)
|
|
4348
4392
|
},
|
|
4349
4393
|
"&--info > &__text": { color: e.value.colors.info },
|
|
4350
4394
|
"&__icon": {
|
|
@@ -4368,7 +4412,7 @@ var Qr = (e) => {
|
|
|
4368
4412
|
}
|
|
4369
4413
|
}
|
|
4370
4414
|
}));
|
|
4371
|
-
},
|
|
4415
|
+
}, di = { variant: "default" }, fi = /* @__PURE__ */ u({
|
|
4372
4416
|
name: "TWarning",
|
|
4373
4417
|
props: {
|
|
4374
4418
|
fullWidth: Boolean,
|
|
@@ -4376,7 +4420,7 @@ var Qr = (e) => {
|
|
|
4376
4420
|
variant: String
|
|
4377
4421
|
},
|
|
4378
4422
|
setup(e, { slots: t }) {
|
|
4379
|
-
let r = n(() => F({},
|
|
4423
|
+
let r = n(() => F({}, di, e)), i = ui(), a = n(() => [
|
|
4380
4424
|
i.value,
|
|
4381
4425
|
`${i.value}--${r.value.variant}`,
|
|
4382
4426
|
{ [`${i.value}--full-width`]: r.value.fullWidth }
|
|
@@ -4392,7 +4436,7 @@ var Qr = (e) => {
|
|
|
4392
4436
|
class: a.value,
|
|
4393
4437
|
role: "alert"
|
|
4394
4438
|
}, [
|
|
4395
|
-
r.value.icon && l(
|
|
4439
|
+
r.value.icon && l(Z, {
|
|
4396
4440
|
icon: r.value.icon,
|
|
4397
4441
|
class: `${i.value}__icon`,
|
|
4398
4442
|
color: s.value
|
|
@@ -4404,11 +4448,11 @@ var Qr = (e) => {
|
|
|
4404
4448
|
}, { default: () => [t.default?.()] })
|
|
4405
4449
|
]);
|
|
4406
4450
|
}
|
|
4407
|
-
}),
|
|
4451
|
+
}), pi = () => ({ open: ({ onCancel: e, onConfirm: t, ...n }) => {
|
|
4408
4452
|
let i = document.createElement("div");
|
|
4409
4453
|
document.body.appendChild(i);
|
|
4410
4454
|
let a = r({ render() {
|
|
4411
|
-
return d(
|
|
4455
|
+
return d(rr, {
|
|
4412
4456
|
...n,
|
|
4413
4457
|
onConfirm: () => {
|
|
4414
4458
|
t?.(), a.unmount(), i.remove();
|
|
@@ -4424,6 +4468,6 @@ var Qr = (e) => {
|
|
|
4424
4468
|
a.mount(i);
|
|
4425
4469
|
} });
|
|
4426
4470
|
//#endregion
|
|
4427
|
-
export {
|
|
4471
|
+
export { fn as TButton, wn as TCardButton, On as TCheckbox, cn as TChip, Vn as TCombobox, rr as TDialog, Pn as TDropdown, In as TDropdownItem, fr as TFileUpload, Z as TIcon, hr as TIconButton, vr as TLink, wr as TLoading, Wn as TModal, Dr as TRadio, Hr as TSelect, Gr as TSelectDropdown, qr as TSelectDropdownItem, xr as TSpinner, Jr as TSwitch, Xr as TTabBar, ei as TTabBarExtended, gn as TTag, ri as TTextArea, zn as TTextInput, ii as TThemeProvider, li as TTooltip, $ as TTypography, fi as TWarning, se as baseTheme, rn as createTheme, an as injectionKey, pi as useDialog, kr as useScrollbarThumb, X as useTheme };
|
|
4428
4472
|
|
|
4429
4473
|
//# sourceMappingURL=index.es.js.map
|