dxd-style-code 0.1.2 → 0.1.3
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/README.md +8 -0
- package/dist/dxd-style-code.js +105 -90
- package/dist/dxd-style-code.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Vue 3 UI Component Library с атомарной структурой и Tailwind CSS.
|
|
4
4
|
|
|
5
|
+
## 📚 Документация
|
|
6
|
+
|
|
7
|
+
Полная документация доступна в папке [`docs/`](./docs/README.md):
|
|
8
|
+
|
|
9
|
+
- [Компоненты](./docs/components/) - Детальная документация по каждому компоненту
|
|
10
|
+
- [Руководства](./docs/guides/) - Гайды по использованию
|
|
11
|
+
- [Миграция](./docs/migration/) - Обновление версий
|
|
12
|
+
|
|
5
13
|
## Установка
|
|
6
14
|
|
|
7
15
|
```bash
|
package/dist/dxd-style-code.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed as p, createBlock as
|
|
1
|
+
import { computed as p, createBlock as C, openBlock as a, resolveDynamicComponent as O, normalizeClass as f, withCtx as T, renderSlot as V, createElementBlock as n, createCommentVNode as c, createTextVNode as j, createElementVNode as o, toDisplayString as h, normalizeStyle as G, ref as B, createVNode as A, unref as _, inject as Q, Fragment as M, renderList as L, watch as F, Transition as Y, provide as ee, onMounted as U, onBeforeUnmount as te, withDirectives as q, withKeys as E, withModifiers as P, vModelText as K, nextTick as J, vShow as ce, Teleport as ge } from "vue";
|
|
2
2
|
const Os = {
|
|
3
3
|
__name: "DXHeading",
|
|
4
4
|
props: {
|
|
@@ -49,7 +49,7 @@ const Os = {
|
|
|
49
49
|
"tracking-tight",
|
|
50
50
|
t.truncate && "truncate"
|
|
51
51
|
]);
|
|
52
|
-
return (v, b) => (a(),
|
|
52
|
+
return (v, b) => (a(), C(O(l.value), {
|
|
53
53
|
class: f(u.value),
|
|
54
54
|
"data-component": "DXHeading",
|
|
55
55
|
"data-level": e.level
|
|
@@ -111,7 +111,7 @@ const Os = {
|
|
|
111
111
|
t.truncate && "truncate",
|
|
112
112
|
t.lines > 0 && `line-clamp-${t.lines}`
|
|
113
113
|
]);
|
|
114
|
-
return (u, v) => (a(),
|
|
114
|
+
return (u, v) => (a(), C(O(e.tag), {
|
|
115
115
|
class: f(d.value),
|
|
116
116
|
"data-component": "DXText"
|
|
117
117
|
}, {
|
|
@@ -191,7 +191,7 @@ const Os = {
|
|
|
191
191
|
l[t.size] || l.sm,
|
|
192
192
|
"font-mono"
|
|
193
193
|
]);
|
|
194
|
-
return (r, i) => (a(),
|
|
194
|
+
return (r, i) => (a(), C(O(e.block ? "pre" : "code"), {
|
|
195
195
|
class: f(s.value),
|
|
196
196
|
"data-component": "DXCode",
|
|
197
197
|
"data-block": e.block
|
|
@@ -281,7 +281,7 @@ const Os = {
|
|
|
281
281
|
t.marker ? r[t.marker] : t.ordered ? "list-decimal" : "list-disc",
|
|
282
282
|
"pl-5 text-slate-700"
|
|
283
283
|
]);
|
|
284
|
-
return (d, u) => (a(),
|
|
284
|
+
return (d, u) => (a(), C(O(e.ordered ? "ol" : "ul"), {
|
|
285
285
|
class: f(i.value),
|
|
286
286
|
"data-component": "DXList"
|
|
287
287
|
}, {
|
|
@@ -607,7 +607,7 @@ const Os = {
|
|
|
607
607
|
t.shadow && (d[t.shadow] || `shadow-${t.shadow}`),
|
|
608
608
|
t.border && "border border-slate-200"
|
|
609
609
|
]);
|
|
610
|
-
return (v, b) => (a(),
|
|
610
|
+
return (v, b) => (a(), C(O(e.tag), {
|
|
611
611
|
class: f(u.value),
|
|
612
612
|
"data-component": "DXBox"
|
|
613
613
|
}, {
|
|
@@ -882,7 +882,7 @@ const N = (e, t) => {
|
|
|
882
882
|
s[t.animation] || "",
|
|
883
883
|
t.class
|
|
884
884
|
]);
|
|
885
|
-
return (i, d) => (a(),
|
|
885
|
+
return (i, d) => (a(), C(O(e.icon), {
|
|
886
886
|
class: f(r.value),
|
|
887
887
|
"data-component": "DXIcon",
|
|
888
888
|
"data-size": e.size,
|
|
@@ -969,7 +969,7 @@ const N = (e, t) => {
|
|
|
969
969
|
}, null, 40, Ne)) : e.initials ? (a(), n("span", {
|
|
970
970
|
key: 1,
|
|
971
971
|
class: f(["font-medium", b.value])
|
|
972
|
-
}, h(e.initials), 3)) : (a(),
|
|
972
|
+
}, h(e.initials), 3)) : (a(), C(D, {
|
|
973
973
|
key: 2,
|
|
974
974
|
icon: g.value,
|
|
975
975
|
size: y.value,
|
|
@@ -1008,14 +1008,14 @@ const N = (e, t) => {
|
|
|
1008
1008
|
"data-component": "DXBadge",
|
|
1009
1009
|
"data-variant": e.variant
|
|
1010
1010
|
}, [
|
|
1011
|
-
e.iconLeft ? (a(),
|
|
1011
|
+
e.iconLeft ? (a(), C(D, {
|
|
1012
1012
|
key: 0,
|
|
1013
1013
|
icon: e.iconLeft,
|
|
1014
1014
|
size: "xs",
|
|
1015
1015
|
animation: "none"
|
|
1016
1016
|
}, null, 8, ["icon"])) : c("", !0),
|
|
1017
1017
|
V(r.$slots, "default"),
|
|
1018
|
-
e.iconRight ? (a(),
|
|
1018
|
+
e.iconRight ? (a(), C(D, {
|
|
1019
1019
|
key: 1,
|
|
1020
1020
|
icon: e.iconRight,
|
|
1021
1021
|
size: "xs",
|
|
@@ -1060,7 +1060,7 @@ const N = (e, t) => {
|
|
|
1060
1060
|
return "bg-slate-800 text-white hover:bg-slate-700";
|
|
1061
1061
|
}
|
|
1062
1062
|
});
|
|
1063
|
-
return (i, d) => (a(),
|
|
1063
|
+
return (i, d) => (a(), C(O(l.value), {
|
|
1064
1064
|
type: l.value === "button" ? e.type : void 0,
|
|
1065
1065
|
disabled: e.disabled,
|
|
1066
1066
|
to: e.to,
|
|
@@ -1781,7 +1781,7 @@ const yt = ["aria-label"], ve = {
|
|
|
1781
1781
|
onClick: i,
|
|
1782
1782
|
"data-component": "DXDropdownItem"
|
|
1783
1783
|
}, [
|
|
1784
|
-
e.icon ? (a(),
|
|
1784
|
+
e.icon ? (a(), C(O(e.icon), {
|
|
1785
1785
|
key: 0,
|
|
1786
1786
|
class: "w-4 h-4 flex-shrink-0"
|
|
1787
1787
|
})) : c("", !0),
|
|
@@ -1893,7 +1893,7 @@ const Bt = {
|
|
|
1893
1893
|
e.label ? (a(), n("label", Xt, h(e.label), 1)) : c("", !0),
|
|
1894
1894
|
o("div", It, [
|
|
1895
1895
|
e.prefixIcon || s.$slots.prefix ? (a(), n("div", At, [
|
|
1896
|
-
e.prefixIcon ? (a(),
|
|
1896
|
+
e.prefixIcon ? (a(), C(D, {
|
|
1897
1897
|
key: 0,
|
|
1898
1898
|
icon: e.prefixIcon,
|
|
1899
1899
|
size: "sm",
|
|
@@ -1909,7 +1909,7 @@ const Bt = {
|
|
|
1909
1909
|
onInput: r[0] || (r[0] = (i) => s.$emit("update:modelValue", i.target.value))
|
|
1910
1910
|
}, null, 42, jt),
|
|
1911
1911
|
e.suffixIcon || s.$slots.suffix ? (a(), n("div", Mt, [
|
|
1912
|
-
e.suffixIcon ? (a(),
|
|
1912
|
+
e.suffixIcon ? (a(), C(D, {
|
|
1913
1913
|
key: 0,
|
|
1914
1914
|
icon: e.suffixIcon,
|
|
1915
1915
|
size: "sm",
|
|
@@ -1938,7 +1938,7 @@ const Bt = {
|
|
|
1938
1938
|
class: f(["flex items-center px-3 border border-r-0 bg-slate-50 text-slate-600 text-sm first:rounded-l-xl last:rounded-r-xl last:border-r", l.value]),
|
|
1939
1939
|
"data-component": "DXInputGroupAddon"
|
|
1940
1940
|
}, [
|
|
1941
|
-
e.icon ? (a(),
|
|
1941
|
+
e.icon ? (a(), C(O(e.icon), {
|
|
1942
1942
|
key: 0,
|
|
1943
1943
|
class: "w-4 h-4"
|
|
1944
1944
|
})) : c("", !0),
|
|
@@ -2287,7 +2287,7 @@ const to = /* @__PURE__ */ N(Zt, [["render", Nt]]), Pt = {
|
|
|
2287
2287
|
key: w,
|
|
2288
2288
|
class: f(["flex flex-col items-center gap-0.5 transition-transform duration-200", { "scale-110": v(y) }])
|
|
2289
2289
|
}, [
|
|
2290
|
-
e.tickIcons && e.tickIcons[y] ? (a(),
|
|
2290
|
+
e.tickIcons && e.tickIcons[y] ? (a(), C(D, {
|
|
2291
2291
|
key: 0,
|
|
2292
2292
|
icon: e.tickIcons[y],
|
|
2293
2293
|
size: "sm",
|
|
@@ -2350,7 +2350,7 @@ const to = /* @__PURE__ */ N(Zt, [["render", Nt]]), Pt = {
|
|
|
2350
2350
|
key: i(g, w),
|
|
2351
2351
|
class: f([u(g), "inline-flex items-center gap-1.5 transition-all duration-200"])
|
|
2352
2352
|
}, [
|
|
2353
|
-
g.icon ? (a(),
|
|
2353
|
+
g.icon ? (a(), C(D, {
|
|
2354
2354
|
key: 0,
|
|
2355
2355
|
icon: g.icon,
|
|
2356
2356
|
size: e.variant === "large" ? "sm" : "xs",
|
|
@@ -2525,7 +2525,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
2525
2525
|
"data-component": "DXToast",
|
|
2526
2526
|
"data-variant": e.variant
|
|
2527
2527
|
}, [
|
|
2528
|
-
r.value ? (a(),
|
|
2528
|
+
r.value ? (a(), C(D, {
|
|
2529
2529
|
key: 0,
|
|
2530
2530
|
icon: r.value,
|
|
2531
2531
|
size: "md",
|
|
@@ -2624,7 +2624,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
2624
2624
|
"aria-label": e.ariaLabel,
|
|
2625
2625
|
"data-component": "DXToggleButton"
|
|
2626
2626
|
}, [
|
|
2627
|
-
i.value ? (a(),
|
|
2627
|
+
i.value ? (a(), C(D, {
|
|
2628
2628
|
key: 0,
|
|
2629
2629
|
icon: i.value,
|
|
2630
2630
|
size: u.value,
|
|
@@ -2727,7 +2727,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
2727
2727
|
color: "text-blue-500"
|
|
2728
2728
|
}
|
|
2729
2729
|
}, s = p(() => l[t.state] || l.info), r = p(() => s.value.icon), i = p(() => s.value.color);
|
|
2730
|
-
return (d, u) => r.value ? (a(),
|
|
2730
|
+
return (d, u) => r.value ? (a(), C(D, {
|
|
2731
2731
|
key: 0,
|
|
2732
2732
|
icon: r.value,
|
|
2733
2733
|
size: e.size,
|
|
@@ -2888,7 +2888,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
2888
2888
|
"data-variant": e.variant
|
|
2889
2889
|
}, [
|
|
2890
2890
|
o("div", ql, [
|
|
2891
|
-
v.value ? (a(),
|
|
2891
|
+
v.value ? (a(), C(D, {
|
|
2892
2892
|
key: 0,
|
|
2893
2893
|
icon: v.value,
|
|
2894
2894
|
size: "md",
|
|
@@ -2906,7 +2906,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
2906
2906
|
V(y.$slots, "default")
|
|
2907
2907
|
], 2)
|
|
2908
2908
|
]),
|
|
2909
|
-
e.dismissible ? (a(),
|
|
2909
|
+
e.dismissible ? (a(), C(ve, {
|
|
2910
2910
|
key: 1,
|
|
2911
2911
|
size: "sm",
|
|
2912
2912
|
variant: "default",
|
|
@@ -2955,7 +2955,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
2955
2955
|
}, [
|
|
2956
2956
|
m > 0 ? (a(), n("span", Gl, [
|
|
2957
2957
|
V(u.$slots, "separator", {}, () => [
|
|
2958
|
-
e.separator === "chevron" ? (a(),
|
|
2958
|
+
e.separator === "chevron" ? (a(), C(D, {
|
|
2959
2959
|
key: 0,
|
|
2960
2960
|
icon: _(fe),
|
|
2961
2961
|
size: r.value,
|
|
@@ -2963,7 +2963,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
2963
2963
|
}, null, 8, ["icon", "size"])) : (a(), n("span", Ul, "/"))
|
|
2964
2964
|
])
|
|
2965
2965
|
])) : c("", !0),
|
|
2966
|
-
(a(),
|
|
2966
|
+
(a(), C(O(i(b)), {
|
|
2967
2967
|
href: b.href,
|
|
2968
2968
|
to: b.to,
|
|
2969
2969
|
class: f([
|
|
@@ -2973,7 +2973,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
2973
2973
|
"aria-current": m === e.items.length - 1 ? "page" : void 0
|
|
2974
2974
|
}, {
|
|
2975
2975
|
default: T(() => [
|
|
2976
|
-
b.icon ? (a(),
|
|
2976
|
+
b.icon ? (a(), C(D, {
|
|
2977
2977
|
key: 0,
|
|
2978
2978
|
icon: b.icon,
|
|
2979
2979
|
size: r.value,
|
|
@@ -3104,13 +3104,13 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
3104
3104
|
const x = m.value[v.value];
|
|
3105
3105
|
x && y(x);
|
|
3106
3106
|
} else l.allowCustom && d.value && (s("update:modelValue", d.value), u.value = !1);
|
|
3107
|
-
},
|
|
3107
|
+
}, $ = (x) => {
|
|
3108
3108
|
r.value && !r.value.contains(x.target) && (u.value = !1, !l.allowCustom && b.value && (d.value = b.value.label));
|
|
3109
3109
|
};
|
|
3110
3110
|
return F(() => l.modelValue, (x) => {
|
|
3111
3111
|
const k = l.options.find((I) => I.value === x);
|
|
3112
3112
|
d.value = k ? k.label : l.allowCustom ? String(x || "") : "";
|
|
3113
|
-
}, { immediate: !0 }), U(() => document.addEventListener("click",
|
|
3113
|
+
}, { immediate: !0 }), U(() => document.addEventListener("click", $)), te(() => document.removeEventListener("click", $)), (x, k) => (a(), n("div", {
|
|
3114
3114
|
class: "relative",
|
|
3115
3115
|
ref_key: "root",
|
|
3116
3116
|
ref: r,
|
|
@@ -3160,7 +3160,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
3160
3160
|
onMouseenter: (R) => v.value = X
|
|
3161
3161
|
}, [
|
|
3162
3162
|
o("span", aa, [
|
|
3163
|
-
I.icon ? (a(),
|
|
3163
|
+
I.icon ? (a(), C(O(I.icon), {
|
|
3164
3164
|
key: 0,
|
|
3165
3165
|
class: "w-4 h-4 text-slate-500"
|
|
3166
3166
|
})) : c("", !0),
|
|
@@ -3228,13 +3228,13 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
3228
3228
|
"aria-label": `Скопировать ${e.label || "значение"}`,
|
|
3229
3229
|
onClick: i
|
|
3230
3230
|
}, [
|
|
3231
|
-
r.value ? (a(),
|
|
3231
|
+
r.value ? (a(), C(D, {
|
|
3232
3232
|
key: 0,
|
|
3233
3233
|
icon: _(Je),
|
|
3234
3234
|
size: "sm",
|
|
3235
3235
|
animation: e.copiedIconAnimation,
|
|
3236
3236
|
class: "text-emerald-600"
|
|
3237
|
-
}, null, 8, ["icon", "animation"])) : (a(),
|
|
3237
|
+
}, null, 8, ["icon", "animation"])) : (a(), C(D, {
|
|
3238
3238
|
key: 1,
|
|
3239
3239
|
icon: e.copyIcon,
|
|
3240
3240
|
size: "sm",
|
|
@@ -3386,38 +3386,38 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
3386
3386
|
emits: ["update:modelValue", "upload"],
|
|
3387
3387
|
setup(e, { emit: t }) {
|
|
3388
3388
|
const l = e, s = t, r = B(null), i = B(null), d = B(!1), u = B([]), v = B(""), b = (z) => {
|
|
3389
|
-
const
|
|
3390
|
-
y(
|
|
3389
|
+
const $ = Array.from(z.target.files || []);
|
|
3390
|
+
y($);
|
|
3391
3391
|
}, m = (z) => {
|
|
3392
3392
|
var x;
|
|
3393
3393
|
if (d.value = !1, l.disabled) return;
|
|
3394
|
-
const
|
|
3395
|
-
y(
|
|
3394
|
+
const $ = Array.from(((x = z.dataTransfer) == null ? void 0 : x.files) || []);
|
|
3395
|
+
y($);
|
|
3396
3396
|
}, g = () => {
|
|
3397
3397
|
l.disabled || (d.value = !0);
|
|
3398
3398
|
}, w = (z) => {
|
|
3399
3399
|
z.target === i.value && (d.value = !1);
|
|
3400
3400
|
}, y = (z) => {
|
|
3401
3401
|
v.value = "";
|
|
3402
|
-
const
|
|
3402
|
+
const $ = z.map((x) => {
|
|
3403
3403
|
if (x.type.startsWith("image/")) {
|
|
3404
3404
|
const k = URL.createObjectURL(x);
|
|
3405
3405
|
return Object.assign(x, { preview: k });
|
|
3406
3406
|
}
|
|
3407
3407
|
return x;
|
|
3408
3408
|
});
|
|
3409
|
-
l.multiple ? u.value = [...u.value,
|
|
3409
|
+
l.multiple ? u.value = [...u.value, ...$] : u.value = $.slice(0, 1), s("update:modelValue", l.multiple ? u.value : u.value[0]);
|
|
3410
3410
|
}, S = (z) => {
|
|
3411
|
-
const
|
|
3412
|
-
|
|
3411
|
+
const $ = u.value[z];
|
|
3412
|
+
$.preview && URL.revokeObjectURL($.preview), u.value.splice(z, 1), s("update:modelValue", l.multiple ? u.value : u.value[0] || null);
|
|
3413
3413
|
}, Z = (z) => {
|
|
3414
3414
|
if (z === 0) return "0 Bytes";
|
|
3415
|
-
const
|
|
3416
|
-
return Math.round(z / Math.pow(
|
|
3415
|
+
const $ = 1024, x = ["Bytes", "KB", "MB", "GB"], k = Math.floor(Math.log(z) / Math.log($));
|
|
3416
|
+
return Math.round(z / Math.pow($, k) * 100) / 100 + " " + x[k];
|
|
3417
3417
|
};
|
|
3418
3418
|
return F(() => l.modelValue, (z) => {
|
|
3419
3419
|
z || (u.value = []);
|
|
3420
|
-
}), (z,
|
|
3420
|
+
}), (z, $) => (a(), n("div", ka, [
|
|
3421
3421
|
e.label ? (a(), n("label", $a, h(e.label), 1)) : c("", !0),
|
|
3422
3422
|
o("div", {
|
|
3423
3423
|
ref_key: "dropZone",
|
|
@@ -3427,7 +3427,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
3427
3427
|
e.disabled && "opacity-60 cursor-not-allowed"
|
|
3428
3428
|
]]),
|
|
3429
3429
|
onDragenter: P(g, ["prevent"]),
|
|
3430
|
-
onDragover:
|
|
3430
|
+
onDragover: $[2] || ($[2] = P(() => {
|
|
3431
3431
|
}, ["prevent"])),
|
|
3432
3432
|
onDragleave: P(w, ["prevent"]),
|
|
3433
3433
|
onDrop: P(m, ["prevent"])
|
|
@@ -3455,7 +3455,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
3455
3455
|
alt: x.name,
|
|
3456
3456
|
class: "w-full h-full object-cover"
|
|
3457
3457
|
}, null, 8, Ia)
|
|
3458
|
-
])) : (a(),
|
|
3458
|
+
])) : (a(), C(D, {
|
|
3459
3459
|
key: 1,
|
|
3460
3460
|
icon: _(st),
|
|
3461
3461
|
size: "lg",
|
|
@@ -3485,7 +3485,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
3485
3485
|
type: "button",
|
|
3486
3486
|
class: "w-full py-2 text-sm text-slate-600 hover:text-slate-900 border border-slate-200 rounded-lg hover:bg-slate-50",
|
|
3487
3487
|
disabled: e.disabled,
|
|
3488
|
-
onClick:
|
|
3488
|
+
onClick: $[1] || ($[1] = (x) => {
|
|
3489
3489
|
var k;
|
|
3490
3490
|
return (k = r.value) == null ? void 0 : k.click();
|
|
3491
3491
|
})
|
|
@@ -3496,7 +3496,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
3496
3496
|
animation: "none",
|
|
3497
3497
|
class: "inline mr-1"
|
|
3498
3498
|
}, null, 8, ["icon"]),
|
|
3499
|
-
|
|
3499
|
+
$[4] || ($[4] = j(" Добавить ещё ", -1))
|
|
3500
3500
|
], 8, _a)) : c("", !0)
|
|
3501
3501
|
])) : (a(), n("div", Sa, [
|
|
3502
3502
|
A(D, {
|
|
@@ -3506,12 +3506,12 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
3506
3506
|
class: "mx-auto text-slate-400 mb-3 w-12 h-12"
|
|
3507
3507
|
}, null, 8, ["icon"]),
|
|
3508
3508
|
o("p", Va, [
|
|
3509
|
-
|
|
3509
|
+
$[3] || ($[3] = j(" Перетащите файлы сюда или ", -1)),
|
|
3510
3510
|
o("button", {
|
|
3511
3511
|
type: "button",
|
|
3512
3512
|
class: "text-slate-900 underline hover:no-underline",
|
|
3513
3513
|
disabled: e.disabled,
|
|
3514
|
-
onClick:
|
|
3514
|
+
onClick: $[0] || ($[0] = (x) => {
|
|
3515
3515
|
var k;
|
|
3516
3516
|
return (k = r.value) == null ? void 0 : k.click();
|
|
3517
3517
|
})
|
|
@@ -3617,7 +3617,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
3617
3617
|
]),
|
|
3618
3618
|
o("div", Ua, [
|
|
3619
3619
|
s.$slots.prefix || e.prefixIcon ? (a(), n("div", Ka, [
|
|
3620
|
-
e.prefixIcon ? (a(),
|
|
3620
|
+
e.prefixIcon ? (a(), C(D, {
|
|
3621
3621
|
key: 0,
|
|
3622
3622
|
icon: e.prefixIcon,
|
|
3623
3623
|
size: "sm",
|
|
@@ -3915,7 +3915,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
3915
3915
|
]])
|
|
3916
3916
|
}, [
|
|
3917
3917
|
o("div", kn, [
|
|
3918
|
-
e.icon ? (a(),
|
|
3918
|
+
e.icon ? (a(), C(O(e.icon), {
|
|
3919
3919
|
key: 0,
|
|
3920
3920
|
class: f(["w-6 h-6 flex-shrink-0", e.modelValue === e.value ? "text-slate-900" : "text-slate-400"])
|
|
3921
3921
|
}, null, 8, ["class"])) : c("", !0),
|
|
@@ -4083,12 +4083,12 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4083
4083
|
}
|
|
4084
4084
|
}, z = () => {
|
|
4085
4085
|
l.creatable && i.value && (s("create", i.value), i.value = "");
|
|
4086
|
-
},
|
|
4086
|
+
}, $ = (x) => {
|
|
4087
4087
|
d.value && !d.value.contains(x.target) && (r.value = !1, i.value = "");
|
|
4088
4088
|
};
|
|
4089
4089
|
return F(r, (x) => {
|
|
4090
4090
|
x || (i.value = "");
|
|
4091
|
-
}), U(() => document.addEventListener("click",
|
|
4091
|
+
}), U(() => document.addEventListener("click", $)), te(() => document.removeEventListener("click", $)), (x, k) => {
|
|
4092
4092
|
var I;
|
|
4093
4093
|
return a(), n("div", {
|
|
4094
4094
|
class: "relative",
|
|
@@ -4102,7 +4102,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4102
4102
|
key: X.value,
|
|
4103
4103
|
class: "inline-flex items-center gap-1 px-2 py-1 text-xs font-medium bg-slate-100 text-slate-700 rounded-lg"
|
|
4104
4104
|
}, [
|
|
4105
|
-
X.icon ? (a(),
|
|
4105
|
+
X.icon ? (a(), C(O(X.icon), {
|
|
4106
4106
|
key: 0,
|
|
4107
4107
|
class: "w-3 h-3"
|
|
4108
4108
|
})) : c("", !0),
|
|
@@ -4137,7 +4137,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4137
4137
|
onClick: y
|
|
4138
4138
|
}, [
|
|
4139
4139
|
o("span", Ln, [
|
|
4140
|
-
!e.multiple && ((I = v.value) != null && I.icon) ? (a(),
|
|
4140
|
+
!e.multiple && ((I = v.value) != null && I.icon) ? (a(), C(O(v.value.icon), {
|
|
4141
4141
|
key: 0,
|
|
4142
4142
|
class: "w-4 h-4 text-slate-500"
|
|
4143
4143
|
})) : c("", !0),
|
|
@@ -4195,7 +4195,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4195
4195
|
onClick: (R) => S(X.value)
|
|
4196
4196
|
}, [
|
|
4197
4197
|
o("span", Pn, [
|
|
4198
|
-
X.icon ? (a(),
|
|
4198
|
+
X.icon ? (a(), C(O(X.icon), {
|
|
4199
4199
|
key: 0,
|
|
4200
4200
|
class: "w-4 h-4 text-slate-500"
|
|
4201
4201
|
})) : c("", !0),
|
|
@@ -4298,7 +4298,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4298
4298
|
disabled: e.disabled,
|
|
4299
4299
|
onClick: (S) => v(w.value)
|
|
4300
4300
|
}, [
|
|
4301
|
-
w.icon ? (a(),
|
|
4301
|
+
w.icon ? (a(), C(D, {
|
|
4302
4302
|
key: 0,
|
|
4303
4303
|
icon: w.icon,
|
|
4304
4304
|
size: "xs",
|
|
@@ -4350,7 +4350,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4350
4350
|
"aria-expanded": s(m)
|
|
4351
4351
|
}, [
|
|
4352
4352
|
o("span", Yn, [
|
|
4353
|
-
b.icon ? (a(),
|
|
4353
|
+
b.icon ? (a(), C(D, {
|
|
4354
4354
|
key: 0,
|
|
4355
4355
|
icon: b.icon,
|
|
4356
4356
|
size: "md",
|
|
@@ -4445,7 +4445,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4445
4445
|
},
|
|
4446
4446
|
setup(e) {
|
|
4447
4447
|
return (t, l) => (a(), n("div", ts, [
|
|
4448
|
-
(a(),
|
|
4448
|
+
(a(), C(O(e.icon), {
|
|
4449
4449
|
class: f(["w-10 h-10 text-slate-500 mx-auto", e.animated && "animate-bounce-slow"])
|
|
4450
4450
|
}, null, 8, ["class"])),
|
|
4451
4451
|
o("p", ls, h(e.title), 1),
|
|
@@ -4528,7 +4528,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4528
4528
|
return "max-w-xl";
|
|
4529
4529
|
}
|
|
4530
4530
|
});
|
|
4531
|
-
return (g, w) => (a(),
|
|
4531
|
+
return (g, w) => (a(), C(ge, { to: "body" }, [
|
|
4532
4532
|
A(Y, {
|
|
4533
4533
|
name: u.value,
|
|
4534
4534
|
onAfterEnter: w[1] || (w[1] = (y) => g.$emit("opened")),
|
|
@@ -4559,10 +4559,10 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4559
4559
|
title: y.label,
|
|
4560
4560
|
onClick: (S) => d(y.value)
|
|
4561
4561
|
}, [
|
|
4562
|
-
(a(),
|
|
4562
|
+
(a(), C(O(y.icon), { class: "h-4 w-4" }))
|
|
4563
4563
|
], 10, ds)), 64))
|
|
4564
4564
|
])) : c("", !0),
|
|
4565
|
-
e.closable ? (a(),
|
|
4565
|
+
e.closable ? (a(), C(ve, {
|
|
4566
4566
|
key: 1,
|
|
4567
4567
|
size: "md",
|
|
4568
4568
|
variant: "default",
|
|
@@ -4636,7 +4636,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4636
4636
|
onClick: d
|
|
4637
4637
|
}, [
|
|
4638
4638
|
o("div", bs, [
|
|
4639
|
-
e.item.icon ? (a(),
|
|
4639
|
+
e.item.icon ? (a(), C(D, {
|
|
4640
4640
|
key: 0,
|
|
4641
4641
|
icon: e.item.icon,
|
|
4642
4642
|
size: "md",
|
|
@@ -4645,7 +4645,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4645
4645
|
}, null, 8, ["icon", "class"])) : c("", !0),
|
|
4646
4646
|
e.compact ? c("", !0) : (a(), n("span", gs, h(e.item.label), 1))
|
|
4647
4647
|
]),
|
|
4648
|
-
e.compact ? c("", !0) : (a(),
|
|
4648
|
+
e.compact ? c("", !0) : (a(), C(D, {
|
|
4649
4649
|
key: 0,
|
|
4650
4650
|
icon: _(W),
|
|
4651
4651
|
size: "sm",
|
|
@@ -4664,8 +4664,8 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4664
4664
|
default: T(() => [
|
|
4665
4665
|
q(o("div", xs, [
|
|
4666
4666
|
o("div", ys, [
|
|
4667
|
-
(a(!0), n(M, null, L(e.item.children, (z,
|
|
4668
|
-
key:
|
|
4667
|
+
(a(!0), n(M, null, L(e.item.children, (z, $) => (a(), C(O(v(z)), {
|
|
4668
|
+
key: $,
|
|
4669
4669
|
to: z.to,
|
|
4670
4670
|
href: z.href,
|
|
4671
4671
|
class: f(g(z)),
|
|
@@ -4673,7 +4673,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4673
4673
|
}, {
|
|
4674
4674
|
default: T(() => [
|
|
4675
4675
|
j(h(z.label) + " ", 1),
|
|
4676
|
-
z.badge ? (a(),
|
|
4676
|
+
z.badge ? (a(), C(ie, {
|
|
4677
4677
|
key: 0,
|
|
4678
4678
|
variant: z.badgeVariant || "info",
|
|
4679
4679
|
size: "sm",
|
|
@@ -4694,7 +4694,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4694
4694
|
]),
|
|
4695
4695
|
_: 1
|
|
4696
4696
|
})
|
|
4697
|
-
])) : (a(),
|
|
4697
|
+
])) : (a(), C(O(u.value), {
|
|
4698
4698
|
key: 0,
|
|
4699
4699
|
to: e.item.to,
|
|
4700
4700
|
href: e.item.href,
|
|
@@ -4703,7 +4703,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4703
4703
|
}, {
|
|
4704
4704
|
default: T(() => [
|
|
4705
4705
|
o("div", ps, [
|
|
4706
|
-
e.item.icon ? (a(),
|
|
4706
|
+
e.item.icon ? (a(), C(D, {
|
|
4707
4707
|
key: 0,
|
|
4708
4708
|
icon: e.item.icon,
|
|
4709
4709
|
size: "md",
|
|
@@ -4712,7 +4712,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4712
4712
|
}, null, 8, ["icon", "class"])) : c("", !0),
|
|
4713
4713
|
e.compact ? c("", !0) : (a(), n("span", vs, h(e.item.label), 1))
|
|
4714
4714
|
]),
|
|
4715
|
-
e.item.badge && !e.compact ? (a(),
|
|
4715
|
+
e.item.badge && !e.compact ? (a(), C(ie, {
|
|
4716
4716
|
key: 0,
|
|
4717
4717
|
variant: e.item.badgeVariant || "info",
|
|
4718
4718
|
size: "sm"
|
|
@@ -4780,6 +4780,12 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4780
4780
|
type: Boolean,
|
|
4781
4781
|
default: !1
|
|
4782
4782
|
},
|
|
4783
|
+
/** Вариант отображения: sidebar | embedded */
|
|
4784
|
+
variant: {
|
|
4785
|
+
type: String,
|
|
4786
|
+
default: "sidebar",
|
|
4787
|
+
validator: (e) => ["sidebar", "embedded"].includes(e)
|
|
4788
|
+
},
|
|
4783
4789
|
/** Показывать бордер справа */
|
|
4784
4790
|
bordered: {
|
|
4785
4791
|
type: Boolean,
|
|
@@ -4802,13 +4808,22 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4802
4808
|
md: "w-80",
|
|
4803
4809
|
lg: "w-96",
|
|
4804
4810
|
full: "w-full"
|
|
4805
|
-
}, b = p(() =>
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4811
|
+
}, b = p(() => {
|
|
4812
|
+
const $ = l.variant === "embedded";
|
|
4813
|
+
return [
|
|
4814
|
+
"flex flex-col bg-white transition-all duration-300",
|
|
4815
|
+
// Ширина только для sidebar режима
|
|
4816
|
+
!$ && (i.value ? "w-20" : v[l.width]),
|
|
4817
|
+
// Фиксированная позиция только для sidebar
|
|
4818
|
+
!$ && l.fixed && "fixed top-0 left-0 h-screen",
|
|
4819
|
+
// Бордер
|
|
4820
|
+
l.bordered && ($ ? "border border-slate-200 rounded-xl" : "border-r border-slate-200"),
|
|
4821
|
+
// Тень только для sidebar
|
|
4822
|
+
$ ? "" : "shadow-sm",
|
|
4823
|
+
// Для embedded - полная ширина и высота
|
|
4824
|
+
$ && "w-full h-full"
|
|
4825
|
+
];
|
|
4826
|
+
}), m = p(() => [
|
|
4812
4827
|
"flex items-center gap-2 border-b border-slate-200 flex-shrink-0",
|
|
4813
4828
|
i.value ? "justify-center px-2 py-3" : "px-4 py-5"
|
|
4814
4829
|
]), g = p(() => [
|
|
@@ -4819,37 +4834,37 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4819
4834
|
i.value && "px-2"
|
|
4820
4835
|
]), y = p(() => {
|
|
4821
4836
|
if (!r.value.trim()) return l.sections;
|
|
4822
|
-
const
|
|
4837
|
+
const $ = r.value.toLowerCase();
|
|
4823
4838
|
return l.sections.map((x) => ({
|
|
4824
4839
|
...x,
|
|
4825
4840
|
items: x.items.filter((k) => {
|
|
4826
4841
|
var R, oe;
|
|
4827
|
-
const I = (R = k.label) == null ? void 0 : R.toLowerCase().includes(
|
|
4842
|
+
const I = (R = k.label) == null ? void 0 : R.toLowerCase().includes($), X = (oe = k.children) == null ? void 0 : oe.some(
|
|
4828
4843
|
(be) => {
|
|
4829
4844
|
var re;
|
|
4830
|
-
return (re = be.label) == null ? void 0 : re.toLowerCase().includes(
|
|
4845
|
+
return (re = be.label) == null ? void 0 : re.toLowerCase().includes($);
|
|
4831
4846
|
}
|
|
4832
4847
|
);
|
|
4833
4848
|
return I || X;
|
|
4834
4849
|
})
|
|
4835
4850
|
})).filter((x) => x.items.length > 0);
|
|
4836
|
-
}), S = (
|
|
4851
|
+
}), S = ($) => l.activeItem ? $.to === l.activeItem || $.id === l.activeItem ? !0 : $.children ? $.children.some(
|
|
4837
4852
|
(x) => x.to === l.activeItem || x.id === l.activeItem
|
|
4838
4853
|
) : !1 : !1, Z = () => {
|
|
4839
4854
|
i.value = !i.value, s("update:compact", i.value);
|
|
4840
|
-
}, z = (
|
|
4841
|
-
s("item-click",
|
|
4855
|
+
}, z = ($, x) => {
|
|
4856
|
+
s("item-click", $, x);
|
|
4842
4857
|
};
|
|
4843
|
-
return (
|
|
4858
|
+
return ($, x) => (a(), n("aside", {
|
|
4844
4859
|
class: f(b.value),
|
|
4845
4860
|
"data-component": "DXSidebarMenu",
|
|
4846
4861
|
"data-compact": d.value
|
|
4847
4862
|
}, [
|
|
4848
|
-
|
|
4863
|
+
$.$slots.header || e.title || e.collapsible ? (a(), n("div", {
|
|
4849
4864
|
key: 0,
|
|
4850
4865
|
class: f(m.value)
|
|
4851
4866
|
}, [
|
|
4852
|
-
d.value ? c("", !0) : V(
|
|
4867
|
+
d.value ? c("", !0) : V($.$slots, "header", { key: 0 }, () => [
|
|
4853
4868
|
e.title ? (a(), n("h2", Cs, h(e.title), 1)) : c("", !0)
|
|
4854
4869
|
], !0),
|
|
4855
4870
|
e.collapsible ? (a(), n("button", {
|
|
@@ -4892,11 +4907,11 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4892
4907
|
class: "space-y-1"
|
|
4893
4908
|
}, [
|
|
4894
4909
|
k.title && !d.value ? (a(), n("div", Ds, h(k.title), 1)) : c("", !0),
|
|
4895
|
-
k.title && d.value ? (a(),
|
|
4910
|
+
k.title && d.value ? (a(), C(Ct, {
|
|
4896
4911
|
key: 1,
|
|
4897
4912
|
spacing: "sm"
|
|
4898
4913
|
})) : c("", !0),
|
|
4899
|
-
(a(!0), n(M, null, L(k.items, (X, R) => (a(),
|
|
4914
|
+
(a(!0), n(M, null, L(k.items, (X, R) => (a(), C(ks, {
|
|
4900
4915
|
key: R,
|
|
4901
4916
|
item: X,
|
|
4902
4917
|
active: S(X),
|
|
@@ -4906,15 +4921,15 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4906
4921
|
}, null, 8, ["item", "active", "compact"]))), 128))
|
|
4907
4922
|
]))), 128))
|
|
4908
4923
|
], 2),
|
|
4909
|
-
|
|
4924
|
+
$.$slots.footer && !d.value ? (a(), n("div", {
|
|
4910
4925
|
key: 2,
|
|
4911
4926
|
class: f(w.value)
|
|
4912
4927
|
}, [
|
|
4913
|
-
V(
|
|
4928
|
+
V($.$slots, "footer", {}, void 0, !0)
|
|
4914
4929
|
], 2)) : c("", !0)
|
|
4915
4930
|
], 10, $s));
|
|
4916
4931
|
}
|
|
4917
|
-
}, Zo = /* @__PURE__ */ N(zs, [["__scopeId", "data-v-
|
|
4932
|
+
}, Zo = /* @__PURE__ */ N(zs, [["__scopeId", "data-v-76f0ab96"]]), Bs = {
|
|
4918
4933
|
class: "border border-slate-200 rounded-2xl overflow-hidden",
|
|
4919
4934
|
"data-component": "DXTable"
|
|
4920
4935
|
}, Xs = { class: "min-w-full divide-y divide-slate-200" }, Is = { class: "bg-slate-50" }, As = { class: "divide-y divide-slate-200 bg-white" }, To = {
|
|
@@ -4965,7 +4980,7 @@ const zl = ["data-variant"], Bl = { class: "flex-1" }, mo = {
|
|
|
4965
4980
|
onClick: (d) => s.$emit("update:modelValue", i.value)
|
|
4966
4981
|
}, [
|
|
4967
4982
|
o("span", Ls, [
|
|
4968
|
-
i.icon ? (a(),
|
|
4983
|
+
i.icon ? (a(), C(D, {
|
|
4969
4984
|
key: 0,
|
|
4970
4985
|
icon: i.icon,
|
|
4971
4986
|
size: "sm",
|