dxd-style-code 0.1.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/README.md +202 -0
- package/dist/dxd-style-code.js +4784 -0
- package/dist/dxd-style-code.umd.cjs +1 -0
- package/dist/style.css +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,4784 @@
|
|
|
1
|
+
import { computed as g, createBlock as C, openBlock as a, resolveDynamicComponent as L, normalizeClass as f, withCtx as P, renderSlot as $, createElementBlock as n, createCommentVNode as c, createTextVNode as j, createElementVNode as o, toDisplayString as b, normalizeStyle as E, ref as D, createVNode as A, unref as O, inject as oe, Fragment as M, renderList as _, watch as H, Transition as Y, provide as re, onMounted as U, onBeforeUnmount as J, withDirectives as q, withKeys as R, withModifiers as N, vModelText as G, nextTick as W, vShow as fe, Teleport as pe } from "vue";
|
|
2
|
+
const ms = {
|
|
3
|
+
__name: "DXHeading",
|
|
4
|
+
props: {
|
|
5
|
+
/** Уровень заголовка: 1-6 */
|
|
6
|
+
level: { type: [Number, String], default: 1 },
|
|
7
|
+
/** Размер (переопределяет level): xs | sm | md | lg | xl | 2xl | 3xl | 4xl */
|
|
8
|
+
size: { type: String, default: "" },
|
|
9
|
+
/** Вес шрифта: normal | medium | semibold | bold */
|
|
10
|
+
weight: { type: String, default: "semibold" },
|
|
11
|
+
/** Цвет: default | muted | primary | success | warning | danger */
|
|
12
|
+
color: { type: String, default: "default" },
|
|
13
|
+
/** Обрезать текст с ... */
|
|
14
|
+
truncate: { type: Boolean, default: !1 }
|
|
15
|
+
},
|
|
16
|
+
setup(e) {
|
|
17
|
+
const t = e, l = g(() => `h${t.level}`), s = {
|
|
18
|
+
xs: "text-xs",
|
|
19
|
+
sm: "text-sm",
|
|
20
|
+
md: "text-base",
|
|
21
|
+
lg: "text-lg",
|
|
22
|
+
xl: "text-xl",
|
|
23
|
+
"2xl": "text-2xl",
|
|
24
|
+
"3xl": "text-3xl",
|
|
25
|
+
"4xl": "text-4xl"
|
|
26
|
+
}, r = {
|
|
27
|
+
1: "text-4xl",
|
|
28
|
+
2: "text-3xl",
|
|
29
|
+
3: "text-2xl",
|
|
30
|
+
4: "text-xl",
|
|
31
|
+
5: "text-lg",
|
|
32
|
+
6: "text-base"
|
|
33
|
+
}, i = {
|
|
34
|
+
normal: "font-normal",
|
|
35
|
+
medium: "font-medium",
|
|
36
|
+
semibold: "font-semibold",
|
|
37
|
+
bold: "font-bold"
|
|
38
|
+
}, d = {
|
|
39
|
+
default: "text-slate-900",
|
|
40
|
+
muted: "text-slate-500",
|
|
41
|
+
primary: "text-slate-800",
|
|
42
|
+
success: "text-emerald-700",
|
|
43
|
+
warning: "text-amber-700",
|
|
44
|
+
danger: "text-rose-700"
|
|
45
|
+
}, u = g(() => [
|
|
46
|
+
t.size ? s[t.size] : r[t.level],
|
|
47
|
+
i[t.weight] || i.semibold,
|
|
48
|
+
d[t.color] || d.default,
|
|
49
|
+
"tracking-tight",
|
|
50
|
+
t.truncate && "truncate"
|
|
51
|
+
]);
|
|
52
|
+
return (p, v) => (a(), C(L(l.value), {
|
|
53
|
+
class: f(u.value),
|
|
54
|
+
"data-component": "DXHeading",
|
|
55
|
+
"data-level": e.level
|
|
56
|
+
}, {
|
|
57
|
+
default: P(() => [
|
|
58
|
+
$(p.$slots, "default")
|
|
59
|
+
]),
|
|
60
|
+
_: 3
|
|
61
|
+
}, 8, ["class", "data-level"]));
|
|
62
|
+
}
|
|
63
|
+
}, fs = {
|
|
64
|
+
__name: "DXText",
|
|
65
|
+
props: {
|
|
66
|
+
/** Тег: p | span | div */
|
|
67
|
+
tag: { type: String, default: "p" },
|
|
68
|
+
/** Размер: xs | sm | md | lg | xl */
|
|
69
|
+
size: { type: String, default: "md" },
|
|
70
|
+
/** Вес шрифта: normal | medium | semibold | bold */
|
|
71
|
+
weight: { type: String, default: "normal" },
|
|
72
|
+
/** Цвет: default | muted | primary | success | warning | danger */
|
|
73
|
+
color: { type: String, default: "default" },
|
|
74
|
+
/** Выравнивание: left | center | right | justify */
|
|
75
|
+
align: { type: String, default: "left" },
|
|
76
|
+
/** Обрезать текст с ... */
|
|
77
|
+
truncate: { type: Boolean, default: !1 },
|
|
78
|
+
/** Максимум строк (line-clamp) */
|
|
79
|
+
lines: { type: Number, default: 0 }
|
|
80
|
+
},
|
|
81
|
+
setup(e) {
|
|
82
|
+
const t = e, l = {
|
|
83
|
+
xs: "text-xs",
|
|
84
|
+
sm: "text-sm",
|
|
85
|
+
md: "text-base",
|
|
86
|
+
lg: "text-lg",
|
|
87
|
+
xl: "text-xl"
|
|
88
|
+
}, s = {
|
|
89
|
+
normal: "font-normal",
|
|
90
|
+
medium: "font-medium",
|
|
91
|
+
semibold: "font-semibold",
|
|
92
|
+
bold: "font-bold"
|
|
93
|
+
}, r = {
|
|
94
|
+
default: "text-slate-700",
|
|
95
|
+
muted: "text-slate-500",
|
|
96
|
+
primary: "text-slate-900",
|
|
97
|
+
success: "text-emerald-700",
|
|
98
|
+
warning: "text-amber-700",
|
|
99
|
+
danger: "text-rose-700"
|
|
100
|
+
}, i = {
|
|
101
|
+
left: "text-left",
|
|
102
|
+
center: "text-center",
|
|
103
|
+
right: "text-right",
|
|
104
|
+
justify: "text-justify"
|
|
105
|
+
}, d = g(() => [
|
|
106
|
+
l[t.size] || l.md,
|
|
107
|
+
s[t.weight] || s.normal,
|
|
108
|
+
r[t.color] || r.default,
|
|
109
|
+
i[t.align] || i.left,
|
|
110
|
+
"leading-relaxed",
|
|
111
|
+
t.truncate && "truncate",
|
|
112
|
+
t.lines > 0 && `line-clamp-${t.lines}`
|
|
113
|
+
]);
|
|
114
|
+
return (u, p) => (a(), C(L(e.tag), {
|
|
115
|
+
class: f(d.value),
|
|
116
|
+
"data-component": "DXText"
|
|
117
|
+
}, {
|
|
118
|
+
default: P(() => [
|
|
119
|
+
$(u.$slots, "default")
|
|
120
|
+
]),
|
|
121
|
+
_: 3
|
|
122
|
+
}, 8, ["class"]));
|
|
123
|
+
}
|
|
124
|
+
}, ge = ["for"], ve = {
|
|
125
|
+
key: 0,
|
|
126
|
+
class: "text-rose-500 ml-0.5"
|
|
127
|
+
}, ps = {
|
|
128
|
+
__name: "DXLabel",
|
|
129
|
+
props: {
|
|
130
|
+
/** ID связанного input */
|
|
131
|
+
htmlFor: { type: String, default: "" },
|
|
132
|
+
/** Размер: xs | sm | md | lg */
|
|
133
|
+
size: { type: String, default: "sm" },
|
|
134
|
+
/** Вес шрифта: normal | medium | semibold */
|
|
135
|
+
weight: { type: String, default: "medium" },
|
|
136
|
+
/** Цвет: default | muted | primary */
|
|
137
|
+
color: { type: String, default: "default" },
|
|
138
|
+
/** Обязательное поле */
|
|
139
|
+
required: { type: Boolean, default: !1 }
|
|
140
|
+
},
|
|
141
|
+
setup(e) {
|
|
142
|
+
const t = e, l = {
|
|
143
|
+
xs: "text-xs",
|
|
144
|
+
sm: "text-sm",
|
|
145
|
+
md: "text-base",
|
|
146
|
+
lg: "text-lg"
|
|
147
|
+
}, s = {
|
|
148
|
+
normal: "font-normal",
|
|
149
|
+
medium: "font-medium",
|
|
150
|
+
semibold: "font-semibold"
|
|
151
|
+
}, r = {
|
|
152
|
+
default: "text-slate-700",
|
|
153
|
+
muted: "text-slate-500",
|
|
154
|
+
primary: "text-slate-900"
|
|
155
|
+
}, i = g(() => [
|
|
156
|
+
"block",
|
|
157
|
+
l[t.size] || l.sm,
|
|
158
|
+
s[t.weight] || s.medium,
|
|
159
|
+
r[t.color] || r.default
|
|
160
|
+
]);
|
|
161
|
+
return (d, u) => (a(), n("label", {
|
|
162
|
+
class: f(i.value),
|
|
163
|
+
for: e.htmlFor,
|
|
164
|
+
"data-component": "DXLabel"
|
|
165
|
+
}, [
|
|
166
|
+
$(d.$slots, "default"),
|
|
167
|
+
e.required ? (a(), n("span", ve, "*")) : c("", !0)
|
|
168
|
+
], 10, ge));
|
|
169
|
+
}
|
|
170
|
+
}, be = { key: 0 }, gs = {
|
|
171
|
+
__name: "DXCode",
|
|
172
|
+
props: {
|
|
173
|
+
/** Блочный код (pre) или inline */
|
|
174
|
+
block: { type: Boolean, default: !1 },
|
|
175
|
+
/** Размер: xs | sm | md */
|
|
176
|
+
size: { type: String, default: "sm" },
|
|
177
|
+
/** Показывать номера строк (только для block) */
|
|
178
|
+
lineNumbers: { type: Boolean, default: !1 }
|
|
179
|
+
},
|
|
180
|
+
setup(e) {
|
|
181
|
+
const t = e, l = {
|
|
182
|
+
xs: "text-xs",
|
|
183
|
+
sm: "text-sm",
|
|
184
|
+
md: "text-base"
|
|
185
|
+
}, s = g(() => t.block ? [
|
|
186
|
+
"block w-full overflow-x-auto rounded-xl bg-slate-900 text-slate-100 p-4",
|
|
187
|
+
l[t.size] || l.sm,
|
|
188
|
+
"font-mono leading-relaxed"
|
|
189
|
+
] : [
|
|
190
|
+
"inline-block px-1.5 py-0.5 rounded bg-slate-100 text-slate-800",
|
|
191
|
+
l[t.size] || l.sm,
|
|
192
|
+
"font-mono"
|
|
193
|
+
]);
|
|
194
|
+
return (r, i) => (a(), C(L(e.block ? "pre" : "code"), {
|
|
195
|
+
class: f(s.value),
|
|
196
|
+
"data-component": "DXCode",
|
|
197
|
+
"data-block": e.block
|
|
198
|
+
}, {
|
|
199
|
+
default: P(() => [
|
|
200
|
+
e.block ? (a(), n("code", be, [
|
|
201
|
+
$(r.$slots, "default")
|
|
202
|
+
])) : $(r.$slots, "default", { key: 1 })
|
|
203
|
+
]),
|
|
204
|
+
_: 3
|
|
205
|
+
}, 8, ["class", "data-block"]));
|
|
206
|
+
}
|
|
207
|
+
}, he = ["data-variant"], xe = {
|
|
208
|
+
key: 0,
|
|
209
|
+
class: "mt-2 text-sm text-slate-500"
|
|
210
|
+
}, vs = {
|
|
211
|
+
__name: "DXBlockquote",
|
|
212
|
+
props: {
|
|
213
|
+
/** Вариант: default | bordered | highlighted */
|
|
214
|
+
variant: { type: String, default: "bordered" },
|
|
215
|
+
/** Размер: sm | md | lg */
|
|
216
|
+
size: { type: String, default: "md" },
|
|
217
|
+
/** Источник цитаты */
|
|
218
|
+
cite: { type: String, default: "" }
|
|
219
|
+
},
|
|
220
|
+
setup(e) {
|
|
221
|
+
const t = e, l = {
|
|
222
|
+
sm: "text-sm",
|
|
223
|
+
md: "text-base",
|
|
224
|
+
lg: "text-lg"
|
|
225
|
+
}, s = {
|
|
226
|
+
default: "text-slate-600 italic",
|
|
227
|
+
bordered: "border-l-4 border-slate-300 pl-4 text-slate-600 italic",
|
|
228
|
+
highlighted: "bg-slate-50 border-l-4 border-slate-400 pl-4 pr-4 py-3 rounded-r-lg text-slate-700"
|
|
229
|
+
}, r = g(() => [
|
|
230
|
+
l[t.size] || l.md,
|
|
231
|
+
s[t.variant] || s.bordered,
|
|
232
|
+
"leading-relaxed"
|
|
233
|
+
]);
|
|
234
|
+
return (i, d) => (a(), n("blockquote", {
|
|
235
|
+
class: f(r.value),
|
|
236
|
+
"data-component": "DXBlockquote",
|
|
237
|
+
"data-variant": e.variant
|
|
238
|
+
}, [
|
|
239
|
+
$(i.$slots, "default"),
|
|
240
|
+
e.cite || i.$slots.cite ? (a(), n("footer", xe, [
|
|
241
|
+
d[0] || (d[0] = j(" — ", -1)),
|
|
242
|
+
o("cite", null, [
|
|
243
|
+
$(i.$slots, "cite", {}, () => [
|
|
244
|
+
j(b(e.cite), 1)
|
|
245
|
+
])
|
|
246
|
+
])
|
|
247
|
+
])) : c("", !0)
|
|
248
|
+
], 10, he));
|
|
249
|
+
}
|
|
250
|
+
}, bs = {
|
|
251
|
+
__name: "DXList",
|
|
252
|
+
props: {
|
|
253
|
+
/** Нумерованный список */
|
|
254
|
+
ordered: { type: Boolean, default: !1 },
|
|
255
|
+
/** Стиль маркеров: disc | circle | square | decimal | none */
|
|
256
|
+
marker: { type: String, default: "" },
|
|
257
|
+
/** Размер: sm | md | lg */
|
|
258
|
+
size: { type: String, default: "md" },
|
|
259
|
+
/** Отступ между элементами: none | sm | md | lg */
|
|
260
|
+
spacing: { type: String, default: "sm" }
|
|
261
|
+
},
|
|
262
|
+
setup(e) {
|
|
263
|
+
const t = e, l = {
|
|
264
|
+
sm: "text-sm",
|
|
265
|
+
md: "text-base",
|
|
266
|
+
lg: "text-lg"
|
|
267
|
+
}, s = {
|
|
268
|
+
none: "space-y-0",
|
|
269
|
+
sm: "space-y-1",
|
|
270
|
+
md: "space-y-2",
|
|
271
|
+
lg: "space-y-3"
|
|
272
|
+
}, r = {
|
|
273
|
+
disc: "list-disc",
|
|
274
|
+
circle: "list-circle",
|
|
275
|
+
square: "list-square",
|
|
276
|
+
decimal: "list-decimal",
|
|
277
|
+
none: "list-none"
|
|
278
|
+
}, i = g(() => [
|
|
279
|
+
l[t.size] || l.md,
|
|
280
|
+
s[t.spacing] || s.sm,
|
|
281
|
+
t.marker ? r[t.marker] : t.ordered ? "list-decimal" : "list-disc",
|
|
282
|
+
"pl-5 text-slate-700"
|
|
283
|
+
]);
|
|
284
|
+
return (d, u) => (a(), C(L(e.ordered ? "ol" : "ul"), {
|
|
285
|
+
class: f(i.value),
|
|
286
|
+
"data-component": "DXList"
|
|
287
|
+
}, {
|
|
288
|
+
default: P(() => [
|
|
289
|
+
$(d.$slots, "default")
|
|
290
|
+
]),
|
|
291
|
+
_: 3
|
|
292
|
+
}, 8, ["class"]));
|
|
293
|
+
}
|
|
294
|
+
}, ye = ["data-size"], hs = {
|
|
295
|
+
__name: "DXContainer",
|
|
296
|
+
props: {
|
|
297
|
+
/** Максимальная ширина: sm | md | lg | xl | 2xl | full */
|
|
298
|
+
size: { type: String, default: "lg" },
|
|
299
|
+
/** Центрировать контейнер */
|
|
300
|
+
center: { type: Boolean, default: !0 },
|
|
301
|
+
/** Горизонтальные отступы: none | sm | md | lg */
|
|
302
|
+
padding: { type: String, default: "md" }
|
|
303
|
+
},
|
|
304
|
+
setup(e) {
|
|
305
|
+
const t = e, l = {
|
|
306
|
+
sm: "max-w-screen-sm",
|
|
307
|
+
md: "max-w-screen-md",
|
|
308
|
+
lg: "max-w-screen-lg",
|
|
309
|
+
xl: "max-w-screen-xl",
|
|
310
|
+
"2xl": "max-w-screen-2xl",
|
|
311
|
+
full: "max-w-full"
|
|
312
|
+
}, s = {
|
|
313
|
+
none: "",
|
|
314
|
+
sm: "px-4",
|
|
315
|
+
md: "px-6",
|
|
316
|
+
lg: "px-8"
|
|
317
|
+
}, r = g(() => [
|
|
318
|
+
"w-full",
|
|
319
|
+
l[t.size] || l.lg,
|
|
320
|
+
s[t.padding] || s.md,
|
|
321
|
+
t.center && "mx-auto"
|
|
322
|
+
]);
|
|
323
|
+
return (i, d) => (a(), n("div", {
|
|
324
|
+
class: f(r.value),
|
|
325
|
+
"data-component": "DXContainer",
|
|
326
|
+
"data-size": e.size
|
|
327
|
+
}, [
|
|
328
|
+
$(i.$slots, "default")
|
|
329
|
+
], 10, ye));
|
|
330
|
+
}
|
|
331
|
+
}, xs = {
|
|
332
|
+
__name: "DXGrid",
|
|
333
|
+
props: {
|
|
334
|
+
/** Количество колонок: 1-12 или auto */
|
|
335
|
+
cols: { type: [Number, String], default: 12 },
|
|
336
|
+
/** Количество колонок на sm */
|
|
337
|
+
colsSm: { type: [Number, String], default: "" },
|
|
338
|
+
/** Количество колонок на md */
|
|
339
|
+
colsMd: { type: [Number, String], default: "" },
|
|
340
|
+
/** Количество колонок на lg */
|
|
341
|
+
colsLg: { type: [Number, String], default: "" },
|
|
342
|
+
/** Отступ между элементами: none | xs | sm | md | lg | xl */
|
|
343
|
+
gap: { type: String, default: "md" },
|
|
344
|
+
/** Горизонтальный отступ */
|
|
345
|
+
gapX: { type: String, default: "" },
|
|
346
|
+
/** Вертикальный отступ */
|
|
347
|
+
gapY: { type: String, default: "" }
|
|
348
|
+
},
|
|
349
|
+
setup(e) {
|
|
350
|
+
const t = e, l = {
|
|
351
|
+
none: "gap-0",
|
|
352
|
+
xs: "gap-1",
|
|
353
|
+
sm: "gap-2",
|
|
354
|
+
md: "gap-4",
|
|
355
|
+
lg: "gap-6",
|
|
356
|
+
xl: "gap-8"
|
|
357
|
+
}, s = {
|
|
358
|
+
1: "grid-cols-1",
|
|
359
|
+
2: "grid-cols-2",
|
|
360
|
+
3: "grid-cols-3",
|
|
361
|
+
4: "grid-cols-4",
|
|
362
|
+
5: "grid-cols-5",
|
|
363
|
+
6: "grid-cols-6",
|
|
364
|
+
7: "grid-cols-7",
|
|
365
|
+
8: "grid-cols-8",
|
|
366
|
+
9: "grid-cols-9",
|
|
367
|
+
10: "grid-cols-10",
|
|
368
|
+
11: "grid-cols-11",
|
|
369
|
+
12: "grid-cols-12",
|
|
370
|
+
auto: "grid-cols-[repeat(auto-fit,minmax(250px,1fr))]"
|
|
371
|
+
}, r = g(() => [
|
|
372
|
+
"grid",
|
|
373
|
+
s[t.cols] || `grid-cols-${t.cols}`,
|
|
374
|
+
t.colsSm && `sm:grid-cols-${t.colsSm}`,
|
|
375
|
+
t.colsMd && `md:grid-cols-${t.colsMd}`,
|
|
376
|
+
t.colsLg && `lg:grid-cols-${t.colsLg}`,
|
|
377
|
+
!t.gapX && !t.gapY && (l[t.gap] || l.md),
|
|
378
|
+
t.gapX && `gap-x-${t.gapX}`,
|
|
379
|
+
t.gapY && `gap-y-${t.gapY}`
|
|
380
|
+
]), i = g(() => t.cols === "auto" ? {} : {});
|
|
381
|
+
return (d, u) => (a(), n("div", {
|
|
382
|
+
class: f(r.value),
|
|
383
|
+
style: E(i.value),
|
|
384
|
+
"data-component": "DXGrid"
|
|
385
|
+
}, [
|
|
386
|
+
$(d.$slots, "default")
|
|
387
|
+
], 6));
|
|
388
|
+
}
|
|
389
|
+
}, ys = {
|
|
390
|
+
__name: "DXFlex",
|
|
391
|
+
props: {
|
|
392
|
+
/** Направление: row | row-reverse | col | col-reverse */
|
|
393
|
+
direction: { type: String, default: "row" },
|
|
394
|
+
/** Выравнивание по главной оси: start | center | end | between | around | evenly */
|
|
395
|
+
justify: { type: String, default: "start" },
|
|
396
|
+
/** Выравнивание по поперечной оси: start | center | end | stretch | baseline */
|
|
397
|
+
align: { type: String, default: "center" },
|
|
398
|
+
/** Перенос: nowrap | wrap | wrap-reverse */
|
|
399
|
+
wrap: { type: String, default: "nowrap" },
|
|
400
|
+
/** Отступ между элементами: none | xs | sm | md | lg | xl */
|
|
401
|
+
gap: { type: String, default: "md" },
|
|
402
|
+
/** Inline flex */
|
|
403
|
+
inline: { type: Boolean, default: !1 }
|
|
404
|
+
},
|
|
405
|
+
setup(e) {
|
|
406
|
+
const t = e, l = {
|
|
407
|
+
row: "flex-row",
|
|
408
|
+
"row-reverse": "flex-row-reverse",
|
|
409
|
+
col: "flex-col",
|
|
410
|
+
"col-reverse": "flex-col-reverse"
|
|
411
|
+
}, s = {
|
|
412
|
+
start: "justify-start",
|
|
413
|
+
center: "justify-center",
|
|
414
|
+
end: "justify-end",
|
|
415
|
+
between: "justify-between",
|
|
416
|
+
around: "justify-around",
|
|
417
|
+
evenly: "justify-evenly"
|
|
418
|
+
}, r = {
|
|
419
|
+
start: "items-start",
|
|
420
|
+
center: "items-center",
|
|
421
|
+
end: "items-end",
|
|
422
|
+
stretch: "items-stretch",
|
|
423
|
+
baseline: "items-baseline"
|
|
424
|
+
}, i = {
|
|
425
|
+
nowrap: "flex-nowrap",
|
|
426
|
+
wrap: "flex-wrap",
|
|
427
|
+
"wrap-reverse": "flex-wrap-reverse"
|
|
428
|
+
}, d = {
|
|
429
|
+
none: "gap-0",
|
|
430
|
+
xs: "gap-1",
|
|
431
|
+
sm: "gap-2",
|
|
432
|
+
md: "gap-4",
|
|
433
|
+
lg: "gap-6",
|
|
434
|
+
xl: "gap-8"
|
|
435
|
+
}, u = g(() => [
|
|
436
|
+
t.inline ? "inline-flex" : "flex",
|
|
437
|
+
l[t.direction] || l.row,
|
|
438
|
+
s[t.justify] || s.start,
|
|
439
|
+
r[t.align] || r.center,
|
|
440
|
+
i[t.wrap] || i.nowrap,
|
|
441
|
+
d[t.gap] || d.md
|
|
442
|
+
]);
|
|
443
|
+
return (p, v) => (a(), n("div", {
|
|
444
|
+
class: f(u.value),
|
|
445
|
+
"data-component": "DXFlex"
|
|
446
|
+
}, [
|
|
447
|
+
$(p.$slots, "default")
|
|
448
|
+
], 2));
|
|
449
|
+
}
|
|
450
|
+
}, we = ["data-direction"], ws = {
|
|
451
|
+
__name: "DXStack",
|
|
452
|
+
props: {
|
|
453
|
+
/** Направление: vertical | horizontal */
|
|
454
|
+
direction: { type: String, default: "vertical" },
|
|
455
|
+
/** Отступ между элементами: none | xs | sm | md | lg | xl | 2xl */
|
|
456
|
+
gap: { type: String, default: "md" },
|
|
457
|
+
/** Выравнивание: start | center | end | stretch */
|
|
458
|
+
align: { type: String, default: "stretch" },
|
|
459
|
+
/** Распределение: start | center | end | between | around */
|
|
460
|
+
justify: { type: String, default: "start" },
|
|
461
|
+
/** Разделители между элементами */
|
|
462
|
+
dividers: { type: Boolean, default: !1 }
|
|
463
|
+
},
|
|
464
|
+
setup(e) {
|
|
465
|
+
const t = e, l = {
|
|
466
|
+
none: "gap-0",
|
|
467
|
+
xs: "gap-1",
|
|
468
|
+
sm: "gap-2",
|
|
469
|
+
md: "gap-4",
|
|
470
|
+
lg: "gap-6",
|
|
471
|
+
xl: "gap-8",
|
|
472
|
+
"2xl": "gap-12"
|
|
473
|
+
}, s = {
|
|
474
|
+
start: "items-start",
|
|
475
|
+
center: "items-center",
|
|
476
|
+
end: "items-end",
|
|
477
|
+
stretch: "items-stretch"
|
|
478
|
+
}, r = {
|
|
479
|
+
start: "justify-start",
|
|
480
|
+
center: "justify-center",
|
|
481
|
+
end: "justify-end",
|
|
482
|
+
between: "justify-between",
|
|
483
|
+
around: "justify-around"
|
|
484
|
+
}, i = g(() => [
|
|
485
|
+
"flex",
|
|
486
|
+
t.direction === "horizontal" ? "flex-row" : "flex-col",
|
|
487
|
+
l[t.gap] || l.md,
|
|
488
|
+
s[t.align] || s.stretch,
|
|
489
|
+
r[t.justify] || r.start,
|
|
490
|
+
t.dividers && (t.direction === "horizontal" ? "divide-x divide-slate-200" : "divide-y divide-slate-200")
|
|
491
|
+
]);
|
|
492
|
+
return (d, u) => (a(), n("div", {
|
|
493
|
+
class: f(i.value),
|
|
494
|
+
"data-component": "DXStack",
|
|
495
|
+
"data-direction": e.direction
|
|
496
|
+
}, [
|
|
497
|
+
$(d.$slots, "default")
|
|
498
|
+
], 10, we));
|
|
499
|
+
}
|
|
500
|
+
}, ks = {
|
|
501
|
+
__name: "DXSpacer",
|
|
502
|
+
props: {
|
|
503
|
+
/** Размер: xs | sm | md | lg | xl | 2xl или число в пикселях */
|
|
504
|
+
size: { type: [String, Number], default: "md" },
|
|
505
|
+
/** Направление: vertical | horizontal | both */
|
|
506
|
+
direction: { type: String, default: "vertical" },
|
|
507
|
+
/** Занять всё доступное пространство (flex-grow) */
|
|
508
|
+
grow: { type: Boolean, default: !1 }
|
|
509
|
+
},
|
|
510
|
+
setup(e) {
|
|
511
|
+
const t = e, l = {
|
|
512
|
+
xs: { v: "h-1", h: "w-1" },
|
|
513
|
+
sm: { v: "h-2", h: "w-2" },
|
|
514
|
+
md: { v: "h-4", h: "w-4" },
|
|
515
|
+
lg: { v: "h-8", h: "w-8" },
|
|
516
|
+
xl: { v: "h-12", h: "w-12" },
|
|
517
|
+
"2xl": { v: "h-16", h: "w-16" }
|
|
518
|
+
}, s = g(() => {
|
|
519
|
+
if (t.grow)
|
|
520
|
+
return ["flex-grow"];
|
|
521
|
+
const i = l[t.size];
|
|
522
|
+
return i ? t.direction === "horizontal" ? [i.h] : t.direction === "both" ? [i.v, i.h] : [i.v] : [];
|
|
523
|
+
}), r = g(() => {
|
|
524
|
+
if (t.grow) return {};
|
|
525
|
+
if (typeof t.size == "number") {
|
|
526
|
+
const i = `${t.size}px`;
|
|
527
|
+
return t.direction === "horizontal" ? { width: i } : t.direction === "both" ? { height: i, width: i } : { height: i };
|
|
528
|
+
}
|
|
529
|
+
return {};
|
|
530
|
+
});
|
|
531
|
+
return (i, d) => (a(), n("div", {
|
|
532
|
+
class: f(s.value),
|
|
533
|
+
style: E(r.value),
|
|
534
|
+
"data-component": "DXSpacer",
|
|
535
|
+
"aria-hidden": "true"
|
|
536
|
+
}, null, 6));
|
|
537
|
+
}
|
|
538
|
+
}, $s = {
|
|
539
|
+
__name: "DXBox",
|
|
540
|
+
props: {
|
|
541
|
+
/** HTML тег */
|
|
542
|
+
tag: { type: String, default: "div" },
|
|
543
|
+
/** Padding: none | xs | sm | md | lg | xl */
|
|
544
|
+
p: { type: String, default: "" },
|
|
545
|
+
/** Padding X (horizontal) */
|
|
546
|
+
px: { type: String, default: "" },
|
|
547
|
+
/** Padding Y (vertical) */
|
|
548
|
+
py: { type: String, default: "" },
|
|
549
|
+
/** Margin: none | xs | sm | md | lg | xl | auto */
|
|
550
|
+
m: { type: String, default: "" },
|
|
551
|
+
/** Margin X (horizontal) */
|
|
552
|
+
mx: { type: String, default: "" },
|
|
553
|
+
/** Margin Y (vertical) */
|
|
554
|
+
my: { type: String, default: "" },
|
|
555
|
+
/** Скругление: none | sm | md | lg | xl | 2xl | full */
|
|
556
|
+
rounded: { type: String, default: "" },
|
|
557
|
+
/** Фон: white | slate | transparent */
|
|
558
|
+
bg: { type: String, default: "" },
|
|
559
|
+
/** Тень: none | sm | md | lg | xl */
|
|
560
|
+
shadow: { type: String, default: "" },
|
|
561
|
+
/** Рамка */
|
|
562
|
+
border: { type: Boolean, default: !1 }
|
|
563
|
+
},
|
|
564
|
+
setup(e) {
|
|
565
|
+
const t = e, l = {
|
|
566
|
+
none: "0",
|
|
567
|
+
xs: "1",
|
|
568
|
+
sm: "2",
|
|
569
|
+
md: "4",
|
|
570
|
+
lg: "6",
|
|
571
|
+
xl: "8"
|
|
572
|
+
}, s = {
|
|
573
|
+
none: "0",
|
|
574
|
+
xs: "1",
|
|
575
|
+
sm: "2",
|
|
576
|
+
md: "4",
|
|
577
|
+
lg: "6",
|
|
578
|
+
xl: "8",
|
|
579
|
+
auto: "auto"
|
|
580
|
+
}, r = {
|
|
581
|
+
none: "rounded-none",
|
|
582
|
+
sm: "rounded-sm",
|
|
583
|
+
md: "rounded-md",
|
|
584
|
+
lg: "rounded-lg",
|
|
585
|
+
xl: "rounded-xl",
|
|
586
|
+
"2xl": "rounded-2xl",
|
|
587
|
+
full: "rounded-full"
|
|
588
|
+
}, i = {
|
|
589
|
+
white: "bg-white",
|
|
590
|
+
slate: "bg-slate-50",
|
|
591
|
+
transparent: "bg-transparent"
|
|
592
|
+
}, d = {
|
|
593
|
+
none: "shadow-none",
|
|
594
|
+
sm: "shadow-sm",
|
|
595
|
+
md: "shadow",
|
|
596
|
+
lg: "shadow-lg",
|
|
597
|
+
xl: "shadow-xl"
|
|
598
|
+
}, u = g(() => [
|
|
599
|
+
t.p && `p-${l[t.p] || t.p}`,
|
|
600
|
+
t.px && `px-${l[t.px] || t.px}`,
|
|
601
|
+
t.py && `py-${l[t.py] || t.py}`,
|
|
602
|
+
t.m && `m-${s[t.m] || t.m}`,
|
|
603
|
+
t.mx && `mx-${s[t.mx] || t.mx}`,
|
|
604
|
+
t.my && `my-${s[t.my] || t.my}`,
|
|
605
|
+
t.rounded && (r[t.rounded] || `rounded-${t.rounded}`),
|
|
606
|
+
t.bg && (i[t.bg] || t.bg),
|
|
607
|
+
t.shadow && (d[t.shadow] || `shadow-${t.shadow}`),
|
|
608
|
+
t.border && "border border-slate-200"
|
|
609
|
+
]);
|
|
610
|
+
return (p, v) => (a(), C(L(e.tag), {
|
|
611
|
+
class: f(u.value),
|
|
612
|
+
"data-component": "DXBox"
|
|
613
|
+
}, {
|
|
614
|
+
default: P(() => [
|
|
615
|
+
$(p.$slots, "default")
|
|
616
|
+
]),
|
|
617
|
+
_: 3
|
|
618
|
+
}, 8, ["class"]));
|
|
619
|
+
}
|
|
620
|
+
};
|
|
621
|
+
function ke(e, t) {
|
|
622
|
+
return a(), n("svg", {
|
|
623
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
624
|
+
viewBox: "0 0 24 24",
|
|
625
|
+
fill: "currentColor",
|
|
626
|
+
"aria-hidden": "true",
|
|
627
|
+
"data-slot": "icon"
|
|
628
|
+
}, [
|
|
629
|
+
o("path", {
|
|
630
|
+
"fill-rule": "evenodd",
|
|
631
|
+
d: "M5.25 9a6.75 6.75 0 0 1 13.5 0v.75c0 2.123.8 4.057 2.118 5.52a.75.75 0 0 1-.297 1.206c-1.544.57-3.16.99-4.831 1.243a3.75 3.75 0 1 1-7.48 0 24.585 24.585 0 0 1-4.831-1.244.75.75 0 0 1-.298-1.205A8.217 8.217 0 0 0 5.25 9.75V9Zm4.502 8.9a2.25 2.25 0 1 0 4.496 0 25.057 25.057 0 0 1-4.496 0Z",
|
|
632
|
+
"clip-rule": "evenodd"
|
|
633
|
+
})
|
|
634
|
+
]);
|
|
635
|
+
}
|
|
636
|
+
function $e(e, t) {
|
|
637
|
+
return a(), n("svg", {
|
|
638
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
639
|
+
viewBox: "0 0 24 24",
|
|
640
|
+
fill: "currentColor",
|
|
641
|
+
"aria-hidden": "true",
|
|
642
|
+
"data-slot": "icon"
|
|
643
|
+
}, [
|
|
644
|
+
o("path", {
|
|
645
|
+
"fill-rule": "evenodd",
|
|
646
|
+
d: "M6.32 2.577a49.255 49.255 0 0 1 11.36 0c1.497.174 2.57 1.46 2.57 2.93V21a.75.75 0 0 1-1.085.67L12 18.089l-7.165 3.583A.75.75 0 0 1 3.75 21V5.507c0-1.47 1.073-2.756 2.57-2.93Z",
|
|
647
|
+
"clip-rule": "evenodd"
|
|
648
|
+
})
|
|
649
|
+
]);
|
|
650
|
+
}
|
|
651
|
+
function Q(e, t) {
|
|
652
|
+
return a(), n("svg", {
|
|
653
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
654
|
+
viewBox: "0 0 24 24",
|
|
655
|
+
fill: "currentColor",
|
|
656
|
+
"aria-hidden": "true",
|
|
657
|
+
"data-slot": "icon"
|
|
658
|
+
}, [
|
|
659
|
+
o("path", {
|
|
660
|
+
"fill-rule": "evenodd",
|
|
661
|
+
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",
|
|
662
|
+
"clip-rule": "evenodd"
|
|
663
|
+
})
|
|
664
|
+
]);
|
|
665
|
+
}
|
|
666
|
+
function Ce(e, t) {
|
|
667
|
+
return a(), n("svg", {
|
|
668
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
669
|
+
viewBox: "0 0 24 24",
|
|
670
|
+
fill: "currentColor",
|
|
671
|
+
"aria-hidden": "true",
|
|
672
|
+
"data-slot": "icon"
|
|
673
|
+
}, [
|
|
674
|
+
o("path", {
|
|
675
|
+
"fill-rule": "evenodd",
|
|
676
|
+
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",
|
|
677
|
+
"clip-rule": "evenodd"
|
|
678
|
+
})
|
|
679
|
+
]);
|
|
680
|
+
}
|
|
681
|
+
function ee(e, t) {
|
|
682
|
+
return a(), n("svg", {
|
|
683
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
684
|
+
viewBox: "0 0 24 24",
|
|
685
|
+
fill: "currentColor",
|
|
686
|
+
"aria-hidden": "true",
|
|
687
|
+
"data-slot": "icon"
|
|
688
|
+
}, [
|
|
689
|
+
o("path", {
|
|
690
|
+
"fill-rule": "evenodd",
|
|
691
|
+
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",
|
|
692
|
+
"clip-rule": "evenodd"
|
|
693
|
+
})
|
|
694
|
+
]);
|
|
695
|
+
}
|
|
696
|
+
function Se(e, t) {
|
|
697
|
+
return a(), n("svg", {
|
|
698
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
699
|
+
viewBox: "0 0 24 24",
|
|
700
|
+
fill: "currentColor",
|
|
701
|
+
"aria-hidden": "true",
|
|
702
|
+
"data-slot": "icon"
|
|
703
|
+
}, [
|
|
704
|
+
o("path", { d: "M3.53 2.47a.75.75 0 0 0-1.06 1.06l18 18a.75.75 0 1 0 1.06-1.06l-18-18ZM22.676 12.553a11.249 11.249 0 0 1-2.631 4.31l-3.099-3.099a5.25 5.25 0 0 0-6.71-6.71L7.759 4.577a11.217 11.217 0 0 1 4.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113Z" }),
|
|
705
|
+
o("path", { d: "M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0 1 15.75 12ZM12.53 15.713l-4.243-4.244a3.75 3.75 0 0 0 4.244 4.243Z" }),
|
|
706
|
+
o("path", { d: "M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 0 0-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 0 1 6.75 12Z" })
|
|
707
|
+
]);
|
|
708
|
+
}
|
|
709
|
+
function Ve(e, t) {
|
|
710
|
+
return a(), n("svg", {
|
|
711
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
712
|
+
viewBox: "0 0 24 24",
|
|
713
|
+
fill: "currentColor",
|
|
714
|
+
"aria-hidden": "true",
|
|
715
|
+
"data-slot": "icon"
|
|
716
|
+
}, [
|
|
717
|
+
o("path", { d: "m11.645 20.91-.007-.003-.022-.012a15.247 15.247 0 0 1-.383-.218 25.18 25.18 0 0 1-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0 1 12 5.052 5.5 5.5 0 0 1 16.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 0 1-4.244 3.17 15.247 15.247 0 0 1-.383.219l-.022.012-.007.004-.003.001a.752.752 0 0 1-.704 0l-.003-.001Z" })
|
|
718
|
+
]);
|
|
719
|
+
}
|
|
720
|
+
function te(e, t) {
|
|
721
|
+
return a(), n("svg", {
|
|
722
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
723
|
+
viewBox: "0 0 24 24",
|
|
724
|
+
fill: "currentColor",
|
|
725
|
+
"aria-hidden": "true",
|
|
726
|
+
"data-slot": "icon"
|
|
727
|
+
}, [
|
|
728
|
+
o("path", {
|
|
729
|
+
"fill-rule": "evenodd",
|
|
730
|
+
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",
|
|
731
|
+
"clip-rule": "evenodd"
|
|
732
|
+
})
|
|
733
|
+
]);
|
|
734
|
+
}
|
|
735
|
+
function De(e, t) {
|
|
736
|
+
return a(), n("svg", {
|
|
737
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
738
|
+
viewBox: "0 0 24 24",
|
|
739
|
+
fill: "currentColor",
|
|
740
|
+
"aria-hidden": "true",
|
|
741
|
+
"data-slot": "icon"
|
|
742
|
+
}, [
|
|
743
|
+
o("path", {
|
|
744
|
+
"fill-rule": "evenodd",
|
|
745
|
+
d: "M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",
|
|
746
|
+
"clip-rule": "evenodd"
|
|
747
|
+
})
|
|
748
|
+
]);
|
|
749
|
+
}
|
|
750
|
+
function ze(e, t) {
|
|
751
|
+
return a(), n("svg", {
|
|
752
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
753
|
+
viewBox: "0 0 24 24",
|
|
754
|
+
fill: "currentColor",
|
|
755
|
+
"aria-hidden": "true",
|
|
756
|
+
"data-slot": "icon"
|
|
757
|
+
}, [
|
|
758
|
+
o("path", {
|
|
759
|
+
"fill-rule": "evenodd",
|
|
760
|
+
d: "M9.528 1.718a.75.75 0 0 1 .162.819A8.97 8.97 0 0 0 9 6a9 9 0 0 0 9 9 8.97 8.97 0 0 0 3.463-.69.75.75 0 0 1 .981.98 10.503 10.503 0 0 1-9.694 6.46c-5.799 0-10.5-4.7-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 0 1 .818.162Z",
|
|
761
|
+
"clip-rule": "evenodd"
|
|
762
|
+
})
|
|
763
|
+
]);
|
|
764
|
+
}
|
|
765
|
+
function Be(e, t) {
|
|
766
|
+
return a(), n("svg", {
|
|
767
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
768
|
+
viewBox: "0 0 24 24",
|
|
769
|
+
fill: "currentColor",
|
|
770
|
+
"aria-hidden": "true",
|
|
771
|
+
"data-slot": "icon"
|
|
772
|
+
}, [
|
|
773
|
+
o("path", {
|
|
774
|
+
"fill-rule": "evenodd",
|
|
775
|
+
d: "M6.75 5.25a.75.75 0 0 1 .75-.75H9a.75.75 0 0 1 .75.75v13.5a.75.75 0 0 1-.75.75H7.5a.75.75 0 0 1-.75-.75V5.25Zm7.5 0A.75.75 0 0 1 15 4.5h1.5a.75.75 0 0 1 .75.75v13.5a.75.75 0 0 1-.75.75H15a.75.75 0 0 1-.75-.75V5.25Z",
|
|
776
|
+
"clip-rule": "evenodd"
|
|
777
|
+
})
|
|
778
|
+
]);
|
|
779
|
+
}
|
|
780
|
+
function Xe(e, t) {
|
|
781
|
+
return a(), n("svg", {
|
|
782
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
783
|
+
viewBox: "0 0 24 24",
|
|
784
|
+
fill: "currentColor",
|
|
785
|
+
"aria-hidden": "true",
|
|
786
|
+
"data-slot": "icon"
|
|
787
|
+
}, [
|
|
788
|
+
o("path", { d: "M13.5 4.06c0-1.336-1.616-2.005-2.56-1.06l-4.5 4.5H4.508c-1.141 0-2.318.664-2.66 1.905A9.76 9.76 0 0 0 1.5 12c0 .898.121 1.768.35 2.595.341 1.24 1.518 1.905 2.659 1.905h1.93l4.5 4.5c.945.945 2.561.276 2.561-1.06V4.06ZM17.78 9.22a.75.75 0 1 0-1.06 1.06L18.44 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06l1.72-1.72 1.72 1.72a.75.75 0 1 0 1.06-1.06L20.56 12l1.72-1.72a.75.75 0 1 0-1.06-1.06l-1.72 1.72-1.72-1.72Z" })
|
|
789
|
+
]);
|
|
790
|
+
}
|
|
791
|
+
function Ie(e, t) {
|
|
792
|
+
return a(), n("svg", {
|
|
793
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
794
|
+
viewBox: "0 0 24 24",
|
|
795
|
+
fill: "currentColor",
|
|
796
|
+
"aria-hidden": "true",
|
|
797
|
+
"data-slot": "icon"
|
|
798
|
+
}, [
|
|
799
|
+
o("path", {
|
|
800
|
+
"fill-rule": "evenodd",
|
|
801
|
+
d: "M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z",
|
|
802
|
+
"clip-rule": "evenodd"
|
|
803
|
+
})
|
|
804
|
+
]);
|
|
805
|
+
}
|
|
806
|
+
function Ae(e, t) {
|
|
807
|
+
return a(), n("svg", {
|
|
808
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
809
|
+
viewBox: "0 0 24 24",
|
|
810
|
+
fill: "currentColor",
|
|
811
|
+
"aria-hidden": "true",
|
|
812
|
+
"data-slot": "icon"
|
|
813
|
+
}, [
|
|
814
|
+
o("path", {
|
|
815
|
+
"fill-rule": "evenodd",
|
|
816
|
+
d: "M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z",
|
|
817
|
+
"clip-rule": "evenodd"
|
|
818
|
+
})
|
|
819
|
+
]);
|
|
820
|
+
}
|
|
821
|
+
function ie(e, t) {
|
|
822
|
+
return a(), n("svg", {
|
|
823
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
824
|
+
viewBox: "0 0 24 24",
|
|
825
|
+
fill: "currentColor",
|
|
826
|
+
"aria-hidden": "true",
|
|
827
|
+
"data-slot": "icon"
|
|
828
|
+
}, [
|
|
829
|
+
o("path", {
|
|
830
|
+
"fill-rule": "evenodd",
|
|
831
|
+
d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",
|
|
832
|
+
"clip-rule": "evenodd"
|
|
833
|
+
})
|
|
834
|
+
]);
|
|
835
|
+
}
|
|
836
|
+
function je(e, t) {
|
|
837
|
+
return a(), n("svg", {
|
|
838
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
839
|
+
viewBox: "0 0 24 24",
|
|
840
|
+
fill: "currentColor",
|
|
841
|
+
"aria-hidden": "true",
|
|
842
|
+
"data-slot": "icon"
|
|
843
|
+
}, [
|
|
844
|
+
o("path", {
|
|
845
|
+
"fill-rule": "evenodd",
|
|
846
|
+
d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
|
|
847
|
+
"clip-rule": "evenodd"
|
|
848
|
+
})
|
|
849
|
+
]);
|
|
850
|
+
}
|
|
851
|
+
const Z = (e, t) => {
|
|
852
|
+
const l = e.__vccOpts || e;
|
|
853
|
+
for (const [s, r] of t)
|
|
854
|
+
l[s] = r;
|
|
855
|
+
return l;
|
|
856
|
+
}, Me = {
|
|
857
|
+
__name: "DXIcon",
|
|
858
|
+
props: {
|
|
859
|
+
/** Heroicon компонент */
|
|
860
|
+
icon: { type: Object, required: !0 },
|
|
861
|
+
/** Размер: xs | sm | md | lg | xl */
|
|
862
|
+
size: { type: String, default: "md" },
|
|
863
|
+
/** Анимация при hover: none | wiggle | scale | rotate */
|
|
864
|
+
animation: { type: String, default: "none" },
|
|
865
|
+
/** Дополнительные классы */
|
|
866
|
+
class: { type: [String, Array, Object], default: "" }
|
|
867
|
+
},
|
|
868
|
+
setup(e) {
|
|
869
|
+
const t = e, l = {
|
|
870
|
+
xs: "w-3 h-3",
|
|
871
|
+
sm: "w-4 h-4",
|
|
872
|
+
md: "w-5 h-5",
|
|
873
|
+
lg: "w-6 h-6",
|
|
874
|
+
xl: "w-8 h-8"
|
|
875
|
+
}, s = {
|
|
876
|
+
none: "",
|
|
877
|
+
wiggle: "dx-icon-wiggle",
|
|
878
|
+
scale: "dx-icon-scale",
|
|
879
|
+
rotate: "dx-icon-rotate"
|
|
880
|
+
}, r = g(() => [
|
|
881
|
+
l[t.size] || l.md,
|
|
882
|
+
s[t.animation] || "",
|
|
883
|
+
t.class
|
|
884
|
+
]);
|
|
885
|
+
return (i, d) => (a(), C(L(e.icon), {
|
|
886
|
+
class: f(r.value),
|
|
887
|
+
"data-component": "DXIcon",
|
|
888
|
+
"data-size": e.size,
|
|
889
|
+
"data-animation": e.animation
|
|
890
|
+
}, null, 8, ["class", "data-size", "data-animation"]));
|
|
891
|
+
}
|
|
892
|
+
}, S = /* @__PURE__ */ Z(Me, [["__scopeId", "data-v-9441a40d"]]), Le = ["data-size"], _e = ["src", "alt"], Cs = {
|
|
893
|
+
__name: "DXAvatar",
|
|
894
|
+
props: {
|
|
895
|
+
/** URL изображения */
|
|
896
|
+
src: { type: String, default: "" },
|
|
897
|
+
/** Alt текст */
|
|
898
|
+
alt: { type: String, default: "Avatar" },
|
|
899
|
+
/** Инициалы (если нет изображения) */
|
|
900
|
+
initials: { type: String, default: "" },
|
|
901
|
+
/** Размер: xs | sm | md | lg | xl */
|
|
902
|
+
size: { type: String, default: "md" },
|
|
903
|
+
/** Форма: circle | square | rounded */
|
|
904
|
+
shape: { type: String, default: "circle" },
|
|
905
|
+
/** Статус: online | offline | busy | away */
|
|
906
|
+
status: { type: String, default: "" },
|
|
907
|
+
/** Кастомная иконка для fallback (по умолчанию UserIcon) */
|
|
908
|
+
icon: { type: Object, default: null },
|
|
909
|
+
/** Анимация иконки при hover: none | wiggle | scale | rotate */
|
|
910
|
+
iconAnimation: { type: String, default: "none" }
|
|
911
|
+
},
|
|
912
|
+
setup(e) {
|
|
913
|
+
const t = e, l = D(!1), s = {
|
|
914
|
+
xs: "w-6 h-6",
|
|
915
|
+
sm: "w-8 h-8",
|
|
916
|
+
md: "w-10 h-10",
|
|
917
|
+
lg: "w-12 h-12",
|
|
918
|
+
xl: "w-16 h-16"
|
|
919
|
+
}, r = {
|
|
920
|
+
circle: "rounded-full",
|
|
921
|
+
square: "rounded-none",
|
|
922
|
+
rounded: "rounded-lg"
|
|
923
|
+
}, i = {
|
|
924
|
+
xs: "text-xs",
|
|
925
|
+
sm: "text-xs",
|
|
926
|
+
md: "text-sm",
|
|
927
|
+
lg: "text-base",
|
|
928
|
+
xl: "text-lg"
|
|
929
|
+
}, d = {
|
|
930
|
+
xs: "w-1.5 h-1.5",
|
|
931
|
+
sm: "w-2 h-2",
|
|
932
|
+
md: "w-2.5 h-2.5",
|
|
933
|
+
lg: "w-3 h-3",
|
|
934
|
+
xl: "w-4 h-4"
|
|
935
|
+
}, u = {
|
|
936
|
+
online: "bg-emerald-500",
|
|
937
|
+
offline: "bg-slate-400",
|
|
938
|
+
busy: "bg-rose-500",
|
|
939
|
+
away: "bg-amber-500"
|
|
940
|
+
}, p = g(() => [
|
|
941
|
+
"relative inline-flex items-center justify-center overflow-hidden bg-slate-100 transition-transform",
|
|
942
|
+
s[t.size] || s.md,
|
|
943
|
+
r[t.shape] || r.circle,
|
|
944
|
+
t.iconAnimation !== "none" && "hover:scale-105"
|
|
945
|
+
]), v = g(() => [
|
|
946
|
+
"text-slate-600 uppercase",
|
|
947
|
+
i[t.size] || i.md
|
|
948
|
+
]), m = g(() => [
|
|
949
|
+
d[t.size] || d.md,
|
|
950
|
+
u[t.status] || ""
|
|
951
|
+
]), h = g(() => t.icon || Ae), y = {
|
|
952
|
+
xs: "sm",
|
|
953
|
+
sm: "sm",
|
|
954
|
+
md: "md",
|
|
955
|
+
lg: "lg",
|
|
956
|
+
xl: "xl"
|
|
957
|
+
}, x = g(() => y[t.size] || "md");
|
|
958
|
+
return (V, T) => (a(), n("div", {
|
|
959
|
+
class: f(p.value),
|
|
960
|
+
"data-component": "DXAvatar",
|
|
961
|
+
"data-size": e.size
|
|
962
|
+
}, [
|
|
963
|
+
e.src && !l.value ? (a(), n("img", {
|
|
964
|
+
key: 0,
|
|
965
|
+
src: e.src,
|
|
966
|
+
alt: e.alt,
|
|
967
|
+
class: "w-full h-full object-cover",
|
|
968
|
+
onError: T[0] || (T[0] = (X) => l.value = !0)
|
|
969
|
+
}, null, 40, _e)) : e.initials ? (a(), n("span", {
|
|
970
|
+
key: 1,
|
|
971
|
+
class: f(["font-medium", v.value])
|
|
972
|
+
}, b(e.initials), 3)) : (a(), C(S, {
|
|
973
|
+
key: 2,
|
|
974
|
+
icon: h.value,
|
|
975
|
+
size: x.value,
|
|
976
|
+
animation: e.iconAnimation,
|
|
977
|
+
class: "text-slate-400"
|
|
978
|
+
}, null, 8, ["icon", "size", "animation"])),
|
|
979
|
+
e.status ? (a(), n("span", {
|
|
980
|
+
key: 3,
|
|
981
|
+
class: f(["absolute bottom-0 right-0 block rounded-full ring-2 ring-white", m.value])
|
|
982
|
+
}, null, 2)) : c("", !0)
|
|
983
|
+
], 10, Le));
|
|
984
|
+
}
|
|
985
|
+
}, Oe = ["data-variant"], Te = "inline-flex items-center gap-1 px-2 py-1 text-[11px] rounded-full border font-semibold", Ss = {
|
|
986
|
+
__name: "DXBadge",
|
|
987
|
+
props: {
|
|
988
|
+
/** Вариант оформления: slate | success | warning | danger | info */
|
|
989
|
+
variant: { type: String, default: "slate" },
|
|
990
|
+
/** Иконка слева */
|
|
991
|
+
iconLeft: { type: Object, default: null },
|
|
992
|
+
/** Иконка справа */
|
|
993
|
+
iconRight: { type: Object, default: null }
|
|
994
|
+
},
|
|
995
|
+
setup(e) {
|
|
996
|
+
const t = e, l = {
|
|
997
|
+
slate: "bg-slate-50 text-slate-700 border-slate-100",
|
|
998
|
+
success: "bg-emerald-50 text-emerald-700 border-emerald-100",
|
|
999
|
+
warning: "bg-amber-50 text-amber-700 border-amber-100",
|
|
1000
|
+
danger: "bg-rose-50 text-rose-700 border-rose-100",
|
|
1001
|
+
info: "bg-blue-50 text-blue-700 border-blue-100"
|
|
1002
|
+
}, s = g(() => {
|
|
1003
|
+
const r = l[t.variant] || l.slate;
|
|
1004
|
+
return `${Te} ${r}`;
|
|
1005
|
+
});
|
|
1006
|
+
return (r, i) => (a(), n("span", {
|
|
1007
|
+
class: f(s.value),
|
|
1008
|
+
"data-component": "DXBadge",
|
|
1009
|
+
"data-variant": e.variant
|
|
1010
|
+
}, [
|
|
1011
|
+
e.iconLeft ? (a(), C(S, {
|
|
1012
|
+
key: 0,
|
|
1013
|
+
icon: e.iconLeft,
|
|
1014
|
+
size: "xs",
|
|
1015
|
+
animation: "none"
|
|
1016
|
+
}, null, 8, ["icon"])) : c("", !0),
|
|
1017
|
+
$(r.$slots, "default"),
|
|
1018
|
+
e.iconRight ? (a(), C(S, {
|
|
1019
|
+
key: 1,
|
|
1020
|
+
icon: e.iconRight,
|
|
1021
|
+
size: "xs",
|
|
1022
|
+
animation: "none"
|
|
1023
|
+
}, null, 8, ["icon"])) : c("", !0)
|
|
1024
|
+
], 10, Oe));
|
|
1025
|
+
}
|
|
1026
|
+
}, Ze = {
|
|
1027
|
+
__name: "DXButton",
|
|
1028
|
+
props: {
|
|
1029
|
+
/** Вариант оформления: primary | ghost | danger | outline */
|
|
1030
|
+
variant: { type: String, default: "primary" },
|
|
1031
|
+
/** Размер: sm | md | lg */
|
|
1032
|
+
size: { type: String, default: "md" },
|
|
1033
|
+
/** Растянуть на всю ширину */
|
|
1034
|
+
block: { type: Boolean, default: !1 },
|
|
1035
|
+
/** Только иконка (квадратная кнопка) */
|
|
1036
|
+
iconOnly: { type: Boolean, default: !1 },
|
|
1037
|
+
/** Тип кнопки для form */
|
|
1038
|
+
type: { type: String, default: "button" },
|
|
1039
|
+
/** Отключенное состояние */
|
|
1040
|
+
disabled: { type: Boolean, default: !1 },
|
|
1041
|
+
/** Vue Router путь */
|
|
1042
|
+
to: { type: [String, Object], default: null },
|
|
1043
|
+
/** Обычная ссылка */
|
|
1044
|
+
href: { type: String, default: null },
|
|
1045
|
+
/** Target для ссылки */
|
|
1046
|
+
target: { type: String, default: null },
|
|
1047
|
+
/** Rel для ссылки */
|
|
1048
|
+
rel: { type: String, default: null }
|
|
1049
|
+
},
|
|
1050
|
+
setup(e) {
|
|
1051
|
+
const t = e, l = g(() => t.to ? "router-link" : t.href ? "a" : "button"), s = g(() => t.iconOnly ? t.size === "sm" ? "h-9 w-9 text-xs" : t.size === "lg" ? "h-12 w-12 text-sm" : "h-10 w-10 text-sm" : t.size === "sm" ? "px-3 py-2 text-xs" : t.size === "lg" ? "px-5 py-3 text-base" : "px-4 py-2 text-sm"), r = g(() => {
|
|
1052
|
+
switch (t.variant) {
|
|
1053
|
+
case "ghost":
|
|
1054
|
+
return "border border-slate-200 text-slate-700 hover:border-slate-300 bg-white";
|
|
1055
|
+
case "danger":
|
|
1056
|
+
return "bg-rose-600 text-white hover:bg-rose-500";
|
|
1057
|
+
case "outline":
|
|
1058
|
+
return "border border-slate-200 text-slate-700 hover:border-slate-300 bg-white";
|
|
1059
|
+
default:
|
|
1060
|
+
return "bg-slate-800 text-white hover:bg-slate-700";
|
|
1061
|
+
}
|
|
1062
|
+
});
|
|
1063
|
+
return (i, d) => (a(), C(L(l.value), {
|
|
1064
|
+
type: l.value === "button" ? e.type : void 0,
|
|
1065
|
+
disabled: e.disabled,
|
|
1066
|
+
to: e.to,
|
|
1067
|
+
href: e.href,
|
|
1068
|
+
target: e.target,
|
|
1069
|
+
rel: e.rel,
|
|
1070
|
+
class: f(["btn inline-flex items-center justify-center gap-2 rounded-xl font-semibold transition focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-60", [s.value, r.value, { "w-full": e.block, "px-0 py-0": e.iconOnly }]]),
|
|
1071
|
+
"data-component": "DXButton",
|
|
1072
|
+
"data-variant": e.variant
|
|
1073
|
+
}, {
|
|
1074
|
+
default: P(() => [
|
|
1075
|
+
$(i.$slots, "default", {}, void 0, !0)
|
|
1076
|
+
]),
|
|
1077
|
+
_: 3
|
|
1078
|
+
}, 8, ["type", "disabled", "to", "href", "target", "rel", "class", "data-variant"]));
|
|
1079
|
+
}
|
|
1080
|
+
}, Vs = /* @__PURE__ */ Z(Ze, [["__scopeId", "data-v-99117d90"]]), Ne = {}, Pe = {
|
|
1081
|
+
class: "bg-white border border-slate-100 rounded-2xl shadow-sm p-5",
|
|
1082
|
+
"data-component": "DXCard"
|
|
1083
|
+
};
|
|
1084
|
+
function Fe(e, t) {
|
|
1085
|
+
return a(), n("div", Pe, [
|
|
1086
|
+
$(e.$slots, "default")
|
|
1087
|
+
]);
|
|
1088
|
+
}
|
|
1089
|
+
const Ds = /* @__PURE__ */ Z(Ne, [["render", Fe]]), He = ["checked", "value", "disabled"], Re = {
|
|
1090
|
+
key: 0,
|
|
1091
|
+
class: "text-sm text-slate-700 select-none"
|
|
1092
|
+
}, zs = {
|
|
1093
|
+
__name: "DXCheckbox",
|
|
1094
|
+
props: {
|
|
1095
|
+
/** Значение (v-model) - boolean или массив */
|
|
1096
|
+
modelValue: { type: [Boolean, Array], default: !1 },
|
|
1097
|
+
/** Значение для массива */
|
|
1098
|
+
value: { type: [String, Number], default: void 0 },
|
|
1099
|
+
/** Текст лейбла */
|
|
1100
|
+
label: { type: String, default: "" },
|
|
1101
|
+
/** Отключенное состояние */
|
|
1102
|
+
disabled: { type: Boolean, default: !1 },
|
|
1103
|
+
/** Размер: sm | md | lg */
|
|
1104
|
+
size: { type: String, default: "md" }
|
|
1105
|
+
},
|
|
1106
|
+
emits: ["update:modelValue"],
|
|
1107
|
+
setup(e, { emit: t }) {
|
|
1108
|
+
const l = e, s = t, r = g(() => {
|
|
1109
|
+
switch (l.size) {
|
|
1110
|
+
case "sm":
|
|
1111
|
+
return "h-3.5 w-3.5";
|
|
1112
|
+
case "lg":
|
|
1113
|
+
return "h-5 w-5";
|
|
1114
|
+
default:
|
|
1115
|
+
return "h-4 w-4";
|
|
1116
|
+
}
|
|
1117
|
+
}), i = g(() => Array.isArray(l.modelValue) ? l.modelValue.includes(l.value) : l.modelValue), d = (u) => {
|
|
1118
|
+
if (Array.isArray(l.modelValue)) {
|
|
1119
|
+
const p = [...l.modelValue];
|
|
1120
|
+
if (u.target.checked)
|
|
1121
|
+
p.push(l.value);
|
|
1122
|
+
else {
|
|
1123
|
+
const v = p.indexOf(l.value);
|
|
1124
|
+
v > -1 && p.splice(v, 1);
|
|
1125
|
+
}
|
|
1126
|
+
s("update:modelValue", p);
|
|
1127
|
+
} else
|
|
1128
|
+
s("update:modelValue", u.target.checked);
|
|
1129
|
+
};
|
|
1130
|
+
return (u, p) => (a(), n("label", {
|
|
1131
|
+
class: f(["inline-flex items-center gap-2 cursor-pointer", { "opacity-60 cursor-not-allowed": e.disabled }]),
|
|
1132
|
+
"data-component": "DXCheckbox"
|
|
1133
|
+
}, [
|
|
1134
|
+
o("input", {
|
|
1135
|
+
type: "checkbox",
|
|
1136
|
+
checked: i.value,
|
|
1137
|
+
value: e.value,
|
|
1138
|
+
disabled: e.disabled,
|
|
1139
|
+
class: f(["rounded border-slate-300 text-slate-900 focus:ring-slate-900/10 focus:ring-2 transition", r.value]),
|
|
1140
|
+
onChange: d
|
|
1141
|
+
}, null, 42, He),
|
|
1142
|
+
e.label ? (a(), n("span", Re, b(e.label), 1)) : c("", !0)
|
|
1143
|
+
], 2));
|
|
1144
|
+
}
|
|
1145
|
+
};
|
|
1146
|
+
function qe(e, t) {
|
|
1147
|
+
return a(), n("svg", {
|
|
1148
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1149
|
+
fill: "none",
|
|
1150
|
+
viewBox: "0 0 24 24",
|
|
1151
|
+
"stroke-width": "1.5",
|
|
1152
|
+
stroke: "currentColor",
|
|
1153
|
+
"aria-hidden": "true",
|
|
1154
|
+
"data-slot": "icon"
|
|
1155
|
+
}, [
|
|
1156
|
+
o("path", {
|
|
1157
|
+
"stroke-linecap": "round",
|
|
1158
|
+
"stroke-linejoin": "round",
|
|
1159
|
+
d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"
|
|
1160
|
+
})
|
|
1161
|
+
]);
|
|
1162
|
+
}
|
|
1163
|
+
function Ee(e, t) {
|
|
1164
|
+
return a(), n("svg", {
|
|
1165
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1166
|
+
fill: "none",
|
|
1167
|
+
viewBox: "0 0 24 24",
|
|
1168
|
+
"stroke-width": "1.5",
|
|
1169
|
+
stroke: "currentColor",
|
|
1170
|
+
"aria-hidden": "true",
|
|
1171
|
+
"data-slot": "icon"
|
|
1172
|
+
}, [
|
|
1173
|
+
o("path", {
|
|
1174
|
+
"stroke-linecap": "round",
|
|
1175
|
+
"stroke-linejoin": "round",
|
|
1176
|
+
d: "M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"
|
|
1177
|
+
})
|
|
1178
|
+
]);
|
|
1179
|
+
}
|
|
1180
|
+
function Ge(e, t) {
|
|
1181
|
+
return a(), n("svg", {
|
|
1182
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1183
|
+
fill: "none",
|
|
1184
|
+
viewBox: "0 0 24 24",
|
|
1185
|
+
"stroke-width": "1.5",
|
|
1186
|
+
stroke: "currentColor",
|
|
1187
|
+
"aria-hidden": "true",
|
|
1188
|
+
"data-slot": "icon"
|
|
1189
|
+
}, [
|
|
1190
|
+
o("path", {
|
|
1191
|
+
"stroke-linecap": "round",
|
|
1192
|
+
"stroke-linejoin": "round",
|
|
1193
|
+
d: "M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0Z"
|
|
1194
|
+
})
|
|
1195
|
+
]);
|
|
1196
|
+
}
|
|
1197
|
+
function Ue(e, t) {
|
|
1198
|
+
return a(), n("svg", {
|
|
1199
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1200
|
+
fill: "none",
|
|
1201
|
+
viewBox: "0 0 24 24",
|
|
1202
|
+
"stroke-width": "1.5",
|
|
1203
|
+
stroke: "currentColor",
|
|
1204
|
+
"aria-hidden": "true",
|
|
1205
|
+
"data-slot": "icon"
|
|
1206
|
+
}, [
|
|
1207
|
+
o("path", {
|
|
1208
|
+
"stroke-linecap": "round",
|
|
1209
|
+
"stroke-linejoin": "round",
|
|
1210
|
+
d: "m4.5 12.75 6 6 9-13.5"
|
|
1211
|
+
})
|
|
1212
|
+
]);
|
|
1213
|
+
}
|
|
1214
|
+
function le(e, t) {
|
|
1215
|
+
return a(), n("svg", {
|
|
1216
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1217
|
+
fill: "none",
|
|
1218
|
+
viewBox: "0 0 24 24",
|
|
1219
|
+
"stroke-width": "1.5",
|
|
1220
|
+
stroke: "currentColor",
|
|
1221
|
+
"aria-hidden": "true",
|
|
1222
|
+
"data-slot": "icon"
|
|
1223
|
+
}, [
|
|
1224
|
+
o("path", {
|
|
1225
|
+
"stroke-linecap": "round",
|
|
1226
|
+
"stroke-linejoin": "round",
|
|
1227
|
+
d: "m19.5 8.25-7.5 7.5-7.5-7.5"
|
|
1228
|
+
})
|
|
1229
|
+
]);
|
|
1230
|
+
}
|
|
1231
|
+
function Ke(e, t) {
|
|
1232
|
+
return a(), n("svg", {
|
|
1233
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1234
|
+
fill: "none",
|
|
1235
|
+
viewBox: "0 0 24 24",
|
|
1236
|
+
"stroke-width": "1.5",
|
|
1237
|
+
stroke: "currentColor",
|
|
1238
|
+
"aria-hidden": "true",
|
|
1239
|
+
"data-slot": "icon"
|
|
1240
|
+
}, [
|
|
1241
|
+
o("path", {
|
|
1242
|
+
"stroke-linecap": "round",
|
|
1243
|
+
"stroke-linejoin": "round",
|
|
1244
|
+
d: "M15.75 19.5 8.25 12l7.5-7.5"
|
|
1245
|
+
})
|
|
1246
|
+
]);
|
|
1247
|
+
}
|
|
1248
|
+
function de(e, t) {
|
|
1249
|
+
return a(), n("svg", {
|
|
1250
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1251
|
+
fill: "none",
|
|
1252
|
+
viewBox: "0 0 24 24",
|
|
1253
|
+
"stroke-width": "1.5",
|
|
1254
|
+
stroke: "currentColor",
|
|
1255
|
+
"aria-hidden": "true",
|
|
1256
|
+
"data-slot": "icon"
|
|
1257
|
+
}, [
|
|
1258
|
+
o("path", {
|
|
1259
|
+
"stroke-linecap": "round",
|
|
1260
|
+
"stroke-linejoin": "round",
|
|
1261
|
+
d: "m8.25 4.5 7.5 7.5-7.5 7.5"
|
|
1262
|
+
})
|
|
1263
|
+
]);
|
|
1264
|
+
}
|
|
1265
|
+
function We(e, t) {
|
|
1266
|
+
return a(), n("svg", {
|
|
1267
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1268
|
+
fill: "none",
|
|
1269
|
+
viewBox: "0 0 24 24",
|
|
1270
|
+
"stroke-width": "1.5",
|
|
1271
|
+
stroke: "currentColor",
|
|
1272
|
+
"aria-hidden": "true",
|
|
1273
|
+
"data-slot": "icon"
|
|
1274
|
+
}, [
|
|
1275
|
+
o("path", {
|
|
1276
|
+
"stroke-linecap": "round",
|
|
1277
|
+
"stroke-linejoin": "round",
|
|
1278
|
+
d: "M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"
|
|
1279
|
+
})
|
|
1280
|
+
]);
|
|
1281
|
+
}
|
|
1282
|
+
function Ye(e, t) {
|
|
1283
|
+
return a(), n("svg", {
|
|
1284
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1285
|
+
fill: "none",
|
|
1286
|
+
viewBox: "0 0 24 24",
|
|
1287
|
+
"stroke-width": "1.5",
|
|
1288
|
+
stroke: "currentColor",
|
|
1289
|
+
"aria-hidden": "true",
|
|
1290
|
+
"data-slot": "icon"
|
|
1291
|
+
}, [
|
|
1292
|
+
o("path", {
|
|
1293
|
+
"stroke-linecap": "round",
|
|
1294
|
+
"stroke-linejoin": "round",
|
|
1295
|
+
d: "M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z"
|
|
1296
|
+
})
|
|
1297
|
+
]);
|
|
1298
|
+
}
|
|
1299
|
+
function Je(e, t) {
|
|
1300
|
+
return a(), n("svg", {
|
|
1301
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1302
|
+
fill: "none",
|
|
1303
|
+
viewBox: "0 0 24 24",
|
|
1304
|
+
"stroke-width": "1.5",
|
|
1305
|
+
stroke: "currentColor",
|
|
1306
|
+
"aria-hidden": "true",
|
|
1307
|
+
"data-slot": "icon"
|
|
1308
|
+
}, [
|
|
1309
|
+
o("path", {
|
|
1310
|
+
"stroke-linecap": "round",
|
|
1311
|
+
"stroke-linejoin": "round",
|
|
1312
|
+
d: "M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"
|
|
1313
|
+
})
|
|
1314
|
+
]);
|
|
1315
|
+
}
|
|
1316
|
+
function Qe(e, t) {
|
|
1317
|
+
return a(), n("svg", {
|
|
1318
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1319
|
+
fill: "none",
|
|
1320
|
+
viewBox: "0 0 24 24",
|
|
1321
|
+
"stroke-width": "1.5",
|
|
1322
|
+
stroke: "currentColor",
|
|
1323
|
+
"aria-hidden": "true",
|
|
1324
|
+
"data-slot": "icon"
|
|
1325
|
+
}, [
|
|
1326
|
+
o("path", {
|
|
1327
|
+
"stroke-linecap": "round",
|
|
1328
|
+
"stroke-linejoin": "round",
|
|
1329
|
+
d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
|
|
1330
|
+
})
|
|
1331
|
+
]);
|
|
1332
|
+
}
|
|
1333
|
+
function et(e, t) {
|
|
1334
|
+
return a(), n("svg", {
|
|
1335
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1336
|
+
fill: "none",
|
|
1337
|
+
viewBox: "0 0 24 24",
|
|
1338
|
+
"stroke-width": "1.5",
|
|
1339
|
+
stroke: "currentColor",
|
|
1340
|
+
"aria-hidden": "true",
|
|
1341
|
+
"data-slot": "icon"
|
|
1342
|
+
}, [
|
|
1343
|
+
o("path", {
|
|
1344
|
+
"stroke-linecap": "round",
|
|
1345
|
+
"stroke-linejoin": "round",
|
|
1346
|
+
d: "M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"
|
|
1347
|
+
})
|
|
1348
|
+
]);
|
|
1349
|
+
}
|
|
1350
|
+
function ae(e, t) {
|
|
1351
|
+
return a(), n("svg", {
|
|
1352
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1353
|
+
fill: "none",
|
|
1354
|
+
viewBox: "0 0 24 24",
|
|
1355
|
+
"stroke-width": "1.5",
|
|
1356
|
+
stroke: "currentColor",
|
|
1357
|
+
"aria-hidden": "true",
|
|
1358
|
+
"data-slot": "icon"
|
|
1359
|
+
}, [
|
|
1360
|
+
o("path", {
|
|
1361
|
+
"stroke-linecap": "round",
|
|
1362
|
+
"stroke-linejoin": "round",
|
|
1363
|
+
d: "M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
|
|
1364
|
+
}),
|
|
1365
|
+
o("path", {
|
|
1366
|
+
"stroke-linecap": "round",
|
|
1367
|
+
"stroke-linejoin": "round",
|
|
1368
|
+
d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
1369
|
+
})
|
|
1370
|
+
]);
|
|
1371
|
+
}
|
|
1372
|
+
function tt(e, t) {
|
|
1373
|
+
return a(), n("svg", {
|
|
1374
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1375
|
+
fill: "none",
|
|
1376
|
+
viewBox: "0 0 24 24",
|
|
1377
|
+
"stroke-width": "1.5",
|
|
1378
|
+
stroke: "currentColor",
|
|
1379
|
+
"aria-hidden": "true",
|
|
1380
|
+
"data-slot": "icon"
|
|
1381
|
+
}, [
|
|
1382
|
+
o("path", {
|
|
1383
|
+
"stroke-linecap": "round",
|
|
1384
|
+
"stroke-linejoin": "round",
|
|
1385
|
+
d: "M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z"
|
|
1386
|
+
})
|
|
1387
|
+
]);
|
|
1388
|
+
}
|
|
1389
|
+
function lt(e, t) {
|
|
1390
|
+
return a(), n("svg", {
|
|
1391
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1392
|
+
fill: "none",
|
|
1393
|
+
viewBox: "0 0 24 24",
|
|
1394
|
+
"stroke-width": "1.5",
|
|
1395
|
+
stroke: "currentColor",
|
|
1396
|
+
"aria-hidden": "true",
|
|
1397
|
+
"data-slot": "icon"
|
|
1398
|
+
}, [
|
|
1399
|
+
o("path", {
|
|
1400
|
+
"stroke-linecap": "round",
|
|
1401
|
+
"stroke-linejoin": "round",
|
|
1402
|
+
d: "M13.5 10.5V6.75a4.5 4.5 0 1 1 9 0v3.75M3.75 21.75h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H3.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"
|
|
1403
|
+
})
|
|
1404
|
+
]);
|
|
1405
|
+
}
|
|
1406
|
+
function at(e, t) {
|
|
1407
|
+
return a(), n("svg", {
|
|
1408
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1409
|
+
fill: "none",
|
|
1410
|
+
viewBox: "0 0 24 24",
|
|
1411
|
+
"stroke-width": "1.5",
|
|
1412
|
+
stroke: "currentColor",
|
|
1413
|
+
"aria-hidden": "true",
|
|
1414
|
+
"data-slot": "icon"
|
|
1415
|
+
}, [
|
|
1416
|
+
o("path", {
|
|
1417
|
+
"stroke-linecap": "round",
|
|
1418
|
+
"stroke-linejoin": "round",
|
|
1419
|
+
d: "m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"
|
|
1420
|
+
})
|
|
1421
|
+
]);
|
|
1422
|
+
}
|
|
1423
|
+
function nt(e, t) {
|
|
1424
|
+
return a(), n("svg", {
|
|
1425
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1426
|
+
fill: "none",
|
|
1427
|
+
viewBox: "0 0 24 24",
|
|
1428
|
+
"stroke-width": "1.5",
|
|
1429
|
+
stroke: "currentColor",
|
|
1430
|
+
"aria-hidden": "true",
|
|
1431
|
+
"data-slot": "icon"
|
|
1432
|
+
}, [
|
|
1433
|
+
o("path", {
|
|
1434
|
+
"stroke-linecap": "round",
|
|
1435
|
+
"stroke-linejoin": "round",
|
|
1436
|
+
d: "M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"
|
|
1437
|
+
})
|
|
1438
|
+
]);
|
|
1439
|
+
}
|
|
1440
|
+
function st(e, t) {
|
|
1441
|
+
return a(), n("svg", {
|
|
1442
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1443
|
+
fill: "none",
|
|
1444
|
+
viewBox: "0 0 24 24",
|
|
1445
|
+
"stroke-width": "1.5",
|
|
1446
|
+
stroke: "currentColor",
|
|
1447
|
+
"aria-hidden": "true",
|
|
1448
|
+
"data-slot": "icon"
|
|
1449
|
+
}, [
|
|
1450
|
+
o("path", {
|
|
1451
|
+
"stroke-linecap": "round",
|
|
1452
|
+
"stroke-linejoin": "round",
|
|
1453
|
+
d: "M12 4.5v15m7.5-7.5h-15"
|
|
1454
|
+
})
|
|
1455
|
+
]);
|
|
1456
|
+
}
|
|
1457
|
+
function ot(e, t) {
|
|
1458
|
+
return a(), n("svg", {
|
|
1459
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1460
|
+
fill: "none",
|
|
1461
|
+
viewBox: "0 0 24 24",
|
|
1462
|
+
"stroke-width": "1.5",
|
|
1463
|
+
stroke: "currentColor",
|
|
1464
|
+
"aria-hidden": "true",
|
|
1465
|
+
"data-slot": "icon"
|
|
1466
|
+
}, [
|
|
1467
|
+
o("path", {
|
|
1468
|
+
"stroke-linecap": "round",
|
|
1469
|
+
"stroke-linejoin": "round",
|
|
1470
|
+
d: "M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 0 1-1.125-1.125v-3.75ZM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-8.25ZM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-2.25Z"
|
|
1471
|
+
})
|
|
1472
|
+
]);
|
|
1473
|
+
}
|
|
1474
|
+
function rt(e, t) {
|
|
1475
|
+
return a(), n("svg", {
|
|
1476
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1477
|
+
fill: "none",
|
|
1478
|
+
viewBox: "0 0 24 24",
|
|
1479
|
+
"stroke-width": "1.5",
|
|
1480
|
+
stroke: "currentColor",
|
|
1481
|
+
"aria-hidden": "true",
|
|
1482
|
+
"data-slot": "icon"
|
|
1483
|
+
}, [
|
|
1484
|
+
o("path", {
|
|
1485
|
+
"stroke-linecap": "round",
|
|
1486
|
+
"stroke-linejoin": "round",
|
|
1487
|
+
d: "M19.114 5.636a9 9 0 0 1 0 12.728M16.463 8.288a5.25 5.25 0 0 1 0 7.424M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"
|
|
1488
|
+
})
|
|
1489
|
+
]);
|
|
1490
|
+
}
|
|
1491
|
+
function it(e, t) {
|
|
1492
|
+
return a(), n("svg", {
|
|
1493
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1494
|
+
fill: "none",
|
|
1495
|
+
viewBox: "0 0 24 24",
|
|
1496
|
+
"stroke-width": "1.5",
|
|
1497
|
+
stroke: "currentColor",
|
|
1498
|
+
"aria-hidden": "true",
|
|
1499
|
+
"data-slot": "icon"
|
|
1500
|
+
}, [
|
|
1501
|
+
o("path", {
|
|
1502
|
+
"stroke-linecap": "round",
|
|
1503
|
+
"stroke-linejoin": "round",
|
|
1504
|
+
d: "M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"
|
|
1505
|
+
})
|
|
1506
|
+
]);
|
|
1507
|
+
}
|
|
1508
|
+
function dt(e, t) {
|
|
1509
|
+
return a(), n("svg", {
|
|
1510
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1511
|
+
fill: "none",
|
|
1512
|
+
viewBox: "0 0 24 24",
|
|
1513
|
+
"stroke-width": "1.5",
|
|
1514
|
+
stroke: "currentColor",
|
|
1515
|
+
"aria-hidden": "true",
|
|
1516
|
+
"data-slot": "icon"
|
|
1517
|
+
}, [
|
|
1518
|
+
o("path", {
|
|
1519
|
+
"stroke-linecap": "round",
|
|
1520
|
+
"stroke-linejoin": "round",
|
|
1521
|
+
d: "M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"
|
|
1522
|
+
})
|
|
1523
|
+
]);
|
|
1524
|
+
}
|
|
1525
|
+
function ut(e, t) {
|
|
1526
|
+
return a(), n("svg", {
|
|
1527
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1528
|
+
fill: "none",
|
|
1529
|
+
viewBox: "0 0 24 24",
|
|
1530
|
+
"stroke-width": "1.5",
|
|
1531
|
+
stroke: "currentColor",
|
|
1532
|
+
"aria-hidden": "true",
|
|
1533
|
+
"data-slot": "icon"
|
|
1534
|
+
}, [
|
|
1535
|
+
o("path", {
|
|
1536
|
+
"stroke-linecap": "round",
|
|
1537
|
+
"stroke-linejoin": "round",
|
|
1538
|
+
d: "M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"
|
|
1539
|
+
})
|
|
1540
|
+
]);
|
|
1541
|
+
}
|
|
1542
|
+
function ct(e, t) {
|
|
1543
|
+
return a(), n("svg", {
|
|
1544
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1545
|
+
fill: "none",
|
|
1546
|
+
viewBox: "0 0 24 24",
|
|
1547
|
+
"stroke-width": "1.5",
|
|
1548
|
+
stroke: "currentColor",
|
|
1549
|
+
"aria-hidden": "true",
|
|
1550
|
+
"data-slot": "icon"
|
|
1551
|
+
}, [
|
|
1552
|
+
o("path", {
|
|
1553
|
+
"stroke-linecap": "round",
|
|
1554
|
+
"stroke-linejoin": "round",
|
|
1555
|
+
d: "m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"
|
|
1556
|
+
})
|
|
1557
|
+
]);
|
|
1558
|
+
}
|
|
1559
|
+
function mt(e, t) {
|
|
1560
|
+
return a(), n("svg", {
|
|
1561
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1562
|
+
fill: "none",
|
|
1563
|
+
viewBox: "0 0 24 24",
|
|
1564
|
+
"stroke-width": "1.5",
|
|
1565
|
+
stroke: "currentColor",
|
|
1566
|
+
"aria-hidden": "true",
|
|
1567
|
+
"data-slot": "icon"
|
|
1568
|
+
}, [
|
|
1569
|
+
o("path", {
|
|
1570
|
+
"stroke-linecap": "round",
|
|
1571
|
+
"stroke-linejoin": "round",
|
|
1572
|
+
d: "M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z"
|
|
1573
|
+
})
|
|
1574
|
+
]);
|
|
1575
|
+
}
|
|
1576
|
+
function ue(e, t) {
|
|
1577
|
+
return a(), n("svg", {
|
|
1578
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1579
|
+
fill: "none",
|
|
1580
|
+
viewBox: "0 0 24 24",
|
|
1581
|
+
"stroke-width": "1.5",
|
|
1582
|
+
stroke: "currentColor",
|
|
1583
|
+
"aria-hidden": "true",
|
|
1584
|
+
"data-slot": "icon"
|
|
1585
|
+
}, [
|
|
1586
|
+
o("path", {
|
|
1587
|
+
"stroke-linecap": "round",
|
|
1588
|
+
"stroke-linejoin": "round",
|
|
1589
|
+
d: "M6 18 18 6M6 6l12 12"
|
|
1590
|
+
})
|
|
1591
|
+
]);
|
|
1592
|
+
}
|
|
1593
|
+
const ft = ["aria-label"], ce = {
|
|
1594
|
+
__name: "DXCloseButton",
|
|
1595
|
+
props: {
|
|
1596
|
+
/** Размер: sm | md | lg */
|
|
1597
|
+
size: { type: String, default: "md" },
|
|
1598
|
+
/** Вариант цвета: default | light | danger */
|
|
1599
|
+
variant: { type: String, default: "default" },
|
|
1600
|
+
/** Aria label */
|
|
1601
|
+
ariaLabel: { type: String, default: "Закрыть" }
|
|
1602
|
+
},
|
|
1603
|
+
emits: ["click"],
|
|
1604
|
+
setup(e) {
|
|
1605
|
+
const t = e, l = {
|
|
1606
|
+
sm: "p-0.5",
|
|
1607
|
+
md: "p-1",
|
|
1608
|
+
lg: "p-1.5"
|
|
1609
|
+
}, s = {
|
|
1610
|
+
sm: "sm",
|
|
1611
|
+
md: "md",
|
|
1612
|
+
lg: "lg"
|
|
1613
|
+
}, r = {
|
|
1614
|
+
default: "text-slate-400 hover:text-slate-600",
|
|
1615
|
+
light: "text-white/70 hover:text-white",
|
|
1616
|
+
danger: "text-rose-400 hover:text-rose-600"
|
|
1617
|
+
}, i = g(() => s[t.size] || s.md), d = g(() => [
|
|
1618
|
+
"inline-flex items-center justify-center rounded transition-colors",
|
|
1619
|
+
l[t.size] || l.md,
|
|
1620
|
+
r[t.variant] || r.default
|
|
1621
|
+
]);
|
|
1622
|
+
return (u, p) => (a(), n("button", {
|
|
1623
|
+
type: "button",
|
|
1624
|
+
class: f(d.value),
|
|
1625
|
+
onClick: p[0] || (p[0] = (v) => u.$emit("click", v)),
|
|
1626
|
+
"aria-label": e.ariaLabel,
|
|
1627
|
+
"data-component": "DXCloseButton"
|
|
1628
|
+
}, [
|
|
1629
|
+
A(S, {
|
|
1630
|
+
icon: O(ue),
|
|
1631
|
+
size: i.value,
|
|
1632
|
+
animation: "scale"
|
|
1633
|
+
}, null, 8, ["icon", "size"])
|
|
1634
|
+
], 10, ft));
|
|
1635
|
+
}
|
|
1636
|
+
}, pt = ["data-orientation"], gt = {
|
|
1637
|
+
key: 0,
|
|
1638
|
+
class: "flex items-center w-full"
|
|
1639
|
+
}, vt = { class: "px-3 text-sm text-slate-500 whitespace-nowrap" }, Bs = {
|
|
1640
|
+
__name: "DXDivider",
|
|
1641
|
+
props: {
|
|
1642
|
+
/** Ориентация: horizontal | vertical */
|
|
1643
|
+
orientation: { type: String, default: "horizontal" },
|
|
1644
|
+
/** Цвет: light | default | dark */
|
|
1645
|
+
color: { type: String, default: "default" },
|
|
1646
|
+
/** Толщина: thin | default | thick */
|
|
1647
|
+
thickness: { type: String, default: "default" },
|
|
1648
|
+
/** Отступы: none | sm | md | lg */
|
|
1649
|
+
spacing: { type: String, default: "md" }
|
|
1650
|
+
},
|
|
1651
|
+
setup(e) {
|
|
1652
|
+
const t = e, l = {
|
|
1653
|
+
light: "border-slate-100",
|
|
1654
|
+
default: "border-slate-200",
|
|
1655
|
+
dark: "border-slate-300"
|
|
1656
|
+
}, s = {
|
|
1657
|
+
thin: "border-t",
|
|
1658
|
+
default: "border-t",
|
|
1659
|
+
thick: "border-t-2"
|
|
1660
|
+
}, r = {
|
|
1661
|
+
thin: "border-l",
|
|
1662
|
+
default: "border-l",
|
|
1663
|
+
thick: "border-l-2"
|
|
1664
|
+
}, i = {
|
|
1665
|
+
none: "",
|
|
1666
|
+
sm: "my-2",
|
|
1667
|
+
md: "my-4",
|
|
1668
|
+
lg: "my-6"
|
|
1669
|
+
}, d = {
|
|
1670
|
+
none: "",
|
|
1671
|
+
sm: "mx-2",
|
|
1672
|
+
md: "mx-4",
|
|
1673
|
+
lg: "mx-6"
|
|
1674
|
+
}, u = g(() => [
|
|
1675
|
+
t.orientation === "vertical" ? "inline-flex h-full" : "w-full",
|
|
1676
|
+
t.orientation === "horizontal" ? i[t.spacing] : d[t.spacing]
|
|
1677
|
+
]), p = g(() => [
|
|
1678
|
+
t.orientation === "vertical" ? "h-full" : "flex-1",
|
|
1679
|
+
l[t.color] || l.default,
|
|
1680
|
+
t.orientation === "vertical" ? r[t.thickness] : s[t.thickness]
|
|
1681
|
+
]);
|
|
1682
|
+
return (v, m) => (a(), n("div", {
|
|
1683
|
+
class: f(u.value),
|
|
1684
|
+
"data-component": "DXDivider",
|
|
1685
|
+
"data-orientation": e.orientation
|
|
1686
|
+
}, [
|
|
1687
|
+
v.$slots.default && e.orientation === "horizontal" ? (a(), n("div", gt, [
|
|
1688
|
+
o("div", {
|
|
1689
|
+
class: f(p.value)
|
|
1690
|
+
}, null, 2),
|
|
1691
|
+
o("span", vt, [
|
|
1692
|
+
$(v.$slots, "default")
|
|
1693
|
+
]),
|
|
1694
|
+
o("div", {
|
|
1695
|
+
class: f(p.value)
|
|
1696
|
+
}, null, 2)
|
|
1697
|
+
])) : (a(), n("div", {
|
|
1698
|
+
key: 1,
|
|
1699
|
+
class: f(p.value)
|
|
1700
|
+
}, null, 2))
|
|
1701
|
+
], 10, pt));
|
|
1702
|
+
}
|
|
1703
|
+
}, bt = ["disabled"], ht = { class: "flex-1" }, xt = {
|
|
1704
|
+
key: 1,
|
|
1705
|
+
class: "w-4 h-4 text-slate-400",
|
|
1706
|
+
fill: "none",
|
|
1707
|
+
stroke: "currentColor",
|
|
1708
|
+
viewBox: "0 0 24 24"
|
|
1709
|
+
}, yt = {
|
|
1710
|
+
__name: "DXDropdownItem",
|
|
1711
|
+
props: {
|
|
1712
|
+
icon: { type: Object, default: null },
|
|
1713
|
+
danger: { type: Boolean, default: !1 },
|
|
1714
|
+
disabled: { type: Boolean, default: !1 },
|
|
1715
|
+
submenu: { type: Boolean, default: !1 },
|
|
1716
|
+
closeOnClick: { type: Boolean, default: !0 }
|
|
1717
|
+
},
|
|
1718
|
+
emits: ["click"],
|
|
1719
|
+
setup(e, { emit: t }) {
|
|
1720
|
+
const l = e, s = t, r = oe("dropdown", null), i = (d) => {
|
|
1721
|
+
l.disabled || (s("click", d), l.closeOnClick && r && r.close());
|
|
1722
|
+
};
|
|
1723
|
+
return (d, u) => (a(), n("button", {
|
|
1724
|
+
type: "button",
|
|
1725
|
+
class: f(["dropdown-item w-full flex items-center gap-3 px-4 py-2 text-sm text-left transition", [
|
|
1726
|
+
e.danger ? "text-rose-600 hover:bg-rose-50" : "text-slate-700 hover:bg-slate-50",
|
|
1727
|
+
e.disabled && "opacity-60 cursor-not-allowed"
|
|
1728
|
+
]]),
|
|
1729
|
+
disabled: e.disabled,
|
|
1730
|
+
onClick: i,
|
|
1731
|
+
"data-component": "DXDropdownItem"
|
|
1732
|
+
}, [
|
|
1733
|
+
e.icon ? (a(), C(L(e.icon), {
|
|
1734
|
+
key: 0,
|
|
1735
|
+
class: "w-4 h-4 flex-shrink-0"
|
|
1736
|
+
})) : c("", !0),
|
|
1737
|
+
o("span", ht, [
|
|
1738
|
+
$(d.$slots, "default", {}, void 0, !0)
|
|
1739
|
+
]),
|
|
1740
|
+
e.submenu ? (a(), n("svg", xt, [...u[0] || (u[0] = [
|
|
1741
|
+
o("path", {
|
|
1742
|
+
"stroke-linecap": "round",
|
|
1743
|
+
"stroke-linejoin": "round",
|
|
1744
|
+
"stroke-width": "2",
|
|
1745
|
+
d: "M9 5l7 7-7 7"
|
|
1746
|
+
}, null, -1)
|
|
1747
|
+
])])) : c("", !0)
|
|
1748
|
+
], 10, bt));
|
|
1749
|
+
}
|
|
1750
|
+
}, Xs = /* @__PURE__ */ Z(yt, [["__scopeId", "data-v-b0daf145"]]);
|
|
1751
|
+
function me(e, t = "input") {
|
|
1752
|
+
var s, r;
|
|
1753
|
+
const l = {
|
|
1754
|
+
button: {
|
|
1755
|
+
sm: "h-8 px-3 py-1.5 text-xs",
|
|
1756
|
+
md: "h-10 px-4 py-2.5 text-sm",
|
|
1757
|
+
lg: "h-12 px-5 py-3 text-base"
|
|
1758
|
+
},
|
|
1759
|
+
input: {
|
|
1760
|
+
sm: "h-8 px-3 py-1.5 text-xs",
|
|
1761
|
+
md: "h-10 px-4 py-2.5 text-sm",
|
|
1762
|
+
lg: "h-12 px-5 py-3 text-base"
|
|
1763
|
+
},
|
|
1764
|
+
icon: {
|
|
1765
|
+
xs: "w-4 h-4",
|
|
1766
|
+
sm: "w-5 h-5",
|
|
1767
|
+
md: "w-6 h-6",
|
|
1768
|
+
lg: "w-8 h-8",
|
|
1769
|
+
xl: "w-10 h-10"
|
|
1770
|
+
},
|
|
1771
|
+
text: {
|
|
1772
|
+
xs: "text-xs",
|
|
1773
|
+
sm: "text-sm",
|
|
1774
|
+
md: "text-base",
|
|
1775
|
+
lg: "text-lg",
|
|
1776
|
+
xl: "text-xl"
|
|
1777
|
+
}
|
|
1778
|
+
};
|
|
1779
|
+
return ((s = l[t]) == null ? void 0 : s[e]) || ((r = l[t]) == null ? void 0 : r.md) || "";
|
|
1780
|
+
}
|
|
1781
|
+
const wt = {
|
|
1782
|
+
class: "w-full",
|
|
1783
|
+
"data-component": "DXInput"
|
|
1784
|
+
}, kt = {
|
|
1785
|
+
key: 0,
|
|
1786
|
+
class: "block text-sm text-slate-600 mb-1 font-medium"
|
|
1787
|
+
}, $t = { class: "relative" }, Ct = {
|
|
1788
|
+
key: 0,
|
|
1789
|
+
class: "absolute left-3 top-1/2 -translate-y-1/2 text-slate-400"
|
|
1790
|
+
}, St = ["type", "placeholder", "value", "disabled"], Vt = {
|
|
1791
|
+
key: 1,
|
|
1792
|
+
class: "absolute right-3 top-1/2 -translate-y-1/2 text-slate-400"
|
|
1793
|
+
}, Dt = {
|
|
1794
|
+
key: 1,
|
|
1795
|
+
class: "mt-1 text-xs text-rose-500"
|
|
1796
|
+
}, zt = {
|
|
1797
|
+
key: 2,
|
|
1798
|
+
class: "mt-1 text-xs text-slate-500"
|
|
1799
|
+
}, Is = {
|
|
1800
|
+
__name: "DXInput",
|
|
1801
|
+
props: {
|
|
1802
|
+
/** Значение поля (v-model) */
|
|
1803
|
+
modelValue: [String, Number],
|
|
1804
|
+
/** Тип input */
|
|
1805
|
+
type: { type: String, default: "text" },
|
|
1806
|
+
/** Placeholder */
|
|
1807
|
+
placeholder: { type: String, default: "" },
|
|
1808
|
+
/** Лейбл над полем */
|
|
1809
|
+
label: { type: String, default: "" },
|
|
1810
|
+
/** Отключенное состояние */
|
|
1811
|
+
disabled: { type: Boolean, default: !1 },
|
|
1812
|
+
/** Текст ошибки */
|
|
1813
|
+
error: { type: String, default: "" },
|
|
1814
|
+
/** Вспомогательный текст */
|
|
1815
|
+
helper: { type: String, default: "" },
|
|
1816
|
+
/** Размер: sm | md | lg */
|
|
1817
|
+
size: { type: String, default: "md" },
|
|
1818
|
+
/** Дополнительные классы */
|
|
1819
|
+
inputClass: { type: [String, Array, Object], default: "" },
|
|
1820
|
+
/** Иконка слева (Heroicon компонент) */
|
|
1821
|
+
prefixIcon: { type: Object, default: null },
|
|
1822
|
+
/** Иконка справа (Heroicon компонент) */
|
|
1823
|
+
suffixIcon: { type: Object, default: null }
|
|
1824
|
+
},
|
|
1825
|
+
emits: ["update:modelValue"],
|
|
1826
|
+
setup(e) {
|
|
1827
|
+
const t = e, l = g(() => {
|
|
1828
|
+
var s, r;
|
|
1829
|
+
return [
|
|
1830
|
+
"w-full rounded-xl border border-slate-200 bg-white transition-colors",
|
|
1831
|
+
me(t.size, "input"),
|
|
1832
|
+
"text-slate-700 placeholder:text-slate-400",
|
|
1833
|
+
!t.disabled && "hover:border-slate-300 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300",
|
|
1834
|
+
t.disabled && "opacity-60 cursor-not-allowed bg-slate-50",
|
|
1835
|
+
t.error && "border-rose-300 focus:ring-rose-500/10",
|
|
1836
|
+
(t.prefixIcon || ((s = t.$slots) == null ? void 0 : s.prefix)) && "pl-10",
|
|
1837
|
+
(t.suffixIcon || ((r = t.$slots) == null ? void 0 : r.suffix)) && "pr-10",
|
|
1838
|
+
t.inputClass
|
|
1839
|
+
];
|
|
1840
|
+
});
|
|
1841
|
+
return (s, r) => (a(), n("div", wt, [
|
|
1842
|
+
e.label ? (a(), n("label", kt, b(e.label), 1)) : c("", !0),
|
|
1843
|
+
o("div", $t, [
|
|
1844
|
+
e.prefixIcon || s.$slots.prefix ? (a(), n("div", Ct, [
|
|
1845
|
+
e.prefixIcon ? (a(), C(S, {
|
|
1846
|
+
key: 0,
|
|
1847
|
+
icon: e.prefixIcon,
|
|
1848
|
+
size: "sm",
|
|
1849
|
+
animation: "none"
|
|
1850
|
+
}, null, 8, ["icon"])) : $(s.$slots, "prefix", { key: 1 })
|
|
1851
|
+
])) : c("", !0),
|
|
1852
|
+
o("input", {
|
|
1853
|
+
type: e.type,
|
|
1854
|
+
placeholder: e.placeholder,
|
|
1855
|
+
value: e.modelValue,
|
|
1856
|
+
disabled: e.disabled,
|
|
1857
|
+
class: f(l.value),
|
|
1858
|
+
onInput: r[0] || (r[0] = (i) => s.$emit("update:modelValue", i.target.value))
|
|
1859
|
+
}, null, 42, St),
|
|
1860
|
+
e.suffixIcon || s.$slots.suffix ? (a(), n("div", Vt, [
|
|
1861
|
+
e.suffixIcon ? (a(), C(S, {
|
|
1862
|
+
key: 0,
|
|
1863
|
+
icon: e.suffixIcon,
|
|
1864
|
+
size: "sm",
|
|
1865
|
+
animation: "none"
|
|
1866
|
+
}, null, 8, ["icon"])) : $(s.$slots, "suffix", { key: 1 })
|
|
1867
|
+
])) : c("", !0)
|
|
1868
|
+
]),
|
|
1869
|
+
e.error ? (a(), n("p", Dt, b(e.error), 1)) : e.helper ? (a(), n("p", zt, b(e.helper), 1)) : c("", !0)
|
|
1870
|
+
]));
|
|
1871
|
+
}
|
|
1872
|
+
}, As = {
|
|
1873
|
+
__name: "DXInputAddon",
|
|
1874
|
+
props: {
|
|
1875
|
+
icon: { type: Object, default: null }
|
|
1876
|
+
},
|
|
1877
|
+
setup(e) {
|
|
1878
|
+
const t = oe("inputGroup", { size: "md" }), l = g(() => {
|
|
1879
|
+
const s = {
|
|
1880
|
+
sm: "h-9",
|
|
1881
|
+
md: "h-11",
|
|
1882
|
+
lg: "h-13"
|
|
1883
|
+
};
|
|
1884
|
+
return s[t.size] || s.md;
|
|
1885
|
+
});
|
|
1886
|
+
return (s, r) => (a(), n("div", {
|
|
1887
|
+
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]),
|
|
1888
|
+
"data-component": "DXInputGroupAddon"
|
|
1889
|
+
}, [
|
|
1890
|
+
e.icon ? (a(), C(L(e.icon), {
|
|
1891
|
+
key: 0,
|
|
1892
|
+
class: "w-4 h-4"
|
|
1893
|
+
})) : c("", !0),
|
|
1894
|
+
$(s.$slots, "default")
|
|
1895
|
+
], 2));
|
|
1896
|
+
}
|
|
1897
|
+
}, Bt = {}, Xt = {
|
|
1898
|
+
class: "flex items-center justify-center gap-2 text-sm text-slate-600",
|
|
1899
|
+
"data-component": "DXLoader"
|
|
1900
|
+
};
|
|
1901
|
+
function It(e, t) {
|
|
1902
|
+
return a(), n("div", Xt, [
|
|
1903
|
+
t[1] || (t[1] = o("span", { class: "w-4 h-4 border-2 border-slate-300 border-t-slate-900 rounded-full animate-spin" }, null, -1)),
|
|
1904
|
+
$(e.$slots, "default", {}, () => [
|
|
1905
|
+
t[0] || (t[0] = j("Загрузка...", -1))
|
|
1906
|
+
])
|
|
1907
|
+
]);
|
|
1908
|
+
}
|
|
1909
|
+
const js = /* @__PURE__ */ Z(Bt, [["render", It]]), At = {
|
|
1910
|
+
class: "w-full",
|
|
1911
|
+
"data-component": "DXProgress"
|
|
1912
|
+
}, jt = {
|
|
1913
|
+
key: 0,
|
|
1914
|
+
class: "flex justify-between items-center mb-1"
|
|
1915
|
+
}, Mt = { class: "text-sm font-medium text-slate-700" }, Lt = {
|
|
1916
|
+
key: 0,
|
|
1917
|
+
class: "text-sm font-semibold text-slate-900"
|
|
1918
|
+
}, _t = ["aria-valuenow", "aria-valuemin", "aria-valuemax"], Ot = {
|
|
1919
|
+
key: 0,
|
|
1920
|
+
class: "text-xs font-medium text-white px-1"
|
|
1921
|
+
}, Tt = {
|
|
1922
|
+
__name: "DXProgress",
|
|
1923
|
+
props: {
|
|
1924
|
+
/** Текущее значение */
|
|
1925
|
+
value: { type: Number, default: 0 },
|
|
1926
|
+
/** Минимум */
|
|
1927
|
+
min: { type: Number, default: 0 },
|
|
1928
|
+
/** Максимум */
|
|
1929
|
+
max: { type: Number, default: 100 },
|
|
1930
|
+
/** Лейбл */
|
|
1931
|
+
label: { type: String, default: "" },
|
|
1932
|
+
/** Показывать лейбл */
|
|
1933
|
+
showLabel: { type: Boolean, default: !1 },
|
|
1934
|
+
/** Показывать значение справа */
|
|
1935
|
+
showValue: { type: Boolean, default: !1 },
|
|
1936
|
+
/** Показывать значение внутри бара */
|
|
1937
|
+
showInnerValue: { type: Boolean, default: !1 },
|
|
1938
|
+
/** Размер: xs | sm | md | lg */
|
|
1939
|
+
size: { type: String, default: "md" },
|
|
1940
|
+
/** Цвет: default | success | warning | danger | info */
|
|
1941
|
+
color: { type: String, default: "default" },
|
|
1942
|
+
/** Анимация */
|
|
1943
|
+
animated: { type: Boolean, default: !1 },
|
|
1944
|
+
/** Полосатый */
|
|
1945
|
+
striped: { type: Boolean, default: !1 }
|
|
1946
|
+
},
|
|
1947
|
+
setup(e) {
|
|
1948
|
+
const t = e, l = g(() => {
|
|
1949
|
+
const p = t.max - t.min;
|
|
1950
|
+
return Math.min(100, Math.max(0, (t.value - t.min) / p * 100));
|
|
1951
|
+
}), s = g(() => `${Math.round(l.value)}%`), r = {
|
|
1952
|
+
xs: "h-1",
|
|
1953
|
+
sm: "h-2",
|
|
1954
|
+
md: "h-3",
|
|
1955
|
+
lg: "h-4"
|
|
1956
|
+
}, i = {
|
|
1957
|
+
default: "bg-slate-800",
|
|
1958
|
+
success: "bg-emerald-500",
|
|
1959
|
+
warning: "bg-amber-500",
|
|
1960
|
+
danger: "bg-rose-500",
|
|
1961
|
+
info: "bg-blue-500"
|
|
1962
|
+
}, d = g(() => [
|
|
1963
|
+
"w-full bg-slate-200 rounded-full overflow-hidden",
|
|
1964
|
+
r[t.size] || r.md
|
|
1965
|
+
]), u = g(() => [
|
|
1966
|
+
"h-full rounded-full transition-all duration-300 flex items-center justify-end",
|
|
1967
|
+
i[t.color] || i.default,
|
|
1968
|
+
t.striped && "bg-stripes",
|
|
1969
|
+
t.animated && t.striped && "animate-stripes"
|
|
1970
|
+
]);
|
|
1971
|
+
return (p, v) => (a(), n("div", At, [
|
|
1972
|
+
e.showLabel || p.$slots.label ? (a(), n("div", jt, [
|
|
1973
|
+
o("span", Mt, [
|
|
1974
|
+
$(p.$slots, "label", {}, () => [
|
|
1975
|
+
j(b(e.label), 1)
|
|
1976
|
+
], !0)
|
|
1977
|
+
]),
|
|
1978
|
+
e.showValue ? (a(), n("span", Lt, b(s.value), 1)) : c("", !0)
|
|
1979
|
+
])) : c("", !0),
|
|
1980
|
+
o("div", {
|
|
1981
|
+
class: f(d.value)
|
|
1982
|
+
}, [
|
|
1983
|
+
o("div", {
|
|
1984
|
+
class: f(u.value),
|
|
1985
|
+
style: E({ width: `${l.value}%` }),
|
|
1986
|
+
role: "progressbar",
|
|
1987
|
+
"aria-valuenow": e.value,
|
|
1988
|
+
"aria-valuemin": e.min,
|
|
1989
|
+
"aria-valuemax": e.max
|
|
1990
|
+
}, [
|
|
1991
|
+
e.showInnerValue && l.value > 10 ? (a(), n("span", Ot, b(s.value), 1)) : c("", !0)
|
|
1992
|
+
], 14, _t)
|
|
1993
|
+
], 2)
|
|
1994
|
+
]));
|
|
1995
|
+
}
|
|
1996
|
+
}, Ms = /* @__PURE__ */ Z(Tt, [["__scopeId", "data-v-e469818e"]]), Zt = ["value", "checked", "disabled"], Nt = {
|
|
1997
|
+
key: 0,
|
|
1998
|
+
class: "text-sm text-slate-700 select-none"
|
|
1999
|
+
}, Ls = {
|
|
2000
|
+
__name: "DXRadio",
|
|
2001
|
+
props: {
|
|
2002
|
+
/** Текущее значение группы (v-model) */
|
|
2003
|
+
modelValue: [String, Number, Boolean],
|
|
2004
|
+
/** Значение этого radio */
|
|
2005
|
+
value: { type: [String, Number, Boolean], required: !0 },
|
|
2006
|
+
/** Текст лейбла */
|
|
2007
|
+
label: { type: String, default: "" },
|
|
2008
|
+
/** Отключенное состояние */
|
|
2009
|
+
disabled: { type: Boolean, default: !1 },
|
|
2010
|
+
/** Размер: sm | md | lg */
|
|
2011
|
+
size: { type: String, default: "md" }
|
|
2012
|
+
},
|
|
2013
|
+
emits: ["update:modelValue"],
|
|
2014
|
+
setup(e) {
|
|
2015
|
+
const t = e, l = g(() => {
|
|
2016
|
+
switch (t.size) {
|
|
2017
|
+
case "sm":
|
|
2018
|
+
return "h-3.5 w-3.5";
|
|
2019
|
+
case "lg":
|
|
2020
|
+
return "h-5 w-5";
|
|
2021
|
+
default:
|
|
2022
|
+
return "h-4 w-4";
|
|
2023
|
+
}
|
|
2024
|
+
});
|
|
2025
|
+
return (s, r) => (a(), n("label", {
|
|
2026
|
+
class: f(["inline-flex items-center gap-2 cursor-pointer", { "opacity-60 cursor-not-allowed": e.disabled }]),
|
|
2027
|
+
"data-component": "DXRadio"
|
|
2028
|
+
}, [
|
|
2029
|
+
o("input", {
|
|
2030
|
+
type: "radio",
|
|
2031
|
+
value: e.value,
|
|
2032
|
+
checked: e.modelValue === e.value,
|
|
2033
|
+
disabled: e.disabled,
|
|
2034
|
+
class: f(["rounded-full border-slate-300 text-slate-900 focus:ring-slate-900/10 focus:ring-2 transition", l.value]),
|
|
2035
|
+
onChange: r[0] || (r[0] = (i) => s.$emit("update:modelValue", e.value))
|
|
2036
|
+
}, null, 42, Zt),
|
|
2037
|
+
e.label ? (a(), n("span", Nt, b(e.label), 1)) : c("", !0)
|
|
2038
|
+
], 2));
|
|
2039
|
+
}
|
|
2040
|
+
}, Pt = {
|
|
2041
|
+
class: "w-full",
|
|
2042
|
+
"data-component": "DXSelect"
|
|
2043
|
+
}, Ft = {
|
|
2044
|
+
key: 0,
|
|
2045
|
+
class: "block text-sm text-slate-600 mb-1 font-medium"
|
|
2046
|
+
}, Ht = { class: "relative" }, Rt = {
|
|
2047
|
+
key: 0,
|
|
2048
|
+
class: "absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-slate-400"
|
|
2049
|
+
}, qt = ["value", "disabled"], Et = {
|
|
2050
|
+
key: 0,
|
|
2051
|
+
value: "",
|
|
2052
|
+
disabled: "",
|
|
2053
|
+
selected: ""
|
|
2054
|
+
}, Gt = ["value"], Ut = { class: "absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none" }, Kt = {
|
|
2055
|
+
key: 1,
|
|
2056
|
+
class: "mt-1 text-xs text-rose-500"
|
|
2057
|
+
}, Wt = {
|
|
2058
|
+
key: 2,
|
|
2059
|
+
class: "mt-1 text-xs text-slate-500"
|
|
2060
|
+
}, _s = {
|
|
2061
|
+
__name: "DXSelect",
|
|
2062
|
+
props: {
|
|
2063
|
+
/** Значение (v-model) */
|
|
2064
|
+
modelValue: [String, Number],
|
|
2065
|
+
/** Массив опций: [{ value, label }] */
|
|
2066
|
+
options: { type: Array, default: () => [] },
|
|
2067
|
+
/** Лейбл */
|
|
2068
|
+
label: { type: String, default: "" },
|
|
2069
|
+
/** Placeholder */
|
|
2070
|
+
placeholder: { type: String, default: "" },
|
|
2071
|
+
/** Текст ошибки */
|
|
2072
|
+
error: { type: String, default: "" },
|
|
2073
|
+
/** Вспомогательный текст */
|
|
2074
|
+
helper: { type: String, default: "" },
|
|
2075
|
+
/** Иконка слева (Heroicon компонент) */
|
|
2076
|
+
prefixIcon: { type: Object, default: null },
|
|
2077
|
+
/** Отключенное состояние */
|
|
2078
|
+
disabled: { type: Boolean, default: !1 },
|
|
2079
|
+
/** Размер: sm | md | lg */
|
|
2080
|
+
size: { type: String, default: "md" }
|
|
2081
|
+
},
|
|
2082
|
+
emits: ["update:modelValue"],
|
|
2083
|
+
setup(e) {
|
|
2084
|
+
const t = e, l = g(() => [
|
|
2085
|
+
"w-full appearance-none rounded-xl border border-slate-200 bg-white transition-colors pr-10",
|
|
2086
|
+
me(t.size, "input"),
|
|
2087
|
+
"text-slate-700",
|
|
2088
|
+
t.prefixIcon && "pl-10",
|
|
2089
|
+
!t.disabled && "hover:border-slate-300 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300",
|
|
2090
|
+
t.disabled && "opacity-60 cursor-not-allowed bg-slate-50",
|
|
2091
|
+
t.error && "border-rose-300 focus:ring-rose-500/10"
|
|
2092
|
+
]);
|
|
2093
|
+
return (s, r) => (a(), n("div", Pt, [
|
|
2094
|
+
e.label ? (a(), n("label", Ft, b(e.label), 1)) : c("", !0),
|
|
2095
|
+
o("div", Ht, [
|
|
2096
|
+
e.prefixIcon ? (a(), n("div", Rt, [
|
|
2097
|
+
A(S, {
|
|
2098
|
+
icon: e.prefixIcon,
|
|
2099
|
+
size: "sm",
|
|
2100
|
+
animation: "none"
|
|
2101
|
+
}, null, 8, ["icon"])
|
|
2102
|
+
])) : c("", !0),
|
|
2103
|
+
o("select", {
|
|
2104
|
+
value: e.modelValue,
|
|
2105
|
+
disabled: e.disabled,
|
|
2106
|
+
class: f(l.value),
|
|
2107
|
+
onChange: r[0] || (r[0] = (i) => s.$emit("update:modelValue", i.target.value))
|
|
2108
|
+
}, [
|
|
2109
|
+
e.placeholder ? (a(), n("option", Et, b(e.placeholder), 1)) : c("", !0),
|
|
2110
|
+
(a(!0), n(M, null, _(e.options, (i) => (a(), n("option", {
|
|
2111
|
+
key: i.value,
|
|
2112
|
+
value: i.value
|
|
2113
|
+
}, b(i.label), 9, Gt))), 128))
|
|
2114
|
+
], 42, qt),
|
|
2115
|
+
o("div", Ut, [
|
|
2116
|
+
A(S, {
|
|
2117
|
+
icon: O(le),
|
|
2118
|
+
size: "sm",
|
|
2119
|
+
animation: "none",
|
|
2120
|
+
class: "text-slate-400"
|
|
2121
|
+
}, null, 8, ["icon"])
|
|
2122
|
+
])
|
|
2123
|
+
]),
|
|
2124
|
+
e.error ? (a(), n("p", Kt, b(e.error), 1)) : e.helper ? (a(), n("p", Wt, b(e.helper), 1)) : c("", !0)
|
|
2125
|
+
]));
|
|
2126
|
+
}
|
|
2127
|
+
}, Os = {
|
|
2128
|
+
__name: "DXSkeleton",
|
|
2129
|
+
props: {
|
|
2130
|
+
/** Ширина */
|
|
2131
|
+
width: { type: String, default: "100%" },
|
|
2132
|
+
/** Высота */
|
|
2133
|
+
height: { type: String, default: "1rem" },
|
|
2134
|
+
/** Скругление */
|
|
2135
|
+
rounded: { type: String, default: "rounded-md" }
|
|
2136
|
+
},
|
|
2137
|
+
setup(e) {
|
|
2138
|
+
return (t, l) => (a(), n("div", {
|
|
2139
|
+
class: f(["animate-pulse bg-slate-200", e.rounded]),
|
|
2140
|
+
style: E({ width: e.width, height: e.height }),
|
|
2141
|
+
"data-component": "DXSkeleton"
|
|
2142
|
+
}, null, 6));
|
|
2143
|
+
}
|
|
2144
|
+
}, Yt = {
|
|
2145
|
+
class: "w-full",
|
|
2146
|
+
"data-component": "DXSlider"
|
|
2147
|
+
}, Jt = { class: "flex items-center justify-between mb-2" }, Qt = {
|
|
2148
|
+
key: 0,
|
|
2149
|
+
class: "text-sm font-medium text-slate-700"
|
|
2150
|
+
}, el = {
|
|
2151
|
+
key: 1,
|
|
2152
|
+
class: "text-sm font-semibold text-slate-900"
|
|
2153
|
+
}, tl = { class: "relative" }, ll = {
|
|
2154
|
+
key: 0,
|
|
2155
|
+
class: "absolute top-1/2 left-0 right-0 flex justify-between pointer-events-none",
|
|
2156
|
+
style: { transform: "translateY(-50%)" }
|
|
2157
|
+
}, al = ["value", "min", "max", "step", "disabled"], nl = {
|
|
2158
|
+
key: 0,
|
|
2159
|
+
class: "flex justify-between mt-1 px-1"
|
|
2160
|
+
}, sl = {
|
|
2161
|
+
key: 1,
|
|
2162
|
+
class: "mt-1 text-xs text-slate-500"
|
|
2163
|
+
}, ol = {
|
|
2164
|
+
__name: "DXSlider",
|
|
2165
|
+
props: {
|
|
2166
|
+
/** Значение (v-model) */
|
|
2167
|
+
modelValue: { type: Number, default: 0 },
|
|
2168
|
+
/** Минимум */
|
|
2169
|
+
min: { type: Number, default: 0 },
|
|
2170
|
+
/** Максимум */
|
|
2171
|
+
max: { type: Number, default: 100 },
|
|
2172
|
+
/** Шаг */
|
|
2173
|
+
step: { type: Number, default: 1 },
|
|
2174
|
+
/** Лейбл */
|
|
2175
|
+
label: { type: String, default: "" },
|
|
2176
|
+
/** Вспомогательный текст */
|
|
2177
|
+
helper: { type: String, default: "" },
|
|
2178
|
+
/** Показывать текущее значение */
|
|
2179
|
+
showValue: { type: Boolean, default: !0 },
|
|
2180
|
+
/** Показывать засечки (ticks) */
|
|
2181
|
+
ticks: { type: Boolean, default: !1 },
|
|
2182
|
+
/** Показывать подписи к засечкам */
|
|
2183
|
+
showTickLabels: { type: Boolean, default: !0 },
|
|
2184
|
+
/** Количество засечек */
|
|
2185
|
+
tickCount: { type: Number, default: 5 },
|
|
2186
|
+
/** Массив иконок для засечек (Heroicon компоненты) */
|
|
2187
|
+
tickIcons: { type: Array, default: null },
|
|
2188
|
+
/** Анимация активной иконки: wiggle | scale | rotate | none */
|
|
2189
|
+
tickIconAnimation: { type: String, default: "wiggle" },
|
|
2190
|
+
/** Единица измерения */
|
|
2191
|
+
unit: { type: String, default: "" },
|
|
2192
|
+
/** Отключенное состояние */
|
|
2193
|
+
disabled: { type: Boolean, default: !1 }
|
|
2194
|
+
},
|
|
2195
|
+
emits: ["update:modelValue"],
|
|
2196
|
+
setup(e, { emit: t }) {
|
|
2197
|
+
const l = e, s = t, r = g(() => `${l.modelValue}${l.unit}`), i = g(() => {
|
|
2198
|
+
if (!l.ticks) return [];
|
|
2199
|
+
const m = l.tickCount, h = (l.max - l.min) / (m - 1);
|
|
2200
|
+
return Array.from({ length: m }, (y, x) => Math.round(l.min + h * x));
|
|
2201
|
+
}), d = (m) => {
|
|
2202
|
+
s("update:modelValue", Number(m.target.value));
|
|
2203
|
+
}, u = g(() => {
|
|
2204
|
+
if (!l.ticks || !i.value.length) return -1;
|
|
2205
|
+
let m = 0, h = Math.abs(l.modelValue - i.value[0]);
|
|
2206
|
+
return i.value.forEach((y, x) => {
|
|
2207
|
+
const V = Math.abs(l.modelValue - y);
|
|
2208
|
+
V < h && (h = V, m = x);
|
|
2209
|
+
}), m;
|
|
2210
|
+
}), p = (m) => u.value === m, v = (m) => p(m) ? l.tickIconAnimation : "none";
|
|
2211
|
+
return (m, h) => (a(), n("div", Yt, [
|
|
2212
|
+
o("div", Jt, [
|
|
2213
|
+
e.label ? (a(), n("label", Qt, b(e.label), 1)) : c("", !0),
|
|
2214
|
+
e.showValue ? (a(), n("span", el, b(r.value), 1)) : c("", !0)
|
|
2215
|
+
]),
|
|
2216
|
+
o("div", tl, [
|
|
2217
|
+
e.ticks ? (a(), n("div", ll, [
|
|
2218
|
+
(a(!0), n(M, null, _(i.value, (y, x) => (a(), n("div", {
|
|
2219
|
+
key: `tick-${x}`,
|
|
2220
|
+
class: "w-0.5 h-3 bg-slate-400 rounded-full"
|
|
2221
|
+
}))), 128))
|
|
2222
|
+
])) : c("", !0),
|
|
2223
|
+
o("input", {
|
|
2224
|
+
type: "range",
|
|
2225
|
+
value: e.modelValue,
|
|
2226
|
+
min: e.min,
|
|
2227
|
+
max: e.max,
|
|
2228
|
+
step: e.step,
|
|
2229
|
+
disabled: e.disabled,
|
|
2230
|
+
class: "slider w-full appearance-none cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed relative z-10",
|
|
2231
|
+
onInput: d
|
|
2232
|
+
}, null, 40, al)
|
|
2233
|
+
]),
|
|
2234
|
+
e.ticks && (e.showTickLabels || e.tickIcons) ? (a(), n("div", nl, [
|
|
2235
|
+
(a(!0), n(M, null, _(i.value, (y, x) => (a(), n("span", {
|
|
2236
|
+
key: y,
|
|
2237
|
+
class: f(["flex flex-col items-center gap-0.5 transition-transform duration-200", { "scale-110": p(x) }])
|
|
2238
|
+
}, [
|
|
2239
|
+
e.tickIcons && e.tickIcons[x] ? (a(), C(S, {
|
|
2240
|
+
key: 0,
|
|
2241
|
+
icon: e.tickIcons[x],
|
|
2242
|
+
size: "sm",
|
|
2243
|
+
animation: v(x),
|
|
2244
|
+
class: f(p(x) ? "text-slate-900" : "text-slate-400")
|
|
2245
|
+
}, null, 8, ["icon", "animation", "class"])) : c("", !0),
|
|
2246
|
+
e.showTickLabels ? (a(), n("span", {
|
|
2247
|
+
key: 1,
|
|
2248
|
+
class: f(["text-xs transition-colors duration-200", p(x) ? "text-slate-900 font-semibold" : "text-slate-500"])
|
|
2249
|
+
}, b(y) + b(e.unit), 3)) : c("", !0)
|
|
2250
|
+
], 2))), 128))
|
|
2251
|
+
])) : c("", !0),
|
|
2252
|
+
e.helper ? (a(), n("p", sl, b(e.helper), 1)) : c("", !0)
|
|
2253
|
+
]));
|
|
2254
|
+
}
|
|
2255
|
+
}, Ts = /* @__PURE__ */ Z(ol, [["__scopeId", "data-v-d55b8f6a"]]), rl = {
|
|
2256
|
+
class: "flex flex-wrap gap-2",
|
|
2257
|
+
"data-component": "DXTags"
|
|
2258
|
+
}, il = ["onClick", "aria-label"], Zs = {
|
|
2259
|
+
__name: "DXTags",
|
|
2260
|
+
props: {
|
|
2261
|
+
/** Массив тегов: строки или объекты { label, icon?, closable?, color?, iconAnimation? } */
|
|
2262
|
+
tags: { type: Array, default: () => [] },
|
|
2263
|
+
/** Размер тегов: default | large */
|
|
2264
|
+
variant: { type: String, default: "default" },
|
|
2265
|
+
/** Цвет по умолчанию: default | primary | success | warning | danger | info */
|
|
2266
|
+
color: { type: String, default: "default" },
|
|
2267
|
+
/** Все теги удаляемые */
|
|
2268
|
+
closable: { type: Boolean, default: !1 }
|
|
2269
|
+
},
|
|
2270
|
+
emits: ["remove"],
|
|
2271
|
+
setup(e, { emit: t }) {
|
|
2272
|
+
const l = e, s = t, r = g(() => l.tags.map((v) => typeof v == "string" ? {
|
|
2273
|
+
label: v,
|
|
2274
|
+
icon: null,
|
|
2275
|
+
closable: l.closable,
|
|
2276
|
+
color: l.color,
|
|
2277
|
+
iconAnimation: "none"
|
|
2278
|
+
} : {
|
|
2279
|
+
label: v.label || v,
|
|
2280
|
+
icon: v.icon || null,
|
|
2281
|
+
closable: v.closable !== void 0 ? v.closable : l.closable,
|
|
2282
|
+
color: v.color || l.color,
|
|
2283
|
+
iconAnimation: v.iconAnimation || "none"
|
|
2284
|
+
})), i = (v, m) => `${v.label}-${m}`, d = {
|
|
2285
|
+
default: "bg-slate-100 text-slate-800 border-slate-200",
|
|
2286
|
+
primary: "bg-blue-100 text-blue-800 border-blue-200",
|
|
2287
|
+
success: "bg-green-100 text-green-800 border-green-200",
|
|
2288
|
+
warning: "bg-yellow-100 text-yellow-800 border-yellow-200",
|
|
2289
|
+
danger: "bg-red-100 text-red-800 border-red-200",
|
|
2290
|
+
info: "bg-cyan-100 text-cyan-800 border-cyan-200"
|
|
2291
|
+
}, u = (v) => {
|
|
2292
|
+
const m = l.variant === "large" ? "px-3 py-1.5 text-sm" : "px-2 py-1 text-xs", h = d[v.color] || d.default;
|
|
2293
|
+
return `${m} ${h} rounded-full border`;
|
|
2294
|
+
}, p = (v, m) => {
|
|
2295
|
+
s("remove", { tag: v, index: m });
|
|
2296
|
+
};
|
|
2297
|
+
return (v, m) => (a(), n("div", rl, [
|
|
2298
|
+
(a(!0), n(M, null, _(r.value, (h, y) => (a(), n("span", {
|
|
2299
|
+
key: i(h, y),
|
|
2300
|
+
class: f([u(h), "inline-flex items-center gap-1.5 transition-all duration-200"])
|
|
2301
|
+
}, [
|
|
2302
|
+
h.icon ? (a(), C(S, {
|
|
2303
|
+
key: 0,
|
|
2304
|
+
icon: h.icon,
|
|
2305
|
+
size: e.variant === "large" ? "sm" : "xs",
|
|
2306
|
+
animation: h.iconAnimation || "none"
|
|
2307
|
+
}, null, 8, ["icon", "size", "animation"])) : c("", !0),
|
|
2308
|
+
o("span", null, b(h.label), 1),
|
|
2309
|
+
h.closable ? (a(), n("button", {
|
|
2310
|
+
key: 1,
|
|
2311
|
+
type: "button",
|
|
2312
|
+
onClick: (x) => p(h, y),
|
|
2313
|
+
class: "ml-0.5 -mr-1 hover:bg-slate-200/50 rounded-full p-0.5 transition-colors",
|
|
2314
|
+
"aria-label": `Remove ${h.label}`
|
|
2315
|
+
}, [
|
|
2316
|
+
A(S, {
|
|
2317
|
+
icon: O(je),
|
|
2318
|
+
size: "xs",
|
|
2319
|
+
animation: "scale"
|
|
2320
|
+
}, null, 8, ["icon"])
|
|
2321
|
+
], 8, il)) : c("", !0)
|
|
2322
|
+
], 2))), 128))
|
|
2323
|
+
]));
|
|
2324
|
+
}
|
|
2325
|
+
}, dl = {
|
|
2326
|
+
class: "w-full",
|
|
2327
|
+
"data-component": "DXTextarea"
|
|
2328
|
+
}, ul = {
|
|
2329
|
+
key: 0,
|
|
2330
|
+
class: "block text-sm text-slate-600 mb-1 font-medium"
|
|
2331
|
+
}, cl = { class: "relative" }, ml = {
|
|
2332
|
+
key: 0,
|
|
2333
|
+
class: "absolute left-3 top-3 text-slate-400 z-10"
|
|
2334
|
+
}, fl = ["rows", "placeholder", "value", "disabled", "maxlength"], pl = {
|
|
2335
|
+
key: 1,
|
|
2336
|
+
class: "absolute right-3 top-3 text-slate-400 z-10"
|
|
2337
|
+
}, gl = {
|
|
2338
|
+
key: 2,
|
|
2339
|
+
class: "absolute right-3 bottom-3 text-xs text-slate-400"
|
|
2340
|
+
}, vl = {
|
|
2341
|
+
key: 1,
|
|
2342
|
+
class: "mt-1 text-xs text-rose-500"
|
|
2343
|
+
}, bl = {
|
|
2344
|
+
key: 2,
|
|
2345
|
+
class: "mt-1 text-xs text-slate-500"
|
|
2346
|
+
}, Ns = {
|
|
2347
|
+
__name: "DXTextarea",
|
|
2348
|
+
props: {
|
|
2349
|
+
/** Значение (v-model) */
|
|
2350
|
+
modelValue: String,
|
|
2351
|
+
/** Placeholder */
|
|
2352
|
+
placeholder: { type: String, default: "" },
|
|
2353
|
+
/** Количество строк */
|
|
2354
|
+
rows: { type: Number, default: 3 },
|
|
2355
|
+
/** Лейбл */
|
|
2356
|
+
label: { type: String, default: "" },
|
|
2357
|
+
/** Отключенное состояние */
|
|
2358
|
+
disabled: { type: Boolean, default: !1 },
|
|
2359
|
+
/** Текст ошибки */
|
|
2360
|
+
error: { type: String, default: "" },
|
|
2361
|
+
/** Вспомогательный текст */
|
|
2362
|
+
helper: { type: String, default: "" },
|
|
2363
|
+
/** Иконка слева (в верхнем левом углу) */
|
|
2364
|
+
prefixIcon: { type: Object, default: null },
|
|
2365
|
+
/** Иконка справа (в верхнем правом углу) */
|
|
2366
|
+
suffixIcon: { type: Object, default: null },
|
|
2367
|
+
/** Максимальная длина */
|
|
2368
|
+
maxLength: { type: Number, default: 0 },
|
|
2369
|
+
/** Показывать счетчик символов */
|
|
2370
|
+
showCount: { type: Boolean, default: !1 },
|
|
2371
|
+
/** Автоматическое изменение размера */
|
|
2372
|
+
autoResize: { type: Boolean, default: !1 }
|
|
2373
|
+
},
|
|
2374
|
+
emits: ["update:modelValue"],
|
|
2375
|
+
setup(e, { emit: t }) {
|
|
2376
|
+
var u;
|
|
2377
|
+
const l = e, s = t, r = D(((u = l.modelValue) == null ? void 0 : u.length) || 0), i = (p) => {
|
|
2378
|
+
const v = p.target.value;
|
|
2379
|
+
r.value = v.length, s("update:modelValue", v), l.autoResize && (p.target.style.height = "auto", p.target.style.height = p.target.scrollHeight + "px");
|
|
2380
|
+
};
|
|
2381
|
+
H(() => l.modelValue, (p) => {
|
|
2382
|
+
r.value = (p == null ? void 0 : p.length) || 0;
|
|
2383
|
+
});
|
|
2384
|
+
const d = g(() => [
|
|
2385
|
+
"w-full rounded-xl border border-slate-200 px-4 py-3 text-sm text-slate-700 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300 transition-colors disabled:opacity-60 disabled:cursor-not-allowed disabled:bg-slate-50",
|
|
2386
|
+
l.prefixIcon && "pl-10",
|
|
2387
|
+
l.suffixIcon && "pr-10",
|
|
2388
|
+
l.maxLength && l.showCount && "pb-8",
|
|
2389
|
+
l.error && "border-rose-300 focus:ring-rose-500/10"
|
|
2390
|
+
]);
|
|
2391
|
+
return (p, v) => (a(), n("div", dl, [
|
|
2392
|
+
e.label ? (a(), n("label", ul, b(e.label), 1)) : c("", !0),
|
|
2393
|
+
o("div", cl, [
|
|
2394
|
+
e.prefixIcon ? (a(), n("div", ml, [
|
|
2395
|
+
A(S, {
|
|
2396
|
+
icon: e.prefixIcon,
|
|
2397
|
+
size: "sm",
|
|
2398
|
+
animation: "none"
|
|
2399
|
+
}, null, 8, ["icon"])
|
|
2400
|
+
])) : c("", !0),
|
|
2401
|
+
o("textarea", {
|
|
2402
|
+
rows: e.rows,
|
|
2403
|
+
placeholder: e.placeholder,
|
|
2404
|
+
value: e.modelValue,
|
|
2405
|
+
disabled: e.disabled,
|
|
2406
|
+
maxlength: e.maxLength,
|
|
2407
|
+
class: f(d.value),
|
|
2408
|
+
onInput: i
|
|
2409
|
+
}, null, 42, fl),
|
|
2410
|
+
e.suffixIcon ? (a(), n("div", pl, [
|
|
2411
|
+
A(S, {
|
|
2412
|
+
icon: e.suffixIcon,
|
|
2413
|
+
size: "sm",
|
|
2414
|
+
animation: "none"
|
|
2415
|
+
}, null, 8, ["icon"])
|
|
2416
|
+
])) : c("", !0),
|
|
2417
|
+
e.maxLength && e.showCount ? (a(), n("div", gl, b(r.value) + " / " + b(e.maxLength), 1)) : c("", !0)
|
|
2418
|
+
]),
|
|
2419
|
+
e.error ? (a(), n("p", vl, b(e.error), 1)) : e.helper ? (a(), n("p", bl, b(e.helper), 1)) : c("", !0)
|
|
2420
|
+
]));
|
|
2421
|
+
}
|
|
2422
|
+
}, F = {
|
|
2423
|
+
info: {
|
|
2424
|
+
bg: "bg-blue-50",
|
|
2425
|
+
text: "text-blue-800",
|
|
2426
|
+
border: "border-blue-200",
|
|
2427
|
+
icon: te,
|
|
2428
|
+
iconColor: "text-blue-500"
|
|
2429
|
+
},
|
|
2430
|
+
success: {
|
|
2431
|
+
bg: "bg-emerald-50",
|
|
2432
|
+
text: "text-emerald-800",
|
|
2433
|
+
border: "border-emerald-200",
|
|
2434
|
+
icon: Q,
|
|
2435
|
+
iconColor: "text-emerald-500"
|
|
2436
|
+
},
|
|
2437
|
+
warning: {
|
|
2438
|
+
bg: "bg-amber-50",
|
|
2439
|
+
text: "text-amber-800",
|
|
2440
|
+
border: "border-amber-200",
|
|
2441
|
+
icon: ee,
|
|
2442
|
+
iconColor: "text-amber-500"
|
|
2443
|
+
},
|
|
2444
|
+
danger: {
|
|
2445
|
+
bg: "bg-rose-50",
|
|
2446
|
+
text: "text-rose-800",
|
|
2447
|
+
border: "border-rose-200",
|
|
2448
|
+
icon: ie,
|
|
2449
|
+
iconColor: "text-rose-500"
|
|
2450
|
+
}
|
|
2451
|
+
};
|
|
2452
|
+
function Ps(e) {
|
|
2453
|
+
const t = F[e] || F.info;
|
|
2454
|
+
return `${t.bg} ${t.text} ${t.border}`;
|
|
2455
|
+
}
|
|
2456
|
+
function Fs(e) {
|
|
2457
|
+
return (F[e] || F.info).icon;
|
|
2458
|
+
}
|
|
2459
|
+
function hl(e) {
|
|
2460
|
+
return F[e] || F.info;
|
|
2461
|
+
}
|
|
2462
|
+
const xl = ["data-variant"], yl = { class: "flex-1" }, Hs = {
|
|
2463
|
+
__name: "DXToast",
|
|
2464
|
+
props: {
|
|
2465
|
+
/** Вариант: info | success | warning | danger */
|
|
2466
|
+
variant: { type: String, default: "info" },
|
|
2467
|
+
/** Показывать иконку */
|
|
2468
|
+
showIcon: { type: Boolean, default: !0 }
|
|
2469
|
+
},
|
|
2470
|
+
setup(e) {
|
|
2471
|
+
const t = e, l = g(() => hl(t.variant)), s = g(() => `${l.value.bg} ${l.value.border} ${l.value.text}`), r = g(() => t.showIcon ? l.value.icon : null), i = g(() => l.value.iconColor);
|
|
2472
|
+
return (d, u) => (a(), n("div", {
|
|
2473
|
+
class: f(["flex items-start gap-3 rounded-2xl border px-4 py-3 text-sm", s.value]),
|
|
2474
|
+
"data-component": "DXToast",
|
|
2475
|
+
"data-variant": e.variant
|
|
2476
|
+
}, [
|
|
2477
|
+
r.value ? (a(), C(S, {
|
|
2478
|
+
key: 0,
|
|
2479
|
+
icon: r.value,
|
|
2480
|
+
size: "md",
|
|
2481
|
+
animation: "none",
|
|
2482
|
+
class: f([i.value, "shrink-0 mt-0.5"])
|
|
2483
|
+
}, null, 8, ["icon", "class"])) : c("", !0),
|
|
2484
|
+
o("div", yl, [
|
|
2485
|
+
$(d.$slots, "default")
|
|
2486
|
+
])
|
|
2487
|
+
], 10, xl));
|
|
2488
|
+
}
|
|
2489
|
+
}, wl = ["aria-checked", "disabled"], kl = {
|
|
2490
|
+
key: 0,
|
|
2491
|
+
class: "text-sm text-slate-700 select-none"
|
|
2492
|
+
}, Rs = {
|
|
2493
|
+
__name: "DXToggle",
|
|
2494
|
+
props: {
|
|
2495
|
+
/** Значение (v-model) */
|
|
2496
|
+
modelValue: { type: Boolean, default: !1 },
|
|
2497
|
+
/** Текст лейбла */
|
|
2498
|
+
label: { type: String, default: "" },
|
|
2499
|
+
/** Отключенное состояние */
|
|
2500
|
+
disabled: { type: Boolean, default: !1 }
|
|
2501
|
+
},
|
|
2502
|
+
emits: ["update:modelValue"],
|
|
2503
|
+
setup(e) {
|
|
2504
|
+
return (t, l) => (a(), n("label", {
|
|
2505
|
+
class: f(["inline-flex items-center gap-2 cursor-pointer", { "opacity-60 cursor-not-allowed": e.disabled }]),
|
|
2506
|
+
"data-component": "DXToggle"
|
|
2507
|
+
}, [
|
|
2508
|
+
o("button", {
|
|
2509
|
+
type: "button",
|
|
2510
|
+
role: "switch",
|
|
2511
|
+
"aria-checked": e.modelValue,
|
|
2512
|
+
disabled: e.disabled,
|
|
2513
|
+
class: f(["relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:ring-offset-2", e.modelValue ? "bg-slate-900" : "bg-slate-200"]),
|
|
2514
|
+
onClick: l[0] || (l[0] = (s) => t.$emit("update:modelValue", !e.modelValue))
|
|
2515
|
+
}, [
|
|
2516
|
+
o("span", {
|
|
2517
|
+
class: f(["inline-block h-4 w-4 transform rounded-full bg-white transition-transform", e.modelValue ? "translate-x-6" : "translate-x-1"])
|
|
2518
|
+
}, null, 2)
|
|
2519
|
+
], 10, wl),
|
|
2520
|
+
e.label ? (a(), n("span", kl, b(e.label), 1)) : c("", !0)
|
|
2521
|
+
], 2));
|
|
2522
|
+
}
|
|
2523
|
+
}, $l = ["disabled", "aria-pressed", "aria-label"], Cl = { key: 1 }, Sl = {
|
|
2524
|
+
__name: "DXToggleButton",
|
|
2525
|
+
props: {
|
|
2526
|
+
/** Текущее состояние (v-model) */
|
|
2527
|
+
modelValue: { type: Boolean, default: !1 },
|
|
2528
|
+
/** Иконка для активного состояния */
|
|
2529
|
+
activeIcon: { type: Object, required: !0 },
|
|
2530
|
+
/** Иконка для неактивного состояния */
|
|
2531
|
+
inactiveIcon: { type: Object, required: !0 },
|
|
2532
|
+
/** Текст для активного состояния (опционально) */
|
|
2533
|
+
activeLabel: { type: String, default: null },
|
|
2534
|
+
/** Текст для неактивного состояния (опционально) */
|
|
2535
|
+
inactiveLabel: { type: String, default: null },
|
|
2536
|
+
/** Вариант оформления для активного состояния */
|
|
2537
|
+
activeVariant: { type: String, default: "primary" },
|
|
2538
|
+
/** Вариант оформления для неактивного состояния */
|
|
2539
|
+
inactiveVariant: { type: String, default: "ghost" },
|
|
2540
|
+
/** Размер: sm | md | lg */
|
|
2541
|
+
size: { type: String, default: "md" },
|
|
2542
|
+
/** Анимация иконки: none | wiggle | scale | rotate */
|
|
2543
|
+
iconAnimation: { type: String, default: "wiggle" },
|
|
2544
|
+
/** Растянуть на всю ширину */
|
|
2545
|
+
block: { type: Boolean, default: !1 },
|
|
2546
|
+
/** Отключенное состояние */
|
|
2547
|
+
disabled: { type: Boolean, default: !1 },
|
|
2548
|
+
/** Aria-label для доступности */
|
|
2549
|
+
ariaLabel: { type: String, default: null }
|
|
2550
|
+
},
|
|
2551
|
+
emits: ["update:modelValue", "change"],
|
|
2552
|
+
setup(e, { emit: t }) {
|
|
2553
|
+
const l = e, s = t, r = () => {
|
|
2554
|
+
const h = !l.modelValue;
|
|
2555
|
+
s("update:modelValue", h), s("change", h);
|
|
2556
|
+
}, i = g(() => l.modelValue ? l.activeIcon : l.inactiveIcon), d = g(() => l.modelValue ? l.activeLabel : l.inactiveLabel), u = g(() => l.size === "sm" ? "xs" : l.size === "lg" ? "md" : "sm"), p = g(() => d.value ? l.size === "sm" ? "px-3 py-2 text-xs" : l.size === "lg" ? "px-5 py-3 text-base" : "px-4 py-2.5 text-sm" : l.size === "sm" ? "h-9 w-9 text-xs" : l.size === "lg" ? "h-12 w-12 text-base" : "h-10 w-10 text-sm"), v = {
|
|
2557
|
+
primary: "bg-slate-800 text-white hover:bg-slate-700 focus:ring-slate-500",
|
|
2558
|
+
ghost: "border border-slate-200 text-slate-700 hover:border-slate-300 hover:bg-slate-50 bg-white focus:ring-slate-400",
|
|
2559
|
+
danger: "bg-rose-600 text-white hover:bg-rose-500 focus:ring-rose-500",
|
|
2560
|
+
success: "bg-green-600 text-white hover:bg-green-500 focus:ring-green-500",
|
|
2561
|
+
warning: "bg-amber-500 text-white hover:bg-amber-400 focus:ring-amber-500",
|
|
2562
|
+
outline: "border border-slate-200 text-slate-700 hover:border-slate-300 bg-transparent focus:ring-slate-400"
|
|
2563
|
+
}, m = g(() => {
|
|
2564
|
+
const h = l.modelValue ? l.activeVariant : l.inactiveVariant;
|
|
2565
|
+
return v[h] || v.ghost;
|
|
2566
|
+
});
|
|
2567
|
+
return (h, y) => (a(), n("button", {
|
|
2568
|
+
type: "button",
|
|
2569
|
+
class: f(["toggle-btn inline-flex items-center justify-center gap-2 rounded-xl font-semibold transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-60 disabled:cursor-not-allowed", [p.value, m.value, { "w-full": e.block }]]),
|
|
2570
|
+
disabled: e.disabled,
|
|
2571
|
+
onClick: r,
|
|
2572
|
+
"aria-pressed": e.modelValue,
|
|
2573
|
+
"aria-label": e.ariaLabel,
|
|
2574
|
+
"data-component": "DXToggleButton"
|
|
2575
|
+
}, [
|
|
2576
|
+
i.value ? (a(), C(S, {
|
|
2577
|
+
key: 0,
|
|
2578
|
+
icon: i.value,
|
|
2579
|
+
size: u.value,
|
|
2580
|
+
animation: e.iconAnimation
|
|
2581
|
+
}, null, 8, ["icon", "size", "animation"])) : c("", !0),
|
|
2582
|
+
d.value ? (a(), n("span", Cl, b(d.value), 1)) : c("", !0)
|
|
2583
|
+
], 10, $l));
|
|
2584
|
+
}
|
|
2585
|
+
}, qs = /* @__PURE__ */ Z(Sl, [["__scopeId", "data-v-249aa090"]]), Vl = {
|
|
2586
|
+
__name: "DXTooltip",
|
|
2587
|
+
props: {
|
|
2588
|
+
/** Текст подсказки */
|
|
2589
|
+
content: { type: String, default: "" },
|
|
2590
|
+
/** Позиция: top | bottom | left | right */
|
|
2591
|
+
position: { type: String, default: "top" },
|
|
2592
|
+
/** Цвет: dark | light */
|
|
2593
|
+
color: { type: String, default: "dark" },
|
|
2594
|
+
/** Максимальная ширина */
|
|
2595
|
+
maxWidth: { type: String, default: "200px" }
|
|
2596
|
+
},
|
|
2597
|
+
setup(e) {
|
|
2598
|
+
const t = e, l = D(!1), s = {
|
|
2599
|
+
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
2600
|
+
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
2601
|
+
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
2602
|
+
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
2603
|
+
}, r = {
|
|
2604
|
+
top: "top-full left-1/2 -translate-x-1/2 border-t-slate-900 border-l-transparent border-r-transparent border-b-transparent",
|
|
2605
|
+
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-slate-900 border-l-transparent border-r-transparent border-t-transparent",
|
|
2606
|
+
left: "left-full top-1/2 -translate-y-1/2 border-l-slate-900 border-t-transparent border-b-transparent border-r-transparent",
|
|
2607
|
+
right: "right-full top-1/2 -translate-y-1/2 border-r-slate-900 border-t-transparent border-b-transparent border-l-transparent"
|
|
2608
|
+
}, i = {
|
|
2609
|
+
top: "top-full left-1/2 -translate-x-1/2 border-t-white border-l-transparent border-r-transparent border-b-transparent",
|
|
2610
|
+
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-white border-l-transparent border-r-transparent border-t-transparent",
|
|
2611
|
+
left: "left-full top-1/2 -translate-y-1/2 border-l-white border-t-transparent border-b-transparent border-r-transparent",
|
|
2612
|
+
right: "right-full top-1/2 -translate-y-1/2 border-r-white border-t-transparent border-b-transparent border-l-transparent"
|
|
2613
|
+
}, d = {
|
|
2614
|
+
dark: "bg-slate-900 text-white",
|
|
2615
|
+
light: "bg-white text-slate-900 border border-slate-200 shadow-lg"
|
|
2616
|
+
}, u = g(() => [
|
|
2617
|
+
"absolute z-50 px-3 py-2 text-sm rounded-lg whitespace-normal",
|
|
2618
|
+
s[t.position] || s.top,
|
|
2619
|
+
d[t.color] || d.dark
|
|
2620
|
+
]), p = g(() => [
|
|
2621
|
+
"absolute w-0 h-0 border-4",
|
|
2622
|
+
t.color === "light" ? i[t.position] : r[t.position]
|
|
2623
|
+
]);
|
|
2624
|
+
return (v, m) => (a(), n("div", {
|
|
2625
|
+
class: "relative inline-block",
|
|
2626
|
+
onMouseenter: m[0] || (m[0] = (h) => l.value = !0),
|
|
2627
|
+
onMouseleave: m[1] || (m[1] = (h) => l.value = !1),
|
|
2628
|
+
onFocus: m[2] || (m[2] = (h) => l.value = !0),
|
|
2629
|
+
onBlur: m[3] || (m[3] = (h) => l.value = !1),
|
|
2630
|
+
"data-component": "DXTooltip"
|
|
2631
|
+
}, [
|
|
2632
|
+
$(v.$slots, "default", {}, void 0, !0),
|
|
2633
|
+
A(Y, { name: "tooltip" }, {
|
|
2634
|
+
default: P(() => [
|
|
2635
|
+
l.value && (e.content || v.$slots.content) ? (a(), n("div", {
|
|
2636
|
+
key: 0,
|
|
2637
|
+
class: f(u.value),
|
|
2638
|
+
role: "tooltip"
|
|
2639
|
+
}, [
|
|
2640
|
+
$(v.$slots, "content", {}, () => [
|
|
2641
|
+
j(b(e.content), 1)
|
|
2642
|
+
], !0),
|
|
2643
|
+
o("div", {
|
|
2644
|
+
class: f(p.value)
|
|
2645
|
+
}, null, 2)
|
|
2646
|
+
], 2)) : c("", !0)
|
|
2647
|
+
]),
|
|
2648
|
+
_: 3
|
|
2649
|
+
})
|
|
2650
|
+
], 32));
|
|
2651
|
+
}
|
|
2652
|
+
}, Es = /* @__PURE__ */ Z(Vl, [["__scopeId", "data-v-bd65e96f"]]), ne = {
|
|
2653
|
+
__name: "DXValidationIcon",
|
|
2654
|
+
props: {
|
|
2655
|
+
/** Состояние: success | error | warning | info */
|
|
2656
|
+
state: { type: String, required: !0 },
|
|
2657
|
+
/** Размер иконки */
|
|
2658
|
+
size: { type: String, default: "md" }
|
|
2659
|
+
},
|
|
2660
|
+
setup(e) {
|
|
2661
|
+
const t = e, l = {
|
|
2662
|
+
success: {
|
|
2663
|
+
icon: Q,
|
|
2664
|
+
color: "text-emerald-500"
|
|
2665
|
+
},
|
|
2666
|
+
error: {
|
|
2667
|
+
icon: Ce,
|
|
2668
|
+
color: "text-rose-500"
|
|
2669
|
+
},
|
|
2670
|
+
warning: {
|
|
2671
|
+
icon: ee,
|
|
2672
|
+
color: "text-amber-500"
|
|
2673
|
+
},
|
|
2674
|
+
info: {
|
|
2675
|
+
icon: te,
|
|
2676
|
+
color: "text-blue-500"
|
|
2677
|
+
}
|
|
2678
|
+
}, s = g(() => l[t.state] || l.info), r = g(() => s.value.icon), i = g(() => s.value.color);
|
|
2679
|
+
return (d, u) => r.value ? (a(), C(S, {
|
|
2680
|
+
key: 0,
|
|
2681
|
+
icon: r.value,
|
|
2682
|
+
size: e.size,
|
|
2683
|
+
animation: "scale",
|
|
2684
|
+
class: f(i.value),
|
|
2685
|
+
"data-component": "DXValidationIcon",
|
|
2686
|
+
"data-state": e.state
|
|
2687
|
+
}, null, 8, ["icon", "size", "class", "data-state"])) : c("", !0);
|
|
2688
|
+
}
|
|
2689
|
+
}, Dl = ["disabled"], zl = { key: 0 }, Bl = ["disabled"], Xl = { key: 0 }, Il = ["disabled"], Al = { key: 0 }, Gs = {
|
|
2690
|
+
__name: "DXActionButtons",
|
|
2691
|
+
props: {
|
|
2692
|
+
/** Показывать кнопку просмотра */
|
|
2693
|
+
showView: { type: Boolean, default: !1 },
|
|
2694
|
+
/** Показывать кнопку редактирования */
|
|
2695
|
+
showEdit: { type: Boolean, default: !0 },
|
|
2696
|
+
/** Показывать кнопку удаления */
|
|
2697
|
+
showDelete: { type: Boolean, default: !0 },
|
|
2698
|
+
/** Текст кнопки просмотра */
|
|
2699
|
+
viewLabel: { type: String, default: "Просмотр" },
|
|
2700
|
+
/** Текст кнопки редактирования */
|
|
2701
|
+
editLabel: { type: String, default: "Редактировать" },
|
|
2702
|
+
/** Текст кнопки удаления */
|
|
2703
|
+
deleteLabel: { type: String, default: "Удалить" },
|
|
2704
|
+
/** Иконка для кнопки просмотра */
|
|
2705
|
+
viewIcon: { type: Object, default: () => ae },
|
|
2706
|
+
/** Иконка для кнопки редактирования */
|
|
2707
|
+
editIcon: { type: Object, default: () => at },
|
|
2708
|
+
/** Иконка для кнопки удаления */
|
|
2709
|
+
deleteIcon: { type: Object, default: () => ct },
|
|
2710
|
+
/** Размер кнопок: xs | sm | md */
|
|
2711
|
+
size: { type: String, default: "sm" },
|
|
2712
|
+
/** Только иконки без текста */
|
|
2713
|
+
iconOnly: { type: Boolean, default: !1 },
|
|
2714
|
+
/** Выравнивание: left | center | right */
|
|
2715
|
+
align: { type: String, default: "left" },
|
|
2716
|
+
/** Отключить все кнопки */
|
|
2717
|
+
disabled: { type: Boolean, default: !1 }
|
|
2718
|
+
},
|
|
2719
|
+
emits: ["view", "edit", "delete"],
|
|
2720
|
+
setup(e) {
|
|
2721
|
+
const t = e, l = g(() => t.size === "xs" ? "xs" : t.size === "md" ? "sm" : "xs"), s = g(() => {
|
|
2722
|
+
const r = "font-semibold rounded-xl";
|
|
2723
|
+
return t.iconOnly ? t.size === "xs" ? `${r} p-1.5` : t.size === "md" ? `${r} p-2.5` : `${r} p-2` : t.size === "xs" ? `${r} px-2 py-1 text-xs` : t.size === "md" ? `${r} px-4 py-2.5 text-sm` : `${r} px-3 py-2 text-xs`;
|
|
2724
|
+
});
|
|
2725
|
+
return (r, i) => (a(), n("div", {
|
|
2726
|
+
class: f(["flex gap-2", { "justify-end": e.align === "right", "justify-center": e.align === "center" }]),
|
|
2727
|
+
"data-component": "DXActionButtons"
|
|
2728
|
+
}, [
|
|
2729
|
+
e.showView ? (a(), n("button", {
|
|
2730
|
+
key: 0,
|
|
2731
|
+
type: "button",
|
|
2732
|
+
class: f(["inline-flex items-center gap-1.5 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2", s.value]),
|
|
2733
|
+
disabled: e.disabled,
|
|
2734
|
+
onClick: i[0] || (i[0] = (d) => r.$emit("view"))
|
|
2735
|
+
}, [
|
|
2736
|
+
A(S, {
|
|
2737
|
+
icon: e.viewIcon,
|
|
2738
|
+
size: l.value,
|
|
2739
|
+
animation: "scale"
|
|
2740
|
+
}, null, 8, ["icon", "size"]),
|
|
2741
|
+
e.iconOnly ? c("", !0) : (a(), n("span", zl, b(e.viewLabel), 1))
|
|
2742
|
+
], 10, Dl)) : c("", !0),
|
|
2743
|
+
e.showEdit ? (a(), n("button", {
|
|
2744
|
+
key: 1,
|
|
2745
|
+
type: "button",
|
|
2746
|
+
class: f(["inline-flex items-center gap-1.5 border border-slate-200 text-slate-700 hover:border-slate-300 hover:bg-slate-50 bg-white transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed", s.value]),
|
|
2747
|
+
disabled: e.disabled,
|
|
2748
|
+
onClick: i[1] || (i[1] = (d) => r.$emit("edit"))
|
|
2749
|
+
}, [
|
|
2750
|
+
A(S, {
|
|
2751
|
+
icon: e.editIcon,
|
|
2752
|
+
size: l.value,
|
|
2753
|
+
animation: "wiggle"
|
|
2754
|
+
}, null, 8, ["icon", "size"]),
|
|
2755
|
+
e.iconOnly ? c("", !0) : (a(), n("span", Xl, b(e.editLabel), 1))
|
|
2756
|
+
], 10, Bl)) : c("", !0),
|
|
2757
|
+
e.showDelete ? (a(), n("button", {
|
|
2758
|
+
key: 2,
|
|
2759
|
+
type: "button",
|
|
2760
|
+
class: f(["inline-flex items-center gap-1.5 bg-rose-600 text-white hover:bg-rose-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-rose-500 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed", s.value]),
|
|
2761
|
+
disabled: e.disabled,
|
|
2762
|
+
onClick: i[2] || (i[2] = (d) => r.$emit("delete"))
|
|
2763
|
+
}, [
|
|
2764
|
+
A(S, {
|
|
2765
|
+
icon: e.deleteIcon,
|
|
2766
|
+
size: l.value,
|
|
2767
|
+
animation: "scale"
|
|
2768
|
+
}, null, 8, ["icon", "size"]),
|
|
2769
|
+
e.iconOnly ? c("", !0) : (a(), n("span", Al, b(e.deleteLabel), 1))
|
|
2770
|
+
], 10, Il)) : c("", !0),
|
|
2771
|
+
$(r.$slots, "default")
|
|
2772
|
+
], 2));
|
|
2773
|
+
}
|
|
2774
|
+
}, jl = ["data-variant"], Ml = { class: "flex items-start gap-3" }, Ll = { class: "flex-1 min-w-0" }, _l = {
|
|
2775
|
+
key: 0,
|
|
2776
|
+
class: "mt-3 flex gap-2"
|
|
2777
|
+
}, Us = {
|
|
2778
|
+
__name: "DXAlert",
|
|
2779
|
+
props: {
|
|
2780
|
+
/** Вариант: info | success | warning | danger */
|
|
2781
|
+
variant: { type: String, default: "info" },
|
|
2782
|
+
/** Заголовок */
|
|
2783
|
+
title: { type: String, default: "" },
|
|
2784
|
+
/** Иконка (компонент), если null - используется иконка по умолчанию для variant */
|
|
2785
|
+
icon: { type: Object, default: void 0 },
|
|
2786
|
+
/** Показывать иконку */
|
|
2787
|
+
showIcon: { type: Boolean, default: !0 },
|
|
2788
|
+
/** Можно закрыть */
|
|
2789
|
+
dismissible: { type: Boolean, default: !1 }
|
|
2790
|
+
},
|
|
2791
|
+
emits: ["dismiss"],
|
|
2792
|
+
setup(e, { emit: t }) {
|
|
2793
|
+
const l = e, s = t, r = D(!1), i = () => {
|
|
2794
|
+
r.value = !0, s("dismiss");
|
|
2795
|
+
}, d = {
|
|
2796
|
+
info: {
|
|
2797
|
+
bg: "bg-blue-50 border-blue-200",
|
|
2798
|
+
icon: "text-blue-500",
|
|
2799
|
+
title: "text-blue-900",
|
|
2800
|
+
content: "text-blue-800",
|
|
2801
|
+
close: "text-blue-500",
|
|
2802
|
+
defaultIcon: te
|
|
2803
|
+
},
|
|
2804
|
+
success: {
|
|
2805
|
+
bg: "bg-emerald-50 border-emerald-200",
|
|
2806
|
+
icon: "text-emerald-500",
|
|
2807
|
+
title: "text-emerald-900",
|
|
2808
|
+
content: "text-emerald-800",
|
|
2809
|
+
close: "text-emerald-500",
|
|
2810
|
+
defaultIcon: Q
|
|
2811
|
+
},
|
|
2812
|
+
warning: {
|
|
2813
|
+
bg: "bg-amber-50 border-amber-200",
|
|
2814
|
+
icon: "text-amber-500",
|
|
2815
|
+
title: "text-amber-900",
|
|
2816
|
+
content: "text-amber-800",
|
|
2817
|
+
close: "text-amber-500",
|
|
2818
|
+
defaultIcon: ee
|
|
2819
|
+
},
|
|
2820
|
+
danger: {
|
|
2821
|
+
bg: "bg-rose-50 border-rose-200",
|
|
2822
|
+
icon: "text-rose-500",
|
|
2823
|
+
title: "text-rose-900",
|
|
2824
|
+
content: "text-rose-800",
|
|
2825
|
+
close: "text-rose-500",
|
|
2826
|
+
defaultIcon: ie
|
|
2827
|
+
}
|
|
2828
|
+
}, u = g(() => d[l.variant] || d.info), p = g(() => l.showIcon ? l.icon !== void 0 ? l.icon : u.value.defaultIcon : null), v = g(() => [
|
|
2829
|
+
"rounded-xl border p-4",
|
|
2830
|
+
u.value.bg
|
|
2831
|
+
]), m = g(() => ["w-5 h-5 flex-shrink-0 mt-0.5", u.value.icon]), h = g(() => u.value.title), y = g(() => ["text-sm", u.value.content, l.title && "mt-1"]);
|
|
2832
|
+
return g(() => u.value.close), (x, V) => r.value ? c("", !0) : (a(), n("div", {
|
|
2833
|
+
key: 0,
|
|
2834
|
+
class: f(v.value),
|
|
2835
|
+
role: "alert",
|
|
2836
|
+
"data-component": "DXAlert",
|
|
2837
|
+
"data-variant": e.variant
|
|
2838
|
+
}, [
|
|
2839
|
+
o("div", Ml, [
|
|
2840
|
+
p.value ? (a(), C(S, {
|
|
2841
|
+
key: 0,
|
|
2842
|
+
icon: p.value,
|
|
2843
|
+
size: "md",
|
|
2844
|
+
animation: "none",
|
|
2845
|
+
class: f(m.value)
|
|
2846
|
+
}, null, 8, ["icon", "class"])) : c("", !0),
|
|
2847
|
+
o("div", Ll, [
|
|
2848
|
+
e.title ? (a(), n("p", {
|
|
2849
|
+
key: 0,
|
|
2850
|
+
class: f(["font-semibold", h.value])
|
|
2851
|
+
}, b(e.title), 3)) : c("", !0),
|
|
2852
|
+
o("div", {
|
|
2853
|
+
class: f(y.value)
|
|
2854
|
+
}, [
|
|
2855
|
+
$(x.$slots, "default")
|
|
2856
|
+
], 2)
|
|
2857
|
+
]),
|
|
2858
|
+
e.dismissible ? (a(), C(ce, {
|
|
2859
|
+
key: 1,
|
|
2860
|
+
size: "sm",
|
|
2861
|
+
variant: "default",
|
|
2862
|
+
onClick: i
|
|
2863
|
+
})) : c("", !0)
|
|
2864
|
+
]),
|
|
2865
|
+
x.$slots.actions ? (a(), n("div", _l, [
|
|
2866
|
+
$(x.$slots, "actions")
|
|
2867
|
+
])) : c("", !0)
|
|
2868
|
+
], 10, jl));
|
|
2869
|
+
}
|
|
2870
|
+
}, Ol = {
|
|
2871
|
+
"aria-label": "Breadcrumb",
|
|
2872
|
+
"data-component": "DXBreadcrumb"
|
|
2873
|
+
}, Tl = {
|
|
2874
|
+
key: 0,
|
|
2875
|
+
class: "mx-2 text-slate-400",
|
|
2876
|
+
"aria-hidden": "true"
|
|
2877
|
+
}, Zl = { key: 1 }, Nl = "inline-flex items-center transition-colors", Ks = {
|
|
2878
|
+
__name: "DXBreadcrumb",
|
|
2879
|
+
props: {
|
|
2880
|
+
/** Элементы: [{ label, href?, to?, icon?, iconAnimation? }] */
|
|
2881
|
+
items: { type: Array, required: !0 },
|
|
2882
|
+
/** Разделитель: slash | chevron */
|
|
2883
|
+
separator: { type: String, default: "chevron" },
|
|
2884
|
+
/** Размер: sm | md | lg */
|
|
2885
|
+
size: { type: String, default: "md" },
|
|
2886
|
+
/** Анимация иконок: none | wiggle | scale | rotate */
|
|
2887
|
+
iconAnimation: { type: String, default: "none" },
|
|
2888
|
+
/** Анимировать только иконку текущей страницы */
|
|
2889
|
+
animateCurrentOnly: { type: Boolean, default: !1 }
|
|
2890
|
+
},
|
|
2891
|
+
setup(e) {
|
|
2892
|
+
const t = e, l = {
|
|
2893
|
+
sm: "text-xs",
|
|
2894
|
+
md: "text-sm",
|
|
2895
|
+
lg: "text-base"
|
|
2896
|
+
}, s = g(() => l[t.size] || l.md), r = g(() => t.size === "sm" ? "xs" : t.size === "lg" ? "sm" : "xs"), i = (u) => u.to ? "router-link" : u.href ? "a" : "span", d = (u, p) => u.iconAnimation ? u.iconAnimation : t.animateCurrentOnly ? p === t.items.length - 1 ? t.iconAnimation : "none" : t.iconAnimation;
|
|
2897
|
+
return (u, p) => (a(), n("nav", Ol, [
|
|
2898
|
+
o("ol", {
|
|
2899
|
+
class: f(["flex items-center flex-wrap", s.value])
|
|
2900
|
+
}, [
|
|
2901
|
+
(a(!0), n(M, null, _(e.items, (v, m) => (a(), n("li", {
|
|
2902
|
+
key: m,
|
|
2903
|
+
class: "flex items-center"
|
|
2904
|
+
}, [
|
|
2905
|
+
m > 0 ? (a(), n("span", Tl, [
|
|
2906
|
+
$(u.$slots, "separator", {}, () => [
|
|
2907
|
+
e.separator === "chevron" ? (a(), C(S, {
|
|
2908
|
+
key: 0,
|
|
2909
|
+
icon: O(de),
|
|
2910
|
+
size: r.value,
|
|
2911
|
+
animation: "none"
|
|
2912
|
+
}, null, 8, ["icon", "size"])) : (a(), n("span", Zl, "/"))
|
|
2913
|
+
])
|
|
2914
|
+
])) : c("", !0),
|
|
2915
|
+
(a(), C(L(i(v)), {
|
|
2916
|
+
href: v.href,
|
|
2917
|
+
to: v.to,
|
|
2918
|
+
class: f([
|
|
2919
|
+
Nl,
|
|
2920
|
+
m === e.items.length - 1 ? "text-slate-900 font-medium" : "text-slate-500 hover:text-slate-700"
|
|
2921
|
+
]),
|
|
2922
|
+
"aria-current": m === e.items.length - 1 ? "page" : void 0
|
|
2923
|
+
}, {
|
|
2924
|
+
default: P(() => [
|
|
2925
|
+
v.icon ? (a(), C(S, {
|
|
2926
|
+
key: 0,
|
|
2927
|
+
icon: v.icon,
|
|
2928
|
+
size: r.value,
|
|
2929
|
+
animation: d(v, m),
|
|
2930
|
+
class: "mr-1.5"
|
|
2931
|
+
}, null, 8, ["icon", "size", "animation"])) : c("", !0),
|
|
2932
|
+
j(" " + b(v.label), 1)
|
|
2933
|
+
]),
|
|
2934
|
+
_: 2
|
|
2935
|
+
}, 1032, ["href", "to", "class", "aria-current"]))
|
|
2936
|
+
]))), 128))
|
|
2937
|
+
], 2)
|
|
2938
|
+
]));
|
|
2939
|
+
}
|
|
2940
|
+
}, Pl = {
|
|
2941
|
+
class: "inline-flex",
|
|
2942
|
+
"data-component": "DXButtonGroup"
|
|
2943
|
+
}, Fl = {
|
|
2944
|
+
key: 0,
|
|
2945
|
+
class: "text-sm font-medium text-slate-700 mb-2"
|
|
2946
|
+
}, Ws = {
|
|
2947
|
+
__name: "DXButtonGroup",
|
|
2948
|
+
props: {
|
|
2949
|
+
/** Значение (v-model) */
|
|
2950
|
+
modelValue: [String, Number, Array],
|
|
2951
|
+
/** Лейбл */
|
|
2952
|
+
label: { type: String, default: "" },
|
|
2953
|
+
/** Множественный выбор */
|
|
2954
|
+
multiple: { type: Boolean, default: !1 },
|
|
2955
|
+
/** Размер: sm | md | lg */
|
|
2956
|
+
size: { type: String, default: "md" },
|
|
2957
|
+
/** Отключенное состояние */
|
|
2958
|
+
disabled: { type: Boolean, default: !1 }
|
|
2959
|
+
},
|
|
2960
|
+
emits: ["update:modelValue"],
|
|
2961
|
+
setup(e, { emit: t }) {
|
|
2962
|
+
const l = e, s = t, r = g(() => {
|
|
2963
|
+
switch (l.size) {
|
|
2964
|
+
case "sm":
|
|
2965
|
+
return "h-8";
|
|
2966
|
+
case "lg":
|
|
2967
|
+
return "h-12";
|
|
2968
|
+
default:
|
|
2969
|
+
return "h-10";
|
|
2970
|
+
}
|
|
2971
|
+
}), i = (u) => {
|
|
2972
|
+
if (!l.disabled)
|
|
2973
|
+
if (l.multiple) {
|
|
2974
|
+
const p = Array.isArray(l.modelValue) ? l.modelValue : [], v = p.indexOf(u);
|
|
2975
|
+
if (v > -1) {
|
|
2976
|
+
const m = [...p];
|
|
2977
|
+
m.splice(v, 1), s("update:modelValue", m);
|
|
2978
|
+
} else
|
|
2979
|
+
s("update:modelValue", [...p, u]);
|
|
2980
|
+
} else
|
|
2981
|
+
s("update:modelValue", u);
|
|
2982
|
+
}, d = (u) => l.multiple ? Array.isArray(l.modelValue) && l.modelValue.includes(u) : l.modelValue === u;
|
|
2983
|
+
return re("buttonGroup", {
|
|
2984
|
+
modelValue: l.modelValue,
|
|
2985
|
+
multiple: l.multiple,
|
|
2986
|
+
size: l.size,
|
|
2987
|
+
disabled: l.disabled,
|
|
2988
|
+
handleSelect: i,
|
|
2989
|
+
isSelected: d
|
|
2990
|
+
}), (u, p) => (a(), n("div", Pl, [
|
|
2991
|
+
e.label ? (a(), n("p", Fl, b(e.label), 1)) : c("", !0),
|
|
2992
|
+
o("div", {
|
|
2993
|
+
class: f(["inline-flex border border-slate-200 rounded-xl overflow-hidden divide-x divide-slate-200", r.value])
|
|
2994
|
+
}, [
|
|
2995
|
+
$(u.$slots, "default")
|
|
2996
|
+
], 2)
|
|
2997
|
+
]));
|
|
2998
|
+
}
|
|
2999
|
+
}, Hl = {
|
|
3000
|
+
key: 0,
|
|
3001
|
+
class: "block text-sm font-medium text-slate-700 mb-1"
|
|
3002
|
+
}, Rl = { class: "relative" }, ql = ["placeholder", "disabled", "onKeydown"], El = {
|
|
3003
|
+
key: 1,
|
|
3004
|
+
class: "absolute z-20 mt-2 w-full bg-white border border-slate-200 rounded-xl shadow-lg py-2 max-h-48 overflow-y-auto"
|
|
3005
|
+
}, Gl = ["onClick", "onMouseenter"], Ul = { class: "flex items-center gap-2" }, Kl = {
|
|
3006
|
+
key: 0,
|
|
3007
|
+
class: "w-4 h-4 text-slate-900",
|
|
3008
|
+
fill: "none",
|
|
3009
|
+
stroke: "currentColor",
|
|
3010
|
+
viewBox: "0 0 24 24"
|
|
3011
|
+
}, Wl = {
|
|
3012
|
+
key: 0,
|
|
3013
|
+
class: "px-4 py-2 text-sm text-slate-500"
|
|
3014
|
+
}, Yl = { key: 0 }, Jl = { key: 1 }, Ql = {
|
|
3015
|
+
key: 2,
|
|
3016
|
+
class: "mt-1 text-xs text-slate-500"
|
|
3017
|
+
}, Ys = {
|
|
3018
|
+
__name: "DXComboBox",
|
|
3019
|
+
props: {
|
|
3020
|
+
modelValue: [String, Number],
|
|
3021
|
+
options: { type: Array, default: () => [] },
|
|
3022
|
+
label: { type: String, default: "" },
|
|
3023
|
+
placeholder: { type: String, default: "" },
|
|
3024
|
+
helper: { type: String, default: "" },
|
|
3025
|
+
disabled: { type: Boolean, default: !1 },
|
|
3026
|
+
filterable: { type: Boolean, default: !0 },
|
|
3027
|
+
allowCustom: { type: Boolean, default: !1 }
|
|
3028
|
+
},
|
|
3029
|
+
emits: ["update:modelValue"],
|
|
3030
|
+
setup(e, { emit: t }) {
|
|
3031
|
+
const l = e, s = t, r = D(null), i = D(null), d = D(""), u = D(!1), p = D(0), v = g(() => l.options.find((w) => w.value === l.modelValue)), m = g(() => {
|
|
3032
|
+
if (!l.filterable || !d.value)
|
|
3033
|
+
return l.options;
|
|
3034
|
+
const w = d.value.toLowerCase();
|
|
3035
|
+
return l.options.filter((k) => k.label.toLowerCase().includes(w));
|
|
3036
|
+
}), h = () => {
|
|
3037
|
+
if (u.value = !0, p.value = 0, !l.filterable) return;
|
|
3038
|
+
!l.options.find((k) => k.label === d.value) && !l.allowCustom && s("update:modelValue", null);
|
|
3039
|
+
}, y = () => {
|
|
3040
|
+
u.value = !0, p.value = 0;
|
|
3041
|
+
}, x = (w) => {
|
|
3042
|
+
d.value = w.label, s("update:modelValue", w.value), u.value = !1;
|
|
3043
|
+
}, V = () => {
|
|
3044
|
+
if (!u.value) {
|
|
3045
|
+
u.value = !0;
|
|
3046
|
+
return;
|
|
3047
|
+
}
|
|
3048
|
+
p.value < m.value.length - 1 && p.value++;
|
|
3049
|
+
}, T = () => {
|
|
3050
|
+
p.value > 0 && p.value--;
|
|
3051
|
+
}, X = () => {
|
|
3052
|
+
if (u.value && m.value.length > 0) {
|
|
3053
|
+
const w = m.value[p.value];
|
|
3054
|
+
w && x(w);
|
|
3055
|
+
} else l.allowCustom && d.value && (s("update:modelValue", d.value), u.value = !1);
|
|
3056
|
+
}, z = (w) => {
|
|
3057
|
+
r.value && !r.value.contains(w.target) && (u.value = !1, !l.allowCustom && v.value && (d.value = v.value.label));
|
|
3058
|
+
};
|
|
3059
|
+
return H(() => l.modelValue, (w) => {
|
|
3060
|
+
const k = l.options.find((I) => I.value === w);
|
|
3061
|
+
d.value = k ? k.label : l.allowCustom ? String(w || "") : "";
|
|
3062
|
+
}, { immediate: !0 }), U(() => document.addEventListener("click", z)), J(() => document.removeEventListener("click", z)), (w, k) => (a(), n("div", {
|
|
3063
|
+
class: "relative",
|
|
3064
|
+
ref_key: "root",
|
|
3065
|
+
ref: r,
|
|
3066
|
+
"data-component": "DXComboBox"
|
|
3067
|
+
}, [
|
|
3068
|
+
e.label ? (a(), n("label", Hl, b(e.label), 1)) : c("", !0),
|
|
3069
|
+
o("div", Rl, [
|
|
3070
|
+
q(o("input", {
|
|
3071
|
+
ref_key: "inputRef",
|
|
3072
|
+
ref: i,
|
|
3073
|
+
"onUpdate:modelValue": k[0] || (k[0] = (I) => d.value = I),
|
|
3074
|
+
type: "text",
|
|
3075
|
+
placeholder: e.placeholder,
|
|
3076
|
+
disabled: e.disabled,
|
|
3077
|
+
class: f(["w-full pr-10 rounded-xl border border-slate-200 bg-white px-4 py-3 text-sm text-slate-900 placeholder:text-slate-400 hover:border-slate-300 focus:border-slate-300 focus:outline-none transition-colors", e.disabled && "opacity-60 cursor-not-allowed bg-slate-50"]),
|
|
3078
|
+
onInput: h,
|
|
3079
|
+
onFocus: y,
|
|
3080
|
+
onKeydown: [
|
|
3081
|
+
R(N(V, ["prevent"]), ["down"]),
|
|
3082
|
+
R(N(T, ["prevent"]), ["up"]),
|
|
3083
|
+
R(N(X, ["prevent"]), ["enter"]),
|
|
3084
|
+
k[1] || (k[1] = R((I) => u.value = !1, ["escape"]))
|
|
3085
|
+
]
|
|
3086
|
+
}, null, 42, ql), [
|
|
3087
|
+
[G, d.value]
|
|
3088
|
+
]),
|
|
3089
|
+
(a(), n("svg", {
|
|
3090
|
+
class: f(["absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400 pointer-events-none transition-transform", { "rotate-180": u.value }]),
|
|
3091
|
+
fill: "none",
|
|
3092
|
+
stroke: "currentColor",
|
|
3093
|
+
viewBox: "0 0 24 24"
|
|
3094
|
+
}, [...k[2] || (k[2] = [
|
|
3095
|
+
o("path", {
|
|
3096
|
+
"stroke-linecap": "round",
|
|
3097
|
+
"stroke-linejoin": "round",
|
|
3098
|
+
"stroke-width": "2",
|
|
3099
|
+
d: "M19 9l-7 7-7-7"
|
|
3100
|
+
}, null, -1)
|
|
3101
|
+
])], 2))
|
|
3102
|
+
]),
|
|
3103
|
+
u.value && (m.value.length > 0 || e.allowCustom && d.value) ? (a(), n("div", El, [
|
|
3104
|
+
(a(!0), n(M, null, _(m.value, (I, B) => (a(), n("button", {
|
|
3105
|
+
key: I.value,
|
|
3106
|
+
type: "button",
|
|
3107
|
+
class: f(["w-full text-left px-4 py-2 text-sm hover:bg-slate-50 flex items-center justify-between", { "bg-slate-100": B === p.value }]),
|
|
3108
|
+
onClick: (K) => x(I),
|
|
3109
|
+
onMouseenter: (K) => p.value = B
|
|
3110
|
+
}, [
|
|
3111
|
+
o("span", Ul, [
|
|
3112
|
+
I.icon ? (a(), C(L(I.icon), {
|
|
3113
|
+
key: 0,
|
|
3114
|
+
class: "w-4 h-4 text-slate-500"
|
|
3115
|
+
})) : c("", !0),
|
|
3116
|
+
j(" " + b(I.label), 1)
|
|
3117
|
+
]),
|
|
3118
|
+
e.modelValue === I.value ? (a(), n("svg", Kl, [...k[3] || (k[3] = [
|
|
3119
|
+
o("path", {
|
|
3120
|
+
"stroke-linecap": "round",
|
|
3121
|
+
"stroke-linejoin": "round",
|
|
3122
|
+
"stroke-width": "2",
|
|
3123
|
+
d: "M5 13l4 4L19 7"
|
|
3124
|
+
}, null, -1)
|
|
3125
|
+
])])) : c("", !0)
|
|
3126
|
+
], 42, Gl))), 128)),
|
|
3127
|
+
m.value.length === 0 && d.value ? (a(), n("div", Wl, [
|
|
3128
|
+
e.allowCustom ? (a(), n("span", Yl, 'Нажмите Enter для "' + b(d.value) + '"', 1)) : (a(), n("span", Jl, "Не найдено"))
|
|
3129
|
+
])) : c("", !0)
|
|
3130
|
+
])) : c("", !0),
|
|
3131
|
+
e.helper ? (a(), n("p", Ql, b(e.helper), 1)) : c("", !0)
|
|
3132
|
+
], 512));
|
|
3133
|
+
}
|
|
3134
|
+
}, ea = {
|
|
3135
|
+
class: "space-y-1",
|
|
3136
|
+
"data-component": "DXCopyField"
|
|
3137
|
+
}, ta = {
|
|
3138
|
+
key: 0,
|
|
3139
|
+
class: "text-[11px] uppercase tracking-wide text-slate-500 font-semibold"
|
|
3140
|
+
}, la = { class: "flex items-center justify-between gap-2 rounded-lg border border-slate-200 bg-white px-3 py-3" }, aa = { class: "text-base font-semibold text-slate-900 break-all flex-1 text-center" }, na = ["aria-label"], Js = {
|
|
3141
|
+
__name: "DXCopyField",
|
|
3142
|
+
props: {
|
|
3143
|
+
/** Лейбл */
|
|
3144
|
+
label: { type: String, default: "" },
|
|
3145
|
+
/** Значение для копирования */
|
|
3146
|
+
value: { type: String, default: "" },
|
|
3147
|
+
/** Иконка для копирования */
|
|
3148
|
+
copyIcon: { type: Object, default: () => Ye },
|
|
3149
|
+
/** Иконка успешного копирования */
|
|
3150
|
+
successIcon: { type: Object, default: () => We },
|
|
3151
|
+
/** Анимация иконки копирования: none | wiggle | scale | rotate */
|
|
3152
|
+
copyIconAnimation: { type: String, default: "scale" },
|
|
3153
|
+
/** Анимация иконки успеха: none | wiggle | scale | rotate */
|
|
3154
|
+
copiedIconAnimation: { type: String, default: "scale" },
|
|
3155
|
+
/** Время отображения успешного состояния (мс) */
|
|
3156
|
+
successDuration: { type: Number, default: 2e3 }
|
|
3157
|
+
},
|
|
3158
|
+
emits: ["copied"],
|
|
3159
|
+
setup(e, { emit: t }) {
|
|
3160
|
+
const l = e, s = t, r = D(!1), i = async () => {
|
|
3161
|
+
if (l.value)
|
|
3162
|
+
try {
|
|
3163
|
+
await navigator.clipboard.writeText(l.value), r.value = !0, s("copied", l.value), setTimeout(() => {
|
|
3164
|
+
r.value = !1;
|
|
3165
|
+
}, l.successDuration);
|
|
3166
|
+
} catch (d) {
|
|
3167
|
+
console.error("Не удалось скопировать", d);
|
|
3168
|
+
}
|
|
3169
|
+
};
|
|
3170
|
+
return (d, u) => (a(), n("div", ea, [
|
|
3171
|
+
e.label ? (a(), n("p", ta, b(e.label), 1)) : c("", !0),
|
|
3172
|
+
o("div", la, [
|
|
3173
|
+
o("p", aa, b(e.value || "—"), 1),
|
|
3174
|
+
o("button", {
|
|
3175
|
+
type: "button",
|
|
3176
|
+
class: f(["h-9 w-9 inline-flex items-center justify-center rounded-xl border border-slate-200 text-slate-700 hover:border-slate-300 bg-white transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2", { "border-emerald-300 bg-emerald-50": r.value }]),
|
|
3177
|
+
"aria-label": `Скопировать ${e.label || "значение"}`,
|
|
3178
|
+
onClick: i
|
|
3179
|
+
}, [
|
|
3180
|
+
r.value ? (a(), C(S, {
|
|
3181
|
+
key: 0,
|
|
3182
|
+
icon: O(Ue),
|
|
3183
|
+
size: "sm",
|
|
3184
|
+
animation: e.copiedIconAnimation,
|
|
3185
|
+
class: "text-emerald-600"
|
|
3186
|
+
}, null, 8, ["icon", "animation"])) : (a(), C(S, {
|
|
3187
|
+
key: 1,
|
|
3188
|
+
icon: e.copyIcon,
|
|
3189
|
+
size: "sm",
|
|
3190
|
+
animation: e.copyIconAnimation
|
|
3191
|
+
}, null, 8, ["icon", "animation"]))
|
|
3192
|
+
], 10, na)
|
|
3193
|
+
])
|
|
3194
|
+
]));
|
|
3195
|
+
}
|
|
3196
|
+
}, sa = {
|
|
3197
|
+
class: "w-full",
|
|
3198
|
+
"data-component": "DXDatePicker"
|
|
3199
|
+
}, oa = {
|
|
3200
|
+
key: 0,
|
|
3201
|
+
class: "block text-sm text-slate-600 mb-1 font-medium"
|
|
3202
|
+
}, ra = { class: "relative" }, ia = ["type", "value", "placeholder", "disabled", "readonly"], da = {
|
|
3203
|
+
key: 1,
|
|
3204
|
+
class: "absolute z-20 mt-2 p-4 bg-white border border-slate-200 rounded-xl shadow-lg"
|
|
3205
|
+
}, ua = { class: "space-y-3" }, ca = { class: "flex gap-2" }, ma = {
|
|
3206
|
+
key: 2,
|
|
3207
|
+
class: "mt-1 text-xs text-slate-500"
|
|
3208
|
+
}, Qs = {
|
|
3209
|
+
__name: "DXDatePicker",
|
|
3210
|
+
props: {
|
|
3211
|
+
/** Значение (v-model) - строка или { start, end } для range */
|
|
3212
|
+
modelValue: [String, Object],
|
|
3213
|
+
/** Лейбл */
|
|
3214
|
+
label: { type: String, default: "" },
|
|
3215
|
+
/** Placeholder */
|
|
3216
|
+
placeholder: { type: String, default: "" },
|
|
3217
|
+
/** Вспомогательный текст */
|
|
3218
|
+
helper: { type: String, default: "" },
|
|
3219
|
+
/** Отключенное состояние */
|
|
3220
|
+
disabled: { type: Boolean, default: !1 },
|
|
3221
|
+
/** Режим диапазона */
|
|
3222
|
+
range: { type: Boolean, default: !1 }
|
|
3223
|
+
},
|
|
3224
|
+
emits: ["update:modelValue"],
|
|
3225
|
+
setup(e, { emit: t }) {
|
|
3226
|
+
const l = e, s = t, r = D(!1), i = D(""), d = D(""), u = g(() => {
|
|
3227
|
+
if (l.range && typeof l.modelValue == "object" && l.modelValue) {
|
|
3228
|
+
const { start: y, end: x } = l.modelValue;
|
|
3229
|
+
return y && x ? `${p(y)} - ${p(x)}` : "";
|
|
3230
|
+
}
|
|
3231
|
+
return l.modelValue || "";
|
|
3232
|
+
}), p = (y) => y ? new Date(y).toLocaleDateString("ru-RU") : "", v = (y) => s("update:modelValue", y), m = () => {
|
|
3233
|
+
l.disabled || (r.value = !r.value, r.value && typeof l.modelValue == "object" && l.modelValue && (i.value = l.modelValue.start || "", d.value = l.modelValue.end || ""));
|
|
3234
|
+
}, h = () => {
|
|
3235
|
+
i.value && d.value && s("update:modelValue", { start: i.value, end: d.value }), r.value = !1;
|
|
3236
|
+
};
|
|
3237
|
+
return (y, x) => (a(), n("div", sa, [
|
|
3238
|
+
e.label ? (a(), n("label", oa, b(e.label), 1)) : c("", !0),
|
|
3239
|
+
o("div", ra, [
|
|
3240
|
+
o("input", {
|
|
3241
|
+
type: e.range ? "text" : "date",
|
|
3242
|
+
value: u.value,
|
|
3243
|
+
placeholder: e.placeholder,
|
|
3244
|
+
disabled: e.disabled,
|
|
3245
|
+
class: "w-full h-10 px-4 py-2.5 text-sm rounded-xl border border-slate-200 bg-white text-slate-700 transition-colors hover:border-slate-300 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300 disabled:opacity-60 disabled:cursor-not-allowed disabled:bg-slate-50",
|
|
3246
|
+
readonly: e.range,
|
|
3247
|
+
onChange: x[0] || (x[0] = (V) => !e.range && v(V.target.value)),
|
|
3248
|
+
onClick: x[1] || (x[1] = (V) => e.range && m())
|
|
3249
|
+
}, null, 40, ia),
|
|
3250
|
+
x[5] || (x[5] = o("svg", {
|
|
3251
|
+
class: "absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400 pointer-events-none",
|
|
3252
|
+
fill: "none",
|
|
3253
|
+
stroke: "currentColor",
|
|
3254
|
+
viewBox: "0 0 24 24"
|
|
3255
|
+
}, [
|
|
3256
|
+
o("path", {
|
|
3257
|
+
"stroke-linecap": "round",
|
|
3258
|
+
"stroke-linejoin": "round",
|
|
3259
|
+
"stroke-width": "2",
|
|
3260
|
+
d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
3261
|
+
})
|
|
3262
|
+
], -1))
|
|
3263
|
+
]),
|
|
3264
|
+
e.range && r.value ? (a(), n("div", da, [
|
|
3265
|
+
o("div", ua, [
|
|
3266
|
+
o("div", null, [
|
|
3267
|
+
x[6] || (x[6] = o("label", { class: "text-xs text-slate-600" }, "От", -1)),
|
|
3268
|
+
q(o("input", {
|
|
3269
|
+
type: "date",
|
|
3270
|
+
"onUpdate:modelValue": x[2] || (x[2] = (V) => i.value = V),
|
|
3271
|
+
class: "w-full mt-1 px-3 py-2 text-sm border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-slate-900/10"
|
|
3272
|
+
}, null, 512), [
|
|
3273
|
+
[G, i.value]
|
|
3274
|
+
])
|
|
3275
|
+
]),
|
|
3276
|
+
o("div", null, [
|
|
3277
|
+
x[7] || (x[7] = o("label", { class: "text-xs text-slate-600" }, "До", -1)),
|
|
3278
|
+
q(o("input", {
|
|
3279
|
+
type: "date",
|
|
3280
|
+
"onUpdate:modelValue": x[3] || (x[3] = (V) => d.value = V),
|
|
3281
|
+
class: "w-full mt-1 px-3 py-2 text-sm border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-slate-900/10"
|
|
3282
|
+
}, null, 512), [
|
|
3283
|
+
[G, d.value]
|
|
3284
|
+
])
|
|
3285
|
+
]),
|
|
3286
|
+
o("div", ca, [
|
|
3287
|
+
o("button", {
|
|
3288
|
+
type: "button",
|
|
3289
|
+
class: "flex-1 px-3 py-2 text-sm bg-slate-900 text-white rounded-lg hover:bg-slate-800",
|
|
3290
|
+
onClick: h
|
|
3291
|
+
}, " Применить "),
|
|
3292
|
+
o("button", {
|
|
3293
|
+
type: "button",
|
|
3294
|
+
class: "px-3 py-2 text-sm border border-slate-200 rounded-lg hover:bg-slate-50",
|
|
3295
|
+
onClick: x[4] || (x[4] = (V) => r.value = !1)
|
|
3296
|
+
}, " Отмена ")
|
|
3297
|
+
])
|
|
3298
|
+
])
|
|
3299
|
+
])) : c("", !0),
|
|
3300
|
+
e.helper ? (a(), n("p", ma, b(e.helper), 1)) : c("", !0)
|
|
3301
|
+
]));
|
|
3302
|
+
}
|
|
3303
|
+
}, fa = {
|
|
3304
|
+
class: "w-full",
|
|
3305
|
+
"data-component": "DXFileUpload"
|
|
3306
|
+
}, pa = {
|
|
3307
|
+
key: 0,
|
|
3308
|
+
class: "block text-sm font-medium text-slate-700 mb-1"
|
|
3309
|
+
}, ga = ["accept", "multiple", "disabled"], va = {
|
|
3310
|
+
key: 0,
|
|
3311
|
+
class: "text-center"
|
|
3312
|
+
}, ba = { class: "text-sm font-medium text-slate-700 mb-1" }, ha = ["disabled"], xa = { class: "text-xs text-slate-500" }, ya = {
|
|
3313
|
+
key: 1,
|
|
3314
|
+
class: "space-y-2"
|
|
3315
|
+
}, wa = {
|
|
3316
|
+
key: 0,
|
|
3317
|
+
class: "w-12 h-12 flex-shrink-0 rounded overflow-hidden bg-slate-200"
|
|
3318
|
+
}, ka = ["src", "alt"], $a = { class: "flex-1 min-w-0" }, Ca = { class: "text-sm font-medium text-slate-900 truncate" }, Sa = { class: "text-xs text-slate-500" }, Va = ["onClick"], Da = ["disabled"], za = {
|
|
3319
|
+
key: 1,
|
|
3320
|
+
class: "mt-1 text-xs text-slate-500"
|
|
3321
|
+
}, Ba = {
|
|
3322
|
+
key: 2,
|
|
3323
|
+
class: "mt-1 text-xs text-rose-500"
|
|
3324
|
+
}, eo = {
|
|
3325
|
+
__name: "DXFileUpload",
|
|
3326
|
+
props: {
|
|
3327
|
+
modelValue: [File, FileList, Array],
|
|
3328
|
+
label: { type: String, default: "" },
|
|
3329
|
+
helper: { type: String, default: "" },
|
|
3330
|
+
accept: { type: String, default: "" },
|
|
3331
|
+
multiple: { type: Boolean, default: !1 },
|
|
3332
|
+
maxSize: { type: String, default: "" },
|
|
3333
|
+
disabled: { type: Boolean, default: !1 }
|
|
3334
|
+
},
|
|
3335
|
+
emits: ["update:modelValue", "upload"],
|
|
3336
|
+
setup(e, { emit: t }) {
|
|
3337
|
+
const l = e, s = t, r = D(null), i = D(null), d = D(!1), u = D([]), p = D(""), v = (X) => {
|
|
3338
|
+
const z = Array.from(X.target.files || []);
|
|
3339
|
+
x(z);
|
|
3340
|
+
}, m = (X) => {
|
|
3341
|
+
var w;
|
|
3342
|
+
if (d.value = !1, l.disabled) return;
|
|
3343
|
+
const z = Array.from(((w = X.dataTransfer) == null ? void 0 : w.files) || []);
|
|
3344
|
+
x(z);
|
|
3345
|
+
}, h = () => {
|
|
3346
|
+
l.disabled || (d.value = !0);
|
|
3347
|
+
}, y = (X) => {
|
|
3348
|
+
X.target === i.value && (d.value = !1);
|
|
3349
|
+
}, x = (X) => {
|
|
3350
|
+
p.value = "";
|
|
3351
|
+
const z = X.map((w) => {
|
|
3352
|
+
if (w.type.startsWith("image/")) {
|
|
3353
|
+
const k = URL.createObjectURL(w);
|
|
3354
|
+
return Object.assign(w, { preview: k });
|
|
3355
|
+
}
|
|
3356
|
+
return w;
|
|
3357
|
+
});
|
|
3358
|
+
l.multiple ? u.value = [...u.value, ...z] : u.value = z.slice(0, 1), s("update:modelValue", l.multiple ? u.value : u.value[0]);
|
|
3359
|
+
}, V = (X) => {
|
|
3360
|
+
const z = u.value[X];
|
|
3361
|
+
z.preview && URL.revokeObjectURL(z.preview), u.value.splice(X, 1), s("update:modelValue", l.multiple ? u.value : u.value[0] || null);
|
|
3362
|
+
}, T = (X) => {
|
|
3363
|
+
if (X === 0) return "0 Bytes";
|
|
3364
|
+
const z = 1024, w = ["Bytes", "KB", "MB", "GB"], k = Math.floor(Math.log(X) / Math.log(z));
|
|
3365
|
+
return Math.round(X / Math.pow(z, k) * 100) / 100 + " " + w[k];
|
|
3366
|
+
};
|
|
3367
|
+
return H(() => l.modelValue, (X) => {
|
|
3368
|
+
X || (u.value = []);
|
|
3369
|
+
}), (X, z) => (a(), n("div", fa, [
|
|
3370
|
+
e.label ? (a(), n("label", pa, b(e.label), 1)) : c("", !0),
|
|
3371
|
+
o("div", {
|
|
3372
|
+
ref_key: "dropZone",
|
|
3373
|
+
ref: i,
|
|
3374
|
+
class: f(["relative border-2 border-dashed rounded-xl p-6 transition-all", [
|
|
3375
|
+
d.value ? "border-slate-900 bg-slate-50 scale-105" : "border-slate-300 bg-white hover:border-slate-400",
|
|
3376
|
+
e.disabled && "opacity-60 cursor-not-allowed"
|
|
3377
|
+
]]),
|
|
3378
|
+
onDragenter: N(h, ["prevent"]),
|
|
3379
|
+
onDragover: z[2] || (z[2] = N(() => {
|
|
3380
|
+
}, ["prevent"])),
|
|
3381
|
+
onDragleave: N(y, ["prevent"]),
|
|
3382
|
+
onDrop: N(m, ["prevent"])
|
|
3383
|
+
}, [
|
|
3384
|
+
o("input", {
|
|
3385
|
+
ref_key: "fileInput",
|
|
3386
|
+
ref: r,
|
|
3387
|
+
type: "file",
|
|
3388
|
+
accept: e.accept,
|
|
3389
|
+
multiple: e.multiple,
|
|
3390
|
+
disabled: e.disabled,
|
|
3391
|
+
class: "hidden",
|
|
3392
|
+
onChange: v
|
|
3393
|
+
}, null, 40, ga),
|
|
3394
|
+
u.value.length ? (a(), n("div", ya, [
|
|
3395
|
+
(a(!0), n(M, null, _(u.value, (w, k) => {
|
|
3396
|
+
var I;
|
|
3397
|
+
return a(), n("div", {
|
|
3398
|
+
key: k,
|
|
3399
|
+
class: "flex items-center gap-3 p-3 bg-slate-50 rounded-lg"
|
|
3400
|
+
}, [
|
|
3401
|
+
(I = w.type) != null && I.startsWith("image/") ? (a(), n("div", wa, [
|
|
3402
|
+
o("img", {
|
|
3403
|
+
src: w.preview,
|
|
3404
|
+
alt: w.name,
|
|
3405
|
+
class: "w-full h-full object-cover"
|
|
3406
|
+
}, null, 8, ka)
|
|
3407
|
+
])) : (a(), C(S, {
|
|
3408
|
+
key: 1,
|
|
3409
|
+
icon: O(Qe),
|
|
3410
|
+
size: "lg",
|
|
3411
|
+
animation: "none",
|
|
3412
|
+
class: "text-slate-400 flex-shrink-0"
|
|
3413
|
+
}, null, 8, ["icon"])),
|
|
3414
|
+
o("div", $a, [
|
|
3415
|
+
o("p", Ca, b(w.name), 1),
|
|
3416
|
+
o("p", Sa, b(T(w.size)), 1)
|
|
3417
|
+
]),
|
|
3418
|
+
o("button", {
|
|
3419
|
+
type: "button",
|
|
3420
|
+
class: "text-slate-400 hover:text-slate-600 transition-colors",
|
|
3421
|
+
onClick: (B) => V(k),
|
|
3422
|
+
"aria-label": "Удалить файл"
|
|
3423
|
+
}, [
|
|
3424
|
+
A(S, {
|
|
3425
|
+
icon: O(ue),
|
|
3426
|
+
size: "md",
|
|
3427
|
+
animation: "scale"
|
|
3428
|
+
}, null, 8, ["icon"])
|
|
3429
|
+
], 8, Va)
|
|
3430
|
+
]);
|
|
3431
|
+
}), 128)),
|
|
3432
|
+
e.multiple ? (a(), n("button", {
|
|
3433
|
+
key: 0,
|
|
3434
|
+
type: "button",
|
|
3435
|
+
class: "w-full py-2 text-sm text-slate-600 hover:text-slate-900 border border-slate-200 rounded-lg hover:bg-slate-50",
|
|
3436
|
+
disabled: e.disabled,
|
|
3437
|
+
onClick: z[1] || (z[1] = (w) => {
|
|
3438
|
+
var k;
|
|
3439
|
+
return (k = r.value) == null ? void 0 : k.click();
|
|
3440
|
+
})
|
|
3441
|
+
}, [
|
|
3442
|
+
A(S, {
|
|
3443
|
+
icon: O(st),
|
|
3444
|
+
size: "sm",
|
|
3445
|
+
animation: "none",
|
|
3446
|
+
class: "inline mr-1"
|
|
3447
|
+
}, null, 8, ["icon"]),
|
|
3448
|
+
z[4] || (z[4] = j(" Добавить ещё ", -1))
|
|
3449
|
+
], 8, Da)) : c("", !0)
|
|
3450
|
+
])) : (a(), n("div", va, [
|
|
3451
|
+
A(S, {
|
|
3452
|
+
icon: O(Je),
|
|
3453
|
+
size: "xl",
|
|
3454
|
+
animation: "none",
|
|
3455
|
+
class: "mx-auto text-slate-400 mb-3 w-12 h-12"
|
|
3456
|
+
}, null, 8, ["icon"]),
|
|
3457
|
+
o("p", ba, [
|
|
3458
|
+
z[3] || (z[3] = j(" Перетащите файлы сюда или ", -1)),
|
|
3459
|
+
o("button", {
|
|
3460
|
+
type: "button",
|
|
3461
|
+
class: "text-slate-900 underline hover:no-underline",
|
|
3462
|
+
disabled: e.disabled,
|
|
3463
|
+
onClick: z[0] || (z[0] = (w) => {
|
|
3464
|
+
var k;
|
|
3465
|
+
return (k = r.value) == null ? void 0 : k.click();
|
|
3466
|
+
})
|
|
3467
|
+
}, " выберите ", 8, ha)
|
|
3468
|
+
]),
|
|
3469
|
+
o("p", xa, b(e.accept || "Любые файлы") + " " + b(e.maxSize ? `• Макс. ${e.maxSize}` : ""), 1)
|
|
3470
|
+
]))
|
|
3471
|
+
], 34),
|
|
3472
|
+
e.helper ? (a(), n("p", za, b(e.helper), 1)) : c("", !0),
|
|
3473
|
+
p.value ? (a(), n("p", Ba, b(p.value), 1)) : c("", !0)
|
|
3474
|
+
]));
|
|
3475
|
+
}
|
|
3476
|
+
}, Xa = {
|
|
3477
|
+
class: "space-y-2",
|
|
3478
|
+
"data-component": "DXFilterGroup"
|
|
3479
|
+
}, Ia = { class: "text-xs font-semibold text-slate-500 uppercase tracking-wide" }, Aa = { class: "flex flex-wrap gap-2" }, ja = ["onClick"], to = {
|
|
3480
|
+
__name: "DXFilterGroup",
|
|
3481
|
+
props: {
|
|
3482
|
+
/** Лейбл группы */
|
|
3483
|
+
label: { type: String, required: !0 },
|
|
3484
|
+
/** Опции: [{ value, label }] */
|
|
3485
|
+
options: { type: Array, default: () => [] },
|
|
3486
|
+
/** Текущее значение (v-model) */
|
|
3487
|
+
modelValue: [String, Boolean],
|
|
3488
|
+
/** Показывать кнопку сброса */
|
|
3489
|
+
clearable: { type: Boolean, default: !0 }
|
|
3490
|
+
},
|
|
3491
|
+
emits: ["update:modelValue"],
|
|
3492
|
+
setup(e) {
|
|
3493
|
+
return (t, l) => (a(), n("div", Xa, [
|
|
3494
|
+
o("p", Ia, b(e.label), 1),
|
|
3495
|
+
o("div", Aa, [
|
|
3496
|
+
(a(!0), n(M, null, _(e.options, (s) => (a(), n("button", {
|
|
3497
|
+
key: s.value,
|
|
3498
|
+
type: "button",
|
|
3499
|
+
class: f(["px-3 py-2 rounded-full text-xs font-semibold border transition", e.modelValue === s.value ? "bg-slate-800 text-white border-slate-800" : "border-slate-200 text-slate-700 hover:border-slate-300 bg-white"]),
|
|
3500
|
+
onClick: (r) => t.$emit("update:modelValue", s.value)
|
|
3501
|
+
}, b(s.label), 11, ja))), 128)),
|
|
3502
|
+
e.modelValue && e.clearable ? (a(), n("button", {
|
|
3503
|
+
key: 0,
|
|
3504
|
+
type: "button",
|
|
3505
|
+
class: "px-3 py-2 rounded-full text-xs font-semibold border border-amber-300 text-amber-700 bg-amber-50 hover:bg-amber-100 transition",
|
|
3506
|
+
onClick: l[0] || (l[0] = (s) => t.$emit("update:modelValue", null))
|
|
3507
|
+
}, " Сбросить ")) : c("", !0)
|
|
3508
|
+
])
|
|
3509
|
+
]));
|
|
3510
|
+
}
|
|
3511
|
+
}, Ma = {
|
|
3512
|
+
class: "w-full",
|
|
3513
|
+
"data-component": "DXFormControl"
|
|
3514
|
+
}, La = { class: "flex items-center justify-between mb-1" }, _a = {
|
|
3515
|
+
key: 0,
|
|
3516
|
+
class: "text-sm font-medium text-slate-700"
|
|
3517
|
+
}, Oa = {
|
|
3518
|
+
key: 0,
|
|
3519
|
+
class: "text-rose-500"
|
|
3520
|
+
}, Ta = {
|
|
3521
|
+
key: 1,
|
|
3522
|
+
class: "text-xs text-slate-500"
|
|
3523
|
+
}, Za = { class: "relative" }, Na = {
|
|
3524
|
+
key: 0,
|
|
3525
|
+
class: "absolute left-3 top-1/2 -translate-y-1/2 text-slate-400"
|
|
3526
|
+
}, Pa = {
|
|
3527
|
+
key: 1,
|
|
3528
|
+
class: "absolute right-3 top-1/2 -translate-y-1/2"
|
|
3529
|
+
}, Fa = {
|
|
3530
|
+
key: 0,
|
|
3531
|
+
class: "mt-1 text-xs text-rose-500 flex items-center gap-1"
|
|
3532
|
+
}, Ha = {
|
|
3533
|
+
key: 1,
|
|
3534
|
+
class: "mt-1 text-xs text-slate-500"
|
|
3535
|
+
}, lo = {
|
|
3536
|
+
__name: "DXFormControl",
|
|
3537
|
+
props: {
|
|
3538
|
+
/** Лейбл */
|
|
3539
|
+
label: { type: String, default: "" },
|
|
3540
|
+
/** Текст ошибки */
|
|
3541
|
+
error: { type: String, default: "" },
|
|
3542
|
+
/** Вспомогательный текст */
|
|
3543
|
+
helper: { type: String, default: "" },
|
|
3544
|
+
/** Обязательное поле */
|
|
3545
|
+
required: { type: Boolean, default: !1 },
|
|
3546
|
+
/** Состояние валидации: success | error | '' */
|
|
3547
|
+
validationState: { type: String, default: "" },
|
|
3548
|
+
/** Иконка-префикс */
|
|
3549
|
+
prefixIcon: { type: Object, default: null },
|
|
3550
|
+
/** Максимальная длина */
|
|
3551
|
+
maxLength: { type: Number, default: 0 },
|
|
3552
|
+
/** Текущая длина */
|
|
3553
|
+
currentLength: { type: Number, default: 0 },
|
|
3554
|
+
/** Показывать счетчик */
|
|
3555
|
+
showCount: { type: Boolean, default: !1 }
|
|
3556
|
+
},
|
|
3557
|
+
setup(e) {
|
|
3558
|
+
const t = e, l = g(() => t.validationState === "success" || t.validationState === "error");
|
|
3559
|
+
return (s, r) => (a(), n("div", Ma, [
|
|
3560
|
+
o("div", La, [
|
|
3561
|
+
e.label ? (a(), n("label", _a, [
|
|
3562
|
+
j(b(e.label) + " ", 1),
|
|
3563
|
+
e.required ? (a(), n("span", Oa, "*")) : c("", !0)
|
|
3564
|
+
])) : c("", !0),
|
|
3565
|
+
e.maxLength && e.showCount ? (a(), n("span", Ta, b(e.currentLength) + " / " + b(e.maxLength), 1)) : c("", !0)
|
|
3566
|
+
]),
|
|
3567
|
+
o("div", Za, [
|
|
3568
|
+
s.$slots.prefix || e.prefixIcon ? (a(), n("div", Na, [
|
|
3569
|
+
e.prefixIcon ? (a(), C(S, {
|
|
3570
|
+
key: 0,
|
|
3571
|
+
icon: e.prefixIcon,
|
|
3572
|
+
size: "sm",
|
|
3573
|
+
animation: "none"
|
|
3574
|
+
}, null, 8, ["icon"])) : c("", !0),
|
|
3575
|
+
$(s.$slots, "prefix")
|
|
3576
|
+
])) : c("", !0),
|
|
3577
|
+
o("div", {
|
|
3578
|
+
class: f({ "pl-10": s.$slots.prefix || e.prefixIcon, "pr-10": l.value })
|
|
3579
|
+
}, [
|
|
3580
|
+
$(s.$slots, "default")
|
|
3581
|
+
], 2),
|
|
3582
|
+
l.value ? (a(), n("div", Pa, [
|
|
3583
|
+
A(ne, {
|
|
3584
|
+
state: e.validationState,
|
|
3585
|
+
size: "md"
|
|
3586
|
+
}, null, 8, ["state"])
|
|
3587
|
+
])) : c("", !0)
|
|
3588
|
+
]),
|
|
3589
|
+
e.error ? (a(), n("p", Fa, [
|
|
3590
|
+
A(ne, {
|
|
3591
|
+
state: "error",
|
|
3592
|
+
size: "xs"
|
|
3593
|
+
}),
|
|
3594
|
+
j(" " + b(e.error), 1)
|
|
3595
|
+
])) : e.helper ? (a(), n("p", Ha, b(e.helper), 1)) : c("", !0)
|
|
3596
|
+
]));
|
|
3597
|
+
}
|
|
3598
|
+
}, Ra = {
|
|
3599
|
+
class: "w-full",
|
|
3600
|
+
"data-component": "DXInputGroup"
|
|
3601
|
+
}, qa = {
|
|
3602
|
+
key: 0,
|
|
3603
|
+
class: "block text-sm font-medium text-slate-700 mb-1"
|
|
3604
|
+
}, Ea = { class: "flex" }, Ga = {
|
|
3605
|
+
key: 1,
|
|
3606
|
+
class: "mt-1 text-xs text-slate-500"
|
|
3607
|
+
}, ao = {
|
|
3608
|
+
__name: "DXInputGroup",
|
|
3609
|
+
props: {
|
|
3610
|
+
label: { type: String, default: "" },
|
|
3611
|
+
helper: { type: String, default: "" },
|
|
3612
|
+
size: { type: String, default: "md" }
|
|
3613
|
+
},
|
|
3614
|
+
setup(e) {
|
|
3615
|
+
return re("inputGroup", {
|
|
3616
|
+
size: e.size
|
|
3617
|
+
}), (l, s) => (a(), n("div", Ra, [
|
|
3618
|
+
e.label ? (a(), n("label", qa, b(e.label), 1)) : c("", !0),
|
|
3619
|
+
o("div", Ea, [
|
|
3620
|
+
$(l.$slots, "default")
|
|
3621
|
+
]),
|
|
3622
|
+
e.helper ? (a(), n("p", Ga, b(e.helper), 1)) : c("", !0)
|
|
3623
|
+
]));
|
|
3624
|
+
}
|
|
3625
|
+
}, Ua = {
|
|
3626
|
+
class: "w-full",
|
|
3627
|
+
"data-component": "DXInputMask"
|
|
3628
|
+
}, Ka = {
|
|
3629
|
+
key: 0,
|
|
3630
|
+
class: "block text-sm text-slate-600 mb-1 font-medium"
|
|
3631
|
+
}, Wa = ["type", "placeholder", "value", "disabled"], Ya = {
|
|
3632
|
+
key: 1,
|
|
3633
|
+
class: "mt-1 text-xs text-slate-500"
|
|
3634
|
+
}, no = {
|
|
3635
|
+
__name: "DXInputMask",
|
|
3636
|
+
props: {
|
|
3637
|
+
/** Значение (v-model) - сырое значение без маски */
|
|
3638
|
+
modelValue: { type: String, default: "" },
|
|
3639
|
+
/** Маска: # = цифра, например "+7 (###) ###-##-##" */
|
|
3640
|
+
mask: { type: String, required: !0 },
|
|
3641
|
+
/** Лейбл */
|
|
3642
|
+
label: { type: String, default: "" },
|
|
3643
|
+
/** Placeholder */
|
|
3644
|
+
placeholder: { type: String, default: "" },
|
|
3645
|
+
/** Вспомогательный текст */
|
|
3646
|
+
helper: { type: String, default: "" },
|
|
3647
|
+
/** Отключенное состояние */
|
|
3648
|
+
disabled: { type: Boolean, default: !1 },
|
|
3649
|
+
/** Тип input */
|
|
3650
|
+
type: { type: String, default: "text" }
|
|
3651
|
+
},
|
|
3652
|
+
emits: ["update:modelValue"],
|
|
3653
|
+
setup(e, { emit: t }) {
|
|
3654
|
+
const l = e, s = t, r = D(null), i = D(""), d = (m) => {
|
|
3655
|
+
const h = m.replace(/\D/g, "");
|
|
3656
|
+
let y = "", x = 0;
|
|
3657
|
+
for (let V = 0; V < l.mask.length && x < h.length; V++)
|
|
3658
|
+
l.mask[V] === "#" ? (y += h[x], x++) : y += l.mask[V];
|
|
3659
|
+
return y;
|
|
3660
|
+
}, u = (m) => m.replace(/\D/g, ""), p = (m) => {
|
|
3661
|
+
const h = u(m.target.value), y = d(h);
|
|
3662
|
+
i.value = y, s("update:modelValue", h), setTimeout(() => {
|
|
3663
|
+
if (r.value) {
|
|
3664
|
+
const x = y.length;
|
|
3665
|
+
r.value.setSelectionRange(x, x);
|
|
3666
|
+
}
|
|
3667
|
+
}, 0);
|
|
3668
|
+
}, v = (m) => {
|
|
3669
|
+
["Backspace", "Delete", "Tab", "Escape", "Enter", "ArrowLeft", "ArrowRight"].includes(m.key) || /^\d$/.test(m.key) || m.preventDefault();
|
|
3670
|
+
};
|
|
3671
|
+
return H(() => l.modelValue, (m) => {
|
|
3672
|
+
m !== u(i.value) && (i.value = d(m));
|
|
3673
|
+
}, { immediate: !0 }), (m, h) => (a(), n("div", Ua, [
|
|
3674
|
+
e.label ? (a(), n("label", Ka, b(e.label), 1)) : c("", !0),
|
|
3675
|
+
o("input", {
|
|
3676
|
+
ref_key: "inputRef",
|
|
3677
|
+
ref: r,
|
|
3678
|
+
type: e.type,
|
|
3679
|
+
placeholder: e.placeholder,
|
|
3680
|
+
value: i.value,
|
|
3681
|
+
disabled: e.disabled,
|
|
3682
|
+
class: "w-full h-10 px-4 py-2.5 text-sm rounded-xl border border-slate-200 bg-white text-slate-700 placeholder:text-slate-400 transition-colors hover:border-slate-300 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300 disabled:opacity-60 disabled:cursor-not-allowed disabled:bg-slate-50",
|
|
3683
|
+
onInput: p,
|
|
3684
|
+
onKeydown: v
|
|
3685
|
+
}, null, 40, Wa),
|
|
3686
|
+
e.helper ? (a(), n("p", Ya, b(e.helper), 1)) : c("", !0)
|
|
3687
|
+
]));
|
|
3688
|
+
}
|
|
3689
|
+
}, Ja = {
|
|
3690
|
+
class: "flex items-center gap-1",
|
|
3691
|
+
"aria-label": "Pagination",
|
|
3692
|
+
"data-component": "DXPagination"
|
|
3693
|
+
}, Qa = ["disabled"], en = {
|
|
3694
|
+
key: 0,
|
|
3695
|
+
class: "px-2 text-slate-400"
|
|
3696
|
+
}, tn = ["aria-current", "onClick"], ln = ["disabled"], an = "bg-slate-900 text-white hover:bg-slate-800", so = {
|
|
3697
|
+
__name: "DXPagination",
|
|
3698
|
+
props: {
|
|
3699
|
+
/** Текущая страница (v-model) */
|
|
3700
|
+
modelValue: { type: Number, default: 1 },
|
|
3701
|
+
/** Всего страниц */
|
|
3702
|
+
totalPages: { type: Number, required: !0 },
|
|
3703
|
+
/** Сколько страниц показывать вокруг текущей */
|
|
3704
|
+
siblingCount: { type: Number, default: 1 },
|
|
3705
|
+
/** Размер: sm | md | lg */
|
|
3706
|
+
size: { type: String, default: "md" }
|
|
3707
|
+
},
|
|
3708
|
+
emits: ["update:modelValue"],
|
|
3709
|
+
setup(e, { emit: t }) {
|
|
3710
|
+
const l = e, s = t, r = (v) => {
|
|
3711
|
+
v >= 1 && v <= l.totalPages && s("update:modelValue", v);
|
|
3712
|
+
}, i = g(() => {
|
|
3713
|
+
const v = l.modelValue, m = l.totalPages, h = l.siblingCount, y = [];
|
|
3714
|
+
y.push(1);
|
|
3715
|
+
const x = Math.max(2, v - h), V = Math.min(m - 1, v + h);
|
|
3716
|
+
x > 2 && y.push("...");
|
|
3717
|
+
for (let T = x; T <= V; T++)
|
|
3718
|
+
T !== 1 && T !== m && y.push(T);
|
|
3719
|
+
return V < m - 1 && y.push("..."), m > 1 && y.push(m), y;
|
|
3720
|
+
}), d = {
|
|
3721
|
+
sm: "h-7 min-w-7 text-xs",
|
|
3722
|
+
md: "h-9 min-w-9 text-sm",
|
|
3723
|
+
lg: "h-11 min-w-11 text-base"
|
|
3724
|
+
}, u = g(() => [
|
|
3725
|
+
"inline-flex items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 hover:bg-slate-50 hover:border-slate-300 transition-colors",
|
|
3726
|
+
d[l.size] || d.md
|
|
3727
|
+
]), p = g(() => [
|
|
3728
|
+
"inline-flex items-center justify-center rounded-lg font-medium transition-colors",
|
|
3729
|
+
d[l.size] || d.md,
|
|
3730
|
+
"text-slate-600 hover:bg-slate-100"
|
|
3731
|
+
]);
|
|
3732
|
+
return (v, m) => (a(), n("nav", Ja, [
|
|
3733
|
+
o("button", {
|
|
3734
|
+
type: "button",
|
|
3735
|
+
disabled: e.modelValue <= 1,
|
|
3736
|
+
class: f([u.value, e.modelValue <= 1 && "opacity-50 cursor-not-allowed"]),
|
|
3737
|
+
onClick: m[0] || (m[0] = (h) => r(e.modelValue - 1)),
|
|
3738
|
+
"aria-label": "Предыдущая"
|
|
3739
|
+
}, [
|
|
3740
|
+
A(S, {
|
|
3741
|
+
icon: O(Ke),
|
|
3742
|
+
size: "sm",
|
|
3743
|
+
animation: "none"
|
|
3744
|
+
}, null, 8, ["icon"])
|
|
3745
|
+
], 10, Qa),
|
|
3746
|
+
(a(!0), n(M, null, _(i.value, (h) => (a(), n(M, { key: h }, [
|
|
3747
|
+
h === "..." ? (a(), n("span", en, "...")) : (a(), n("button", {
|
|
3748
|
+
key: 1,
|
|
3749
|
+
type: "button",
|
|
3750
|
+
class: f([p.value, h === e.modelValue && an]),
|
|
3751
|
+
"aria-current": h === e.modelValue ? "page" : void 0,
|
|
3752
|
+
onClick: (y) => r(h)
|
|
3753
|
+
}, b(h), 11, tn))
|
|
3754
|
+
], 64))), 128)),
|
|
3755
|
+
o("button", {
|
|
3756
|
+
type: "button",
|
|
3757
|
+
disabled: e.modelValue >= e.totalPages,
|
|
3758
|
+
class: f([u.value, e.modelValue >= e.totalPages && "opacity-50 cursor-not-allowed"]),
|
|
3759
|
+
onClick: m[1] || (m[1] = (h) => r(e.modelValue + 1)),
|
|
3760
|
+
"aria-label": "Следующая"
|
|
3761
|
+
}, [
|
|
3762
|
+
A(S, {
|
|
3763
|
+
icon: O(de),
|
|
3764
|
+
size: "sm",
|
|
3765
|
+
animation: "none"
|
|
3766
|
+
}, null, 8, ["icon"])
|
|
3767
|
+
], 10, ln)
|
|
3768
|
+
]));
|
|
3769
|
+
}
|
|
3770
|
+
}, nn = {
|
|
3771
|
+
class: "w-full",
|
|
3772
|
+
"data-component": "DXPasswordInput"
|
|
3773
|
+
}, sn = {
|
|
3774
|
+
key: 0,
|
|
3775
|
+
class: "block text-sm text-slate-600 mb-1 font-medium"
|
|
3776
|
+
}, on = { class: "relative" }, rn = ["type", "placeholder", "value", "disabled"], dn = ["disabled", "aria-label"], un = {
|
|
3777
|
+
key: 1,
|
|
3778
|
+
class: "mt-1 text-xs text-rose-500"
|
|
3779
|
+
}, cn = {
|
|
3780
|
+
key: 2,
|
|
3781
|
+
class: "mt-1 text-xs text-slate-500"
|
|
3782
|
+
}, oo = {
|
|
3783
|
+
__name: "DXPasswordInput",
|
|
3784
|
+
props: {
|
|
3785
|
+
/** Значение (v-model) */
|
|
3786
|
+
modelValue: { type: String, default: "" },
|
|
3787
|
+
/** Лейбл */
|
|
3788
|
+
label: { type: String, default: "" },
|
|
3789
|
+
/** Placeholder */
|
|
3790
|
+
placeholder: { type: String, default: "" },
|
|
3791
|
+
/** Текст ошибки */
|
|
3792
|
+
error: { type: String, default: "" },
|
|
3793
|
+
/** Вспомогательный текст */
|
|
3794
|
+
helper: { type: String, default: "" },
|
|
3795
|
+
/** Отключенное состояние */
|
|
3796
|
+
disabled: { type: Boolean, default: !1 }
|
|
3797
|
+
},
|
|
3798
|
+
emits: ["update:modelValue"],
|
|
3799
|
+
setup(e) {
|
|
3800
|
+
const t = D(!1);
|
|
3801
|
+
return (l, s) => (a(), n("div", nn, [
|
|
3802
|
+
e.label ? (a(), n("label", sn, b(e.label), 1)) : c("", !0),
|
|
3803
|
+
o("div", on, [
|
|
3804
|
+
o("input", {
|
|
3805
|
+
type: t.value ? "text" : "password",
|
|
3806
|
+
placeholder: e.placeholder,
|
|
3807
|
+
value: e.modelValue,
|
|
3808
|
+
disabled: e.disabled,
|
|
3809
|
+
class: f(["w-full pr-11 h-10 px-4 py-2.5 text-sm rounded-xl border border-slate-200 bg-white text-slate-700 placeholder:text-slate-400 transition-colors hover:border-slate-300 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-300 disabled:opacity-60 disabled:cursor-not-allowed disabled:bg-slate-50", { "border-rose-300 focus:ring-rose-500/10": e.error }]),
|
|
3810
|
+
onInput: s[0] || (s[0] = (r) => l.$emit("update:modelValue", r.target.value))
|
|
3811
|
+
}, null, 42, rn),
|
|
3812
|
+
o("button", {
|
|
3813
|
+
type: "button",
|
|
3814
|
+
class: "absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 transition",
|
|
3815
|
+
disabled: e.disabled,
|
|
3816
|
+
onClick: s[1] || (s[1] = (r) => t.value = !t.value),
|
|
3817
|
+
"aria-label": t.value ? "Скрыть пароль" : "Показать пароль"
|
|
3818
|
+
}, [
|
|
3819
|
+
A(S, {
|
|
3820
|
+
icon: t.value ? O(et) : O(ae),
|
|
3821
|
+
size: "md",
|
|
3822
|
+
animation: "scale"
|
|
3823
|
+
}, null, 8, ["icon"])
|
|
3824
|
+
], 8, dn)
|
|
3825
|
+
]),
|
|
3826
|
+
e.error ? (a(), n("p", un, b(e.error), 1)) : e.helper ? (a(), n("p", cn, b(e.helper), 1)) : c("", !0)
|
|
3827
|
+
]));
|
|
3828
|
+
}
|
|
3829
|
+
}, mn = ["value", "checked", "disabled"], fn = { class: "flex items-start gap-3" }, pn = { class: "flex-1 min-w-0" }, gn = { class: "flex items-center justify-between" }, vn = {
|
|
3830
|
+
key: 0,
|
|
3831
|
+
class: "w-5 h-5 rounded-full bg-slate-900 flex items-center justify-center flex-shrink-0"
|
|
3832
|
+
}, bn = {
|
|
3833
|
+
key: 0,
|
|
3834
|
+
class: "text-sm text-slate-600 mt-1"
|
|
3835
|
+
}, ro = {
|
|
3836
|
+
__name: "DXRadioCard",
|
|
3837
|
+
props: {
|
|
3838
|
+
modelValue: [String, Number, Boolean],
|
|
3839
|
+
value: { type: [String, Number, Boolean], required: !0 },
|
|
3840
|
+
title: { type: String, required: !0 },
|
|
3841
|
+
description: { type: String, default: "" },
|
|
3842
|
+
icon: { type: Object, default: null },
|
|
3843
|
+
disabled: { type: Boolean, default: !1 }
|
|
3844
|
+
},
|
|
3845
|
+
emits: ["update:modelValue"],
|
|
3846
|
+
setup(e) {
|
|
3847
|
+
return (t, l) => (a(), n("label", {
|
|
3848
|
+
class: f(["block relative cursor-pointer group", { "cursor-not-allowed opacity-60": e.disabled }]),
|
|
3849
|
+
"data-component": "DXRadioCard"
|
|
3850
|
+
}, [
|
|
3851
|
+
o("input", {
|
|
3852
|
+
type: "radio",
|
|
3853
|
+
value: e.value,
|
|
3854
|
+
checked: e.modelValue === e.value,
|
|
3855
|
+
disabled: e.disabled,
|
|
3856
|
+
class: "sr-only peer",
|
|
3857
|
+
onChange: l[0] || (l[0] = (s) => t.$emit("update:modelValue", e.value))
|
|
3858
|
+
}, null, 40, mn),
|
|
3859
|
+
o("div", {
|
|
3860
|
+
class: f(["border-2 rounded-xl p-4 transition-all", [
|
|
3861
|
+
e.modelValue === e.value ? "border-slate-900 bg-slate-50" : "border-slate-200 bg-white",
|
|
3862
|
+
!e.disabled && "hover:border-slate-300 hover:shadow-sm",
|
|
3863
|
+
e.disabled && "bg-slate-50"
|
|
3864
|
+
]])
|
|
3865
|
+
}, [
|
|
3866
|
+
o("div", fn, [
|
|
3867
|
+
e.icon ? (a(), C(L(e.icon), {
|
|
3868
|
+
key: 0,
|
|
3869
|
+
class: f(["w-6 h-6 flex-shrink-0", e.modelValue === e.value ? "text-slate-900" : "text-slate-400"])
|
|
3870
|
+
}, null, 8, ["class"])) : c("", !0),
|
|
3871
|
+
o("div", pn, [
|
|
3872
|
+
o("div", gn, [
|
|
3873
|
+
o("p", {
|
|
3874
|
+
class: f(["font-semibold", e.modelValue === e.value ? "text-slate-900" : "text-slate-700"])
|
|
3875
|
+
}, b(e.title), 3),
|
|
3876
|
+
e.modelValue === e.value ? (a(), n("div", vn, [...l[1] || (l[1] = [
|
|
3877
|
+
o("svg", {
|
|
3878
|
+
class: "w-3 h-3 text-white",
|
|
3879
|
+
fill: "none",
|
|
3880
|
+
stroke: "currentColor",
|
|
3881
|
+
viewBox: "0 0 24 24"
|
|
3882
|
+
}, [
|
|
3883
|
+
o("path", {
|
|
3884
|
+
"stroke-linecap": "round",
|
|
3885
|
+
"stroke-linejoin": "round",
|
|
3886
|
+
"stroke-width": "3",
|
|
3887
|
+
d: "M5 13l4 4L19 7"
|
|
3888
|
+
})
|
|
3889
|
+
], -1)
|
|
3890
|
+
])])) : c("", !0)
|
|
3891
|
+
]),
|
|
3892
|
+
e.description ? (a(), n("p", bn, b(e.description), 1)) : c("", !0),
|
|
3893
|
+
$(t.$slots, "default")
|
|
3894
|
+
])
|
|
3895
|
+
])
|
|
3896
|
+
], 2)
|
|
3897
|
+
], 2));
|
|
3898
|
+
}
|
|
3899
|
+
}, hn = {
|
|
3900
|
+
class: "space-y-2",
|
|
3901
|
+
"data-component": "DXRadioGroup"
|
|
3902
|
+
}, xn = {
|
|
3903
|
+
key: 0,
|
|
3904
|
+
class: "text-sm font-medium text-slate-700 mb-3"
|
|
3905
|
+
}, yn = ["value", "checked", "disabled", "onChange"], wn = { class: "text-sm text-slate-700 select-none" }, kn = {
|
|
3906
|
+
key: 1,
|
|
3907
|
+
class: "text-xs text-slate-500 mt-1"
|
|
3908
|
+
}, io = {
|
|
3909
|
+
__name: "DXRadioGroup",
|
|
3910
|
+
props: {
|
|
3911
|
+
/** Текущее значение (v-model) */
|
|
3912
|
+
modelValue: [String, Number, Boolean],
|
|
3913
|
+
/** Опции: [{ value, label, disabled? }] */
|
|
3914
|
+
options: { type: Array, required: !0 },
|
|
3915
|
+
/** Лейбл группы */
|
|
3916
|
+
label: { type: String, default: "" },
|
|
3917
|
+
/** Вспомогательный текст */
|
|
3918
|
+
helper: { type: String, default: "" },
|
|
3919
|
+
/** Отключить все опции */
|
|
3920
|
+
disabled: { type: Boolean, default: !1 },
|
|
3921
|
+
/** Размер: sm | md | lg */
|
|
3922
|
+
size: { type: String, default: "md" },
|
|
3923
|
+
/** Расположение: vertical | horizontal */
|
|
3924
|
+
layout: { type: String, default: "vertical" }
|
|
3925
|
+
},
|
|
3926
|
+
emits: ["update:modelValue"],
|
|
3927
|
+
setup(e) {
|
|
3928
|
+
const t = e, l = g(() => {
|
|
3929
|
+
switch (t.size) {
|
|
3930
|
+
case "sm":
|
|
3931
|
+
return "h-3.5 w-3.5";
|
|
3932
|
+
case "lg":
|
|
3933
|
+
return "h-5 w-5";
|
|
3934
|
+
default:
|
|
3935
|
+
return "h-4 w-4";
|
|
3936
|
+
}
|
|
3937
|
+
});
|
|
3938
|
+
return (s, r) => (a(), n("div", hn, [
|
|
3939
|
+
e.label ? (a(), n("p", xn, b(e.label), 1)) : c("", !0),
|
|
3940
|
+
o("div", {
|
|
3941
|
+
class: f(e.layout === "horizontal" ? "flex flex-wrap gap-3" : "space-y-2")
|
|
3942
|
+
}, [
|
|
3943
|
+
(a(!0), n(M, null, _(e.options, (i) => (a(), n("label", {
|
|
3944
|
+
key: i.value,
|
|
3945
|
+
class: f(["inline-flex items-center gap-2 cursor-pointer", { "opacity-60 cursor-not-allowed": e.disabled || i.disabled }])
|
|
3946
|
+
}, [
|
|
3947
|
+
o("input", {
|
|
3948
|
+
type: "radio",
|
|
3949
|
+
value: i.value,
|
|
3950
|
+
checked: e.modelValue === i.value,
|
|
3951
|
+
disabled: e.disabled || i.disabled,
|
|
3952
|
+
class: f(["rounded-full border-slate-300 text-slate-900 focus:ring-slate-900/10 focus:ring-2 transition", l.value]),
|
|
3953
|
+
onChange: (d) => s.$emit("update:modelValue", i.value)
|
|
3954
|
+
}, null, 42, yn),
|
|
3955
|
+
o("span", wn, b(i.label), 1)
|
|
3956
|
+
], 2))), 128))
|
|
3957
|
+
], 2),
|
|
3958
|
+
e.helper ? (a(), n("p", kn, b(e.helper), 1)) : c("", !0)
|
|
3959
|
+
]));
|
|
3960
|
+
}
|
|
3961
|
+
}, $n = {
|
|
3962
|
+
key: 0,
|
|
3963
|
+
class: "block text-sm text-slate-600 mb-1 font-medium"
|
|
3964
|
+
}, Cn = {
|
|
3965
|
+
key: 1,
|
|
3966
|
+
class: "flex flex-wrap gap-2 mb-2"
|
|
3967
|
+
}, Sn = ["onClick"], Vn = { class: "truncate flex items-center gap-2" }, Dn = {
|
|
3968
|
+
key: 2,
|
|
3969
|
+
class: "absolute z-20 mt-2 w-full bg-white border border-slate-200 rounded-xl shadow-lg p-3 space-y-2"
|
|
3970
|
+
}, zn = { class: "relative" }, Bn = ["placeholder"], Xn = { class: "max-h-48 overflow-y-auto space-y-1" }, In = ["onClick"], An = { class: "flex items-center gap-2 flex-1 truncate" }, jn = {
|
|
3971
|
+
key: 0,
|
|
3972
|
+
class: "w-4 h-4 text-slate-900 flex-shrink-0",
|
|
3973
|
+
fill: "none",
|
|
3974
|
+
stroke: "currentColor",
|
|
3975
|
+
viewBox: "0 0 24 24"
|
|
3976
|
+
}, Mn = {
|
|
3977
|
+
key: 1,
|
|
3978
|
+
class: "text-xs text-slate-500 px-3 py-2"
|
|
3979
|
+
}, uo = {
|
|
3980
|
+
__name: "DXSearchSelect",
|
|
3981
|
+
props: {
|
|
3982
|
+
/** Значение (v-model) - строка или массив для multiple */
|
|
3983
|
+
modelValue: [String, Number, Array],
|
|
3984
|
+
/** Опции: [{ value, label, icon? }] */
|
|
3985
|
+
options: { type: Array, default: () => [] },
|
|
3986
|
+
/** Лейбл */
|
|
3987
|
+
label: { type: String, default: "" },
|
|
3988
|
+
/** Placeholder */
|
|
3989
|
+
placeholder: { type: String, default: "Выбрать" },
|
|
3990
|
+
/** Placeholder поиска */
|
|
3991
|
+
searchPlaceholder: { type: String, default: "Поиск..." },
|
|
3992
|
+
/** Множественный выбор */
|
|
3993
|
+
multiple: { type: Boolean, default: !1 },
|
|
3994
|
+
/** Возможность создавать новые опции */
|
|
3995
|
+
creatable: { type: Boolean, default: !1 }
|
|
3996
|
+
},
|
|
3997
|
+
emits: ["update:modelValue", "create"],
|
|
3998
|
+
setup(e, { emit: t }) {
|
|
3999
|
+
const l = e, s = t, r = D(!1), i = D(""), d = D(null), u = D(null), p = g(() => l.multiple ? null : l.options.find((w) => String(w.value) === String(l.modelValue))), v = g(() => {
|
|
4000
|
+
if (!l.multiple) return [];
|
|
4001
|
+
const w = Array.isArray(l.modelValue) ? l.modelValue : [];
|
|
4002
|
+
return l.options.filter((k) => w.includes(k.value));
|
|
4003
|
+
}), m = g(() => {
|
|
4004
|
+
if (l.multiple) {
|
|
4005
|
+
const w = v.value.length;
|
|
4006
|
+
return w > 0 ? `Выбрано: ${w}` : l.placeholder;
|
|
4007
|
+
}
|
|
4008
|
+
return p.value ? p.value.label : l.placeholder;
|
|
4009
|
+
}), h = g(() => {
|
|
4010
|
+
const w = i.value.toLowerCase().trim();
|
|
4011
|
+
return w ? l.options.filter((k) => k.label.toLowerCase().includes(w)) : l.options;
|
|
4012
|
+
}), y = (w) => l.multiple ? (Array.isArray(l.modelValue) ? l.modelValue : []).includes(w) : l.modelValue === w, x = () => {
|
|
4013
|
+
r.value = !r.value, r.value && W(() => {
|
|
4014
|
+
var w;
|
|
4015
|
+
return (w = u.value) == null ? void 0 : w.focus();
|
|
4016
|
+
});
|
|
4017
|
+
}, V = (w) => {
|
|
4018
|
+
if (l.multiple) {
|
|
4019
|
+
const k = Array.isArray(l.modelValue) ? l.modelValue : [], I = k.indexOf(w);
|
|
4020
|
+
if (I > -1) {
|
|
4021
|
+
const B = [...k];
|
|
4022
|
+
B.splice(I, 1), s("update:modelValue", B);
|
|
4023
|
+
} else
|
|
4024
|
+
s("update:modelValue", [...k, w]);
|
|
4025
|
+
} else
|
|
4026
|
+
s("update:modelValue", w), r.value = !1;
|
|
4027
|
+
i.value = "";
|
|
4028
|
+
}, T = (w) => {
|
|
4029
|
+
if (l.multiple) {
|
|
4030
|
+
const k = Array.isArray(l.modelValue) ? l.modelValue : [];
|
|
4031
|
+
s("update:modelValue", k.filter((I) => I !== w));
|
|
4032
|
+
}
|
|
4033
|
+
}, X = () => {
|
|
4034
|
+
l.creatable && i.value && (s("create", i.value), i.value = "");
|
|
4035
|
+
}, z = (w) => {
|
|
4036
|
+
d.value && !d.value.contains(w.target) && (r.value = !1, i.value = "");
|
|
4037
|
+
};
|
|
4038
|
+
return H(r, (w) => {
|
|
4039
|
+
w || (i.value = "");
|
|
4040
|
+
}), U(() => document.addEventListener("click", z)), J(() => document.removeEventListener("click", z)), (w, k) => {
|
|
4041
|
+
var I;
|
|
4042
|
+
return a(), n("div", {
|
|
4043
|
+
class: "relative",
|
|
4044
|
+
ref_key: "root",
|
|
4045
|
+
ref: d,
|
|
4046
|
+
"data-component": "DXSearchSelect"
|
|
4047
|
+
}, [
|
|
4048
|
+
e.label ? (a(), n("label", $n, b(e.label), 1)) : c("", !0),
|
|
4049
|
+
e.multiple && v.value.length > 0 ? (a(), n("div", Cn, [
|
|
4050
|
+
(a(!0), n(M, null, _(v.value, (B) => (a(), n("span", {
|
|
4051
|
+
key: B.value,
|
|
4052
|
+
class: "inline-flex items-center gap-1 px-2 py-1 text-xs font-medium bg-slate-100 text-slate-700 rounded-lg"
|
|
4053
|
+
}, [
|
|
4054
|
+
B.icon ? (a(), C(L(B.icon), {
|
|
4055
|
+
key: 0,
|
|
4056
|
+
class: "w-3 h-3"
|
|
4057
|
+
})) : c("", !0),
|
|
4058
|
+
j(" " + b(B.label) + " ", 1),
|
|
4059
|
+
o("button", {
|
|
4060
|
+
type: "button",
|
|
4061
|
+
class: "hover:text-slate-900",
|
|
4062
|
+
onClick: N((K) => T(B.value), ["stop"])
|
|
4063
|
+
}, [...k[3] || (k[3] = [
|
|
4064
|
+
o("svg", {
|
|
4065
|
+
class: "w-3 h-3",
|
|
4066
|
+
fill: "none",
|
|
4067
|
+
stroke: "currentColor",
|
|
4068
|
+
viewBox: "0 0 24 24"
|
|
4069
|
+
}, [
|
|
4070
|
+
o("path", {
|
|
4071
|
+
"stroke-linecap": "round",
|
|
4072
|
+
"stroke-linejoin": "round",
|
|
4073
|
+
"stroke-width": "2",
|
|
4074
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
4075
|
+
})
|
|
4076
|
+
], -1)
|
|
4077
|
+
])], 8, Sn)
|
|
4078
|
+
]))), 128))
|
|
4079
|
+
])) : c("", !0),
|
|
4080
|
+
o("button", {
|
|
4081
|
+
type: "button",
|
|
4082
|
+
class: f(["w-full flex items-center justify-between h-10 px-4 py-2.5 text-sm rounded-xl border border-slate-200 bg-white transition-colors", [
|
|
4083
|
+
!r.value && "hover:border-slate-300",
|
|
4084
|
+
r.value && "ring-2 ring-slate-900/10 border-slate-300"
|
|
4085
|
+
]]),
|
|
4086
|
+
onClick: x
|
|
4087
|
+
}, [
|
|
4088
|
+
o("span", Vn, [
|
|
4089
|
+
!e.multiple && ((I = p.value) != null && I.icon) ? (a(), C(L(p.value.icon), {
|
|
4090
|
+
key: 0,
|
|
4091
|
+
class: "w-4 h-4 text-slate-500"
|
|
4092
|
+
})) : c("", !0),
|
|
4093
|
+
j(" " + b(m.value), 1)
|
|
4094
|
+
]),
|
|
4095
|
+
(a(), n("svg", {
|
|
4096
|
+
class: f(["w-4 h-4 text-slate-400 transition-transform", { "rotate-180": r.value }]),
|
|
4097
|
+
fill: "none",
|
|
4098
|
+
stroke: "currentColor",
|
|
4099
|
+
viewBox: "0 0 24 24"
|
|
4100
|
+
}, [...k[4] || (k[4] = [
|
|
4101
|
+
o("path", {
|
|
4102
|
+
"stroke-linecap": "round",
|
|
4103
|
+
"stroke-linejoin": "round",
|
|
4104
|
+
"stroke-width": "2",
|
|
4105
|
+
d: "M19 9l-7 7-7-7"
|
|
4106
|
+
}, null, -1)
|
|
4107
|
+
])], 2))
|
|
4108
|
+
], 2),
|
|
4109
|
+
r.value ? (a(), n("div", Dn, [
|
|
4110
|
+
o("div", zn, [
|
|
4111
|
+
q(o("input", {
|
|
4112
|
+
ref_key: "searchInput",
|
|
4113
|
+
ref: u,
|
|
4114
|
+
"onUpdate:modelValue": k[0] || (k[0] = (B) => i.value = B),
|
|
4115
|
+
class: "w-full px-3 py-2 text-sm border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-slate-900/10",
|
|
4116
|
+
placeholder: e.searchPlaceholder,
|
|
4117
|
+
onKeydown: [
|
|
4118
|
+
k[1] || (k[1] = N(() => {
|
|
4119
|
+
}, ["stop"])),
|
|
4120
|
+
k[2] || (k[2] = R((B) => r.value = !1, ["escape"]))
|
|
4121
|
+
]
|
|
4122
|
+
}, null, 40, Bn), [
|
|
4123
|
+
[G, i.value]
|
|
4124
|
+
]),
|
|
4125
|
+
k[5] || (k[5] = o("svg", {
|
|
4126
|
+
class: "absolute right-3 top-2.5 w-4 h-4 text-slate-400",
|
|
4127
|
+
fill: "none",
|
|
4128
|
+
stroke: "currentColor",
|
|
4129
|
+
viewBox: "0 0 24 24"
|
|
4130
|
+
}, [
|
|
4131
|
+
o("path", {
|
|
4132
|
+
"stroke-linecap": "round",
|
|
4133
|
+
"stroke-linejoin": "round",
|
|
4134
|
+
"stroke-width": "2",
|
|
4135
|
+
d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
|
|
4136
|
+
})
|
|
4137
|
+
], -1))
|
|
4138
|
+
]),
|
|
4139
|
+
o("div", Xn, [
|
|
4140
|
+
(a(!0), n(M, null, _(h.value, (B) => (a(), n("button", {
|
|
4141
|
+
key: B.value,
|
|
4142
|
+
type: "button",
|
|
4143
|
+
class: f(["w-full text-left px-3 py-2 rounded-lg hover:bg-slate-50 text-sm flex items-center justify-between gap-2", { "bg-slate-100": y(B.value) }]),
|
|
4144
|
+
onClick: (K) => V(B.value)
|
|
4145
|
+
}, [
|
|
4146
|
+
o("span", An, [
|
|
4147
|
+
B.icon ? (a(), C(L(B.icon), {
|
|
4148
|
+
key: 0,
|
|
4149
|
+
class: "w-4 h-4 text-slate-500"
|
|
4150
|
+
})) : c("", !0),
|
|
4151
|
+
j(" " + b(B.label), 1)
|
|
4152
|
+
]),
|
|
4153
|
+
y(B.value) ? (a(), n("svg", jn, [...k[6] || (k[6] = [
|
|
4154
|
+
o("path", {
|
|
4155
|
+
"stroke-linecap": "round",
|
|
4156
|
+
"stroke-linejoin": "round",
|
|
4157
|
+
"stroke-width": "2",
|
|
4158
|
+
d: "M5 13l4 4L19 7"
|
|
4159
|
+
}, null, -1)
|
|
4160
|
+
])])) : c("", !0)
|
|
4161
|
+
], 10, In))), 128)),
|
|
4162
|
+
e.creatable && i.value && !h.value.length ? (a(), n("button", {
|
|
4163
|
+
key: 0,
|
|
4164
|
+
type: "button",
|
|
4165
|
+
class: "w-full text-left px-3 py-2 rounded-lg hover:bg-slate-50 text-sm flex items-center gap-2 text-slate-600",
|
|
4166
|
+
onClick: X
|
|
4167
|
+
}, [
|
|
4168
|
+
k[7] || (k[7] = o("svg", {
|
|
4169
|
+
class: "w-4 h-4",
|
|
4170
|
+
fill: "none",
|
|
4171
|
+
stroke: "currentColor",
|
|
4172
|
+
viewBox: "0 0 24 24"
|
|
4173
|
+
}, [
|
|
4174
|
+
o("path", {
|
|
4175
|
+
"stroke-linecap": "round",
|
|
4176
|
+
"stroke-linejoin": "round",
|
|
4177
|
+
"stroke-width": "2",
|
|
4178
|
+
d: "M12 4v16m8-8H4"
|
|
4179
|
+
})
|
|
4180
|
+
], -1)),
|
|
4181
|
+
j(' Создать "' + b(i.value) + '" ', 1)
|
|
4182
|
+
])) : h.value.length ? c("", !0) : (a(), n("p", Mn, "Не найдено"))
|
|
4183
|
+
])
|
|
4184
|
+
])) : c("", !0)
|
|
4185
|
+
], 512);
|
|
4186
|
+
};
|
|
4187
|
+
}
|
|
4188
|
+
}, Ln = {
|
|
4189
|
+
class: "inline-flex",
|
|
4190
|
+
"data-component": "DXSegmentedControl"
|
|
4191
|
+
}, _n = {
|
|
4192
|
+
key: 0,
|
|
4193
|
+
class: "text-sm font-medium text-slate-700 mb-2"
|
|
4194
|
+
}, On = { class: "relative inline-flex p-1 bg-slate-100 rounded-xl gap-1" }, Tn = ["disabled", "onClick"], Zn = { key: 1 }, co = {
|
|
4195
|
+
__name: "DXSegmentedControl",
|
|
4196
|
+
props: {
|
|
4197
|
+
modelValue: [String, Number, Boolean],
|
|
4198
|
+
options: {
|
|
4199
|
+
type: Array,
|
|
4200
|
+
required: !0
|
|
4201
|
+
},
|
|
4202
|
+
label: { type: String, default: "" },
|
|
4203
|
+
/** Анимация иконок: none | wiggle | scale | rotate */
|
|
4204
|
+
iconAnimation: { type: String, default: "none" },
|
|
4205
|
+
/** Анимировать только активную иконку */
|
|
4206
|
+
animateActiveOnly: { type: Boolean, default: !0 },
|
|
4207
|
+
disabled: { type: Boolean, default: !1 }
|
|
4208
|
+
},
|
|
4209
|
+
emits: ["update:modelValue"],
|
|
4210
|
+
setup(e, { emit: t }) {
|
|
4211
|
+
const l = e, s = t, r = D([]), i = D({}), d = g(() => l.options.findIndex((m) => m.value === l.modelValue)), u = () => {
|
|
4212
|
+
const m = d.value;
|
|
4213
|
+
if (m >= 0 && r.value[m]) {
|
|
4214
|
+
const h = r.value[m];
|
|
4215
|
+
i.value = {
|
|
4216
|
+
width: `${h.offsetWidth}px`,
|
|
4217
|
+
height: `${h.offsetHeight}px`,
|
|
4218
|
+
left: `${h.offsetLeft}px`,
|
|
4219
|
+
top: `${h.offsetTop}px`
|
|
4220
|
+
};
|
|
4221
|
+
}
|
|
4222
|
+
}, p = (m) => {
|
|
4223
|
+
l.disabled || s("update:modelValue", m);
|
|
4224
|
+
}, v = (m) => l.iconAnimation === "none" ? "none" : l.animateActiveOnly ? l.modelValue === m.value ? l.iconAnimation : "none" : l.iconAnimation;
|
|
4225
|
+
return H(() => l.modelValue, () => {
|
|
4226
|
+
W(u);
|
|
4227
|
+
}), U(() => {
|
|
4228
|
+
W(u);
|
|
4229
|
+
}), (m, h) => (a(), n("div", Ln, [
|
|
4230
|
+
e.label ? (a(), n("p", _n, b(e.label), 1)) : c("", !0),
|
|
4231
|
+
o("div", On, [
|
|
4232
|
+
o("div", {
|
|
4233
|
+
class: "absolute bg-white rounded-lg shadow-sm transition-all duration-200 ease-out",
|
|
4234
|
+
style: E(i.value)
|
|
4235
|
+
}, null, 4),
|
|
4236
|
+
(a(!0), n(M, null, _(e.options, (y, x) => (a(), n("button", {
|
|
4237
|
+
key: y.value,
|
|
4238
|
+
type: "button",
|
|
4239
|
+
ref_for: !0,
|
|
4240
|
+
ref: (V) => {
|
|
4241
|
+
V && (r.value[x] = V);
|
|
4242
|
+
},
|
|
4243
|
+
class: f(["relative z-10 px-4 py-1.5 text-sm font-medium transition-colors duration-150 rounded-lg whitespace-nowrap min-w-[60px] text-center inline-flex items-center justify-center gap-1.5", [
|
|
4244
|
+
e.modelValue === y.value ? "text-slate-900" : "text-slate-600 hover:text-slate-900",
|
|
4245
|
+
e.disabled && "opacity-60 cursor-not-allowed"
|
|
4246
|
+
]]),
|
|
4247
|
+
disabled: e.disabled,
|
|
4248
|
+
onClick: (V) => p(y.value)
|
|
4249
|
+
}, [
|
|
4250
|
+
y.icon ? (a(), C(S, {
|
|
4251
|
+
key: 0,
|
|
4252
|
+
icon: y.icon,
|
|
4253
|
+
size: "xs",
|
|
4254
|
+
animation: v(y)
|
|
4255
|
+
}, null, 8, ["icon", "animation"])) : c("", !0),
|
|
4256
|
+
y.label ? (a(), n("span", Zn, b(y.label), 1)) : c("", !0),
|
|
4257
|
+
y.count !== void 0 && y.count !== null ? (a(), n("span", {
|
|
4258
|
+
key: 2,
|
|
4259
|
+
class: f(["inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-[11px] font-semibold rounded-full", e.modelValue === y.value ? "bg-slate-800 text-white" : "bg-slate-200 text-slate-700"])
|
|
4260
|
+
}, b(y.count), 3)) : c("", !0)
|
|
4261
|
+
], 10, Tn))), 128))
|
|
4262
|
+
])
|
|
4263
|
+
]));
|
|
4264
|
+
}
|
|
4265
|
+
}, Nn = ["onClick", "aria-expanded"], Pn = { class: "flex items-center gap-2" }, Fn = { class: "text-slate-900" }, Hn = { class: "overflow-hidden" }, Rn = { class: "pb-4 px-1 text-sm text-slate-600" }, mo = {
|
|
4266
|
+
__name: "DXAccordion",
|
|
4267
|
+
props: {
|
|
4268
|
+
/** Элементы: [{ title, content?, icon? }] */
|
|
4269
|
+
items: { type: Array, required: !0 },
|
|
4270
|
+
/** Разрешить несколько открытых */
|
|
4271
|
+
multiple: { type: Boolean, default: !1 },
|
|
4272
|
+
/** Изначально открытые индексы */
|
|
4273
|
+
defaultOpen: { type: Array, default: () => [] },
|
|
4274
|
+
/** Вариант: default | bordered | separated */
|
|
4275
|
+
variant: { type: String, default: "default" }
|
|
4276
|
+
},
|
|
4277
|
+
setup(e) {
|
|
4278
|
+
const t = e, l = D(new Set(t.defaultOpen)), s = (u) => l.value.has(u), r = (u) => {
|
|
4279
|
+
t.multiple ? (l.value.has(u) ? l.value.delete(u) : l.value.add(u), l.value = new Set(l.value)) : l.value.has(u) ? l.value = /* @__PURE__ */ new Set() : l.value = /* @__PURE__ */ new Set([u]);
|
|
4280
|
+
}, i = {
|
|
4281
|
+
default: "",
|
|
4282
|
+
bordered: "border border-slate-200 rounded-xl overflow-hidden",
|
|
4283
|
+
separated: "space-y-2"
|
|
4284
|
+
}, d = g(() => [
|
|
4285
|
+
i[t.variant] || i.default
|
|
4286
|
+
]);
|
|
4287
|
+
return (u, p) => (a(), n("div", {
|
|
4288
|
+
class: f(d.value),
|
|
4289
|
+
"data-component": "DXAccordion"
|
|
4290
|
+
}, [
|
|
4291
|
+
(a(!0), n(M, null, _(e.items, (v, m) => (a(), n("div", {
|
|
4292
|
+
key: m,
|
|
4293
|
+
class: "border-b border-slate-200 last:border-b-0"
|
|
4294
|
+
}, [
|
|
4295
|
+
o("button", {
|
|
4296
|
+
type: "button",
|
|
4297
|
+
class: f(["w-full flex items-center justify-between py-4 px-1 text-left transition-colors hover:bg-slate-50", { "font-semibold": s(m) }]),
|
|
4298
|
+
onClick: (h) => r(m),
|
|
4299
|
+
"aria-expanded": s(m)
|
|
4300
|
+
}, [
|
|
4301
|
+
o("span", Pn, [
|
|
4302
|
+
v.icon ? (a(), C(S, {
|
|
4303
|
+
key: 0,
|
|
4304
|
+
icon: v.icon,
|
|
4305
|
+
size: "md",
|
|
4306
|
+
animation: "none",
|
|
4307
|
+
class: "text-slate-500"
|
|
4308
|
+
}, null, 8, ["icon"])) : c("", !0),
|
|
4309
|
+
o("span", Fn, b(v.title), 1)
|
|
4310
|
+
]),
|
|
4311
|
+
A(S, {
|
|
4312
|
+
icon: O(le),
|
|
4313
|
+
size: "md",
|
|
4314
|
+
animation: "none",
|
|
4315
|
+
class: f(["text-slate-400 transition-transform duration-200", { "rotate-180": s(m) }])
|
|
4316
|
+
}, null, 8, ["icon", "class"])
|
|
4317
|
+
], 10, Nn),
|
|
4318
|
+
A(Y, {
|
|
4319
|
+
"enter-active-class": "transition-all duration-200 ease-out",
|
|
4320
|
+
"enter-from-class": "opacity-0 max-h-0",
|
|
4321
|
+
"enter-to-class": "opacity-100 max-h-96",
|
|
4322
|
+
"leave-active-class": "transition-all duration-200 ease-in",
|
|
4323
|
+
"leave-from-class": "opacity-100 max-h-96",
|
|
4324
|
+
"leave-to-class": "opacity-0 max-h-0"
|
|
4325
|
+
}, {
|
|
4326
|
+
default: P(() => [
|
|
4327
|
+
q(o("div", Hn, [
|
|
4328
|
+
o("div", Rn, [
|
|
4329
|
+
$(u.$slots, `item-${m}`, {}, () => [
|
|
4330
|
+
j(b(v.content), 1)
|
|
4331
|
+
])
|
|
4332
|
+
])
|
|
4333
|
+
], 512), [
|
|
4334
|
+
[fe, s(m)]
|
|
4335
|
+
])
|
|
4336
|
+
]),
|
|
4337
|
+
_: 2
|
|
4338
|
+
}, 1024)
|
|
4339
|
+
]))), 128))
|
|
4340
|
+
], 2));
|
|
4341
|
+
}
|
|
4342
|
+
}, qn = {
|
|
4343
|
+
key: 0,
|
|
4344
|
+
class: "absolute right-0 mt-2 w-56 bg-white border border-slate-200 rounded-2xl shadow-lg py-2 z-20"
|
|
4345
|
+
}, fo = {
|
|
4346
|
+
__name: "DXDropdown",
|
|
4347
|
+
setup(e) {
|
|
4348
|
+
const t = D(!1), l = D(null), s = () => t.value = !t.value, r = () => t.value = !1, i = (d) => {
|
|
4349
|
+
l.value && !l.value.contains(d.target) && r();
|
|
4350
|
+
};
|
|
4351
|
+
return U(() => document.addEventListener("click", i)), J(() => document.removeEventListener("click", i)), (d, u) => (a(), n("div", {
|
|
4352
|
+
class: "relative inline-block",
|
|
4353
|
+
ref_key: "root",
|
|
4354
|
+
ref: l,
|
|
4355
|
+
"data-component": "DXDropdown"
|
|
4356
|
+
}, [
|
|
4357
|
+
o("button", {
|
|
4358
|
+
type: "button",
|
|
4359
|
+
class: "dropdown-btn inline-flex items-center gap-2 px-3 py-2 rounded-xl border border-slate-200 text-sm font-semibold text-slate-700 hover:border-slate-300 transition",
|
|
4360
|
+
onClick: s
|
|
4361
|
+
}, [
|
|
4362
|
+
$(d.$slots, "trigger", {}, () => [
|
|
4363
|
+
u[0] || (u[0] = j("Меню", -1))
|
|
4364
|
+
]),
|
|
4365
|
+
A(S, {
|
|
4366
|
+
icon: O(le),
|
|
4367
|
+
size: "sm",
|
|
4368
|
+
animation: "wiggle",
|
|
4369
|
+
class: "text-slate-400"
|
|
4370
|
+
}, null, 8, ["icon"])
|
|
4371
|
+
]),
|
|
4372
|
+
t.value ? (a(), n("div", qn, [
|
|
4373
|
+
$(d.$slots, "default")
|
|
4374
|
+
])) : c("", !0)
|
|
4375
|
+
], 512));
|
|
4376
|
+
}
|
|
4377
|
+
}, En = {
|
|
4378
|
+
class: "bg-white border border-slate-100 rounded-3xl shadow-sm p-8 text-center space-y-3",
|
|
4379
|
+
"data-component": "DXEmptyState"
|
|
4380
|
+
}, Gn = { class: "text-base font-semibold text-slate-900" }, Un = {
|
|
4381
|
+
key: 0,
|
|
4382
|
+
class: "text-sm text-slate-600"
|
|
4383
|
+
}, Kn = {
|
|
4384
|
+
__name: "DXEmptyState",
|
|
4385
|
+
props: {
|
|
4386
|
+
/** Иконка (компонент) */
|
|
4387
|
+
icon: { type: Object, required: !0 },
|
|
4388
|
+
/** Заголовок */
|
|
4389
|
+
title: { type: String, required: !0 },
|
|
4390
|
+
/** Описание */
|
|
4391
|
+
description: { type: String, default: "" },
|
|
4392
|
+
/** Анимация иконки */
|
|
4393
|
+
animated: { type: Boolean, default: !1 }
|
|
4394
|
+
},
|
|
4395
|
+
setup(e) {
|
|
4396
|
+
return (t, l) => (a(), n("div", En, [
|
|
4397
|
+
(a(), C(L(e.icon), {
|
|
4398
|
+
class: f(["w-10 h-10 text-slate-500 mx-auto", e.animated && "animate-bounce-slow"])
|
|
4399
|
+
}, null, 8, ["class"])),
|
|
4400
|
+
o("p", Gn, b(e.title), 1),
|
|
4401
|
+
e.description ? (a(), n("p", Un, b(e.description), 1)) : c("", !0),
|
|
4402
|
+
$(t.$slots, "action", {}, void 0, !0)
|
|
4403
|
+
]));
|
|
4404
|
+
}
|
|
4405
|
+
}, po = /* @__PURE__ */ Z(Kn, [["__scopeId", "data-v-0d333d18"]]), Wn = ["data-variant"], Yn = { class: "flex items-center justify-between flex-shrink-0 mb-4 gap-4" }, Jn = { class: "text-lg font-semibold tracking-tight text-slate-900 flex-1" }, Qn = {
|
|
4406
|
+
key: 0,
|
|
4407
|
+
class: "flex items-center gap-1 rounded-xl border border-slate-200 bg-slate-50 p-1"
|
|
4408
|
+
}, es = ["title", "onClick"], ts = { class: "text-slate-700 overflow-y-auto flex-1 min-h-0" }, ls = {
|
|
4409
|
+
key: 0,
|
|
4410
|
+
class: "flex justify-end gap-2 flex-shrink-0 mt-4 pt-4 border-t border-slate-200"
|
|
4411
|
+
}, as = {
|
|
4412
|
+
__name: "DXModal",
|
|
4413
|
+
props: {
|
|
4414
|
+
/** Открыто/закрыто */
|
|
4415
|
+
open: { type: Boolean, default: !1 },
|
|
4416
|
+
/** Вариант: modal | fullscreen | sidebar-right | half-right */
|
|
4417
|
+
variant: { type: String, default: "modal" },
|
|
4418
|
+
/** Ширина (для modal): sm | md | lg | xl */
|
|
4419
|
+
width: { type: String, default: "md" },
|
|
4420
|
+
/** Можно ли закрыть */
|
|
4421
|
+
closable: { type: Boolean, default: !0 },
|
|
4422
|
+
/** Показывать переключатель режимов */
|
|
4423
|
+
showModeSwitcher: { type: Boolean, default: !1 }
|
|
4424
|
+
},
|
|
4425
|
+
emits: ["close", "opened", "closed", "update:variant"],
|
|
4426
|
+
setup(e, { emit: t }) {
|
|
4427
|
+
const l = e, s = t, r = [
|
|
4428
|
+
{ value: "modal", label: "Модальное окно", icon: it },
|
|
4429
|
+
{ value: "fullscreen", label: "На весь экран", icon: qe },
|
|
4430
|
+
{ value: "sidebar-right", label: "Боковая панель", icon: mt },
|
|
4431
|
+
{ value: "half-right", label: "Половина справа", icon: ot }
|
|
4432
|
+
], i = () => {
|
|
4433
|
+
l.closable && l.variant !== "half-right" && s("close");
|
|
4434
|
+
}, d = (h) => {
|
|
4435
|
+
s("update:variant", h);
|
|
4436
|
+
}, u = g(() => {
|
|
4437
|
+
switch (l.variant) {
|
|
4438
|
+
case "sidebar-right":
|
|
4439
|
+
case "half-right":
|
|
4440
|
+
return "slide-right";
|
|
4441
|
+
default:
|
|
4442
|
+
return "fade-scale";
|
|
4443
|
+
}
|
|
4444
|
+
}), p = g(() => {
|
|
4445
|
+
switch (l.variant) {
|
|
4446
|
+
case "fullscreen":
|
|
4447
|
+
return "fixed inset-0 z-50 bg-slate-900/40 backdrop-blur-sm flex items-center justify-center p-0";
|
|
4448
|
+
case "sidebar-right":
|
|
4449
|
+
return "fixed inset-0 z-50 bg-slate-900/40 backdrop-blur-sm flex items-end justify-end";
|
|
4450
|
+
case "half-right":
|
|
4451
|
+
return "fixed top-[73px] bottom-0 right-0 z-20 flex w-1/2 pointer-events-none";
|
|
4452
|
+
default:
|
|
4453
|
+
return "fixed inset-0 z-50 bg-slate-900/40 backdrop-blur-sm flex items-center justify-center px-4 py-4 overflow-y-auto";
|
|
4454
|
+
}
|
|
4455
|
+
}), v = g(() => {
|
|
4456
|
+
const h = "bg-white shadow-2xl flex flex-col";
|
|
4457
|
+
switch (l.variant) {
|
|
4458
|
+
case "fullscreen":
|
|
4459
|
+
return `${h} w-full h-full p-8`;
|
|
4460
|
+
case "sidebar-right":
|
|
4461
|
+
return `${h} h-full w-full max-w-md p-6 border-l border-slate-200`;
|
|
4462
|
+
case "half-right":
|
|
4463
|
+
return `${h} h-full w-full p-6 border-l border-slate-200 pointer-events-auto`;
|
|
4464
|
+
default:
|
|
4465
|
+
return `${h} rounded-2xl w-full max-h-[90vh] p-6 my-auto ${m.value}`;
|
|
4466
|
+
}
|
|
4467
|
+
}), m = g(() => {
|
|
4468
|
+
if (l.variant !== "modal") return "";
|
|
4469
|
+
switch (l.width) {
|
|
4470
|
+
case "sm":
|
|
4471
|
+
return "max-w-md";
|
|
4472
|
+
case "lg":
|
|
4473
|
+
return "max-w-3xl";
|
|
4474
|
+
case "xl":
|
|
4475
|
+
return "max-w-5xl";
|
|
4476
|
+
default:
|
|
4477
|
+
return "max-w-xl";
|
|
4478
|
+
}
|
|
4479
|
+
});
|
|
4480
|
+
return (h, y) => (a(), C(pe, { to: "body" }, [
|
|
4481
|
+
A(Y, {
|
|
4482
|
+
name: u.value,
|
|
4483
|
+
onAfterEnter: y[1] || (y[1] = (x) => h.$emit("opened")),
|
|
4484
|
+
onAfterLeave: y[2] || (y[2] = (x) => h.$emit("closed"))
|
|
4485
|
+
}, {
|
|
4486
|
+
default: P(() => [
|
|
4487
|
+
e.open ? (a(), n("div", {
|
|
4488
|
+
key: 0,
|
|
4489
|
+
class: f(p.value),
|
|
4490
|
+
onClick: N(i, ["self"]),
|
|
4491
|
+
"data-component": "DXModal",
|
|
4492
|
+
"data-variant": e.variant
|
|
4493
|
+
}, [
|
|
4494
|
+
o("div", {
|
|
4495
|
+
class: f(v.value)
|
|
4496
|
+
}, [
|
|
4497
|
+
o("div", Yn, [
|
|
4498
|
+
o("h3", Jn, [
|
|
4499
|
+
$(h.$slots, "title", {}, () => [
|
|
4500
|
+
y[3] || (y[3] = j("Диалог", -1))
|
|
4501
|
+
], !0)
|
|
4502
|
+
]),
|
|
4503
|
+
e.showModeSwitcher ? (a(), n("div", Qn, [
|
|
4504
|
+
(a(), n(M, null, _(r, (x) => o("button", {
|
|
4505
|
+
key: x.value,
|
|
4506
|
+
type: "button",
|
|
4507
|
+
class: f(["rounded-lg p-1.5 transition-colors", e.variant === x.value ? "bg-white text-slate-900 shadow-sm" : "text-slate-400 hover:text-slate-600 hover:bg-white/50"]),
|
|
4508
|
+
title: x.label,
|
|
4509
|
+
onClick: (V) => d(x.value)
|
|
4510
|
+
}, [
|
|
4511
|
+
(a(), C(L(x.icon), { class: "h-4 w-4" }))
|
|
4512
|
+
], 10, es)), 64))
|
|
4513
|
+
])) : c("", !0),
|
|
4514
|
+
e.closable ? (a(), C(ce, {
|
|
4515
|
+
key: 1,
|
|
4516
|
+
size: "md",
|
|
4517
|
+
variant: "default",
|
|
4518
|
+
onClick: y[0] || (y[0] = (x) => h.$emit("close"))
|
|
4519
|
+
})) : c("", !0)
|
|
4520
|
+
]),
|
|
4521
|
+
o("div", ts, [
|
|
4522
|
+
$(h.$slots, "default", {}, void 0, !0)
|
|
4523
|
+
]),
|
|
4524
|
+
h.$slots.actions ? (a(), n("div", ls, [
|
|
4525
|
+
$(h.$slots, "actions", {}, void 0, !0)
|
|
4526
|
+
])) : c("", !0)
|
|
4527
|
+
], 2)
|
|
4528
|
+
], 10, Wn)) : c("", !0)
|
|
4529
|
+
]),
|
|
4530
|
+
_: 3
|
|
4531
|
+
}, 8, ["name"])
|
|
4532
|
+
]));
|
|
4533
|
+
}
|
|
4534
|
+
}, go = /* @__PURE__ */ Z(as, [["__scopeId", "data-v-d02ee1db"]]), ns = {
|
|
4535
|
+
class: "border border-slate-200 rounded-2xl overflow-hidden",
|
|
4536
|
+
"data-component": "DXTable"
|
|
4537
|
+
}, ss = { class: "min-w-full divide-y divide-slate-200" }, os = { class: "bg-slate-50" }, rs = { class: "divide-y divide-slate-200 bg-white" }, vo = {
|
|
4538
|
+
__name: "DXTable",
|
|
4539
|
+
props: {
|
|
4540
|
+
/** Массив заголовков колонок */
|
|
4541
|
+
headers: { type: Array, default: () => [] }
|
|
4542
|
+
},
|
|
4543
|
+
setup(e) {
|
|
4544
|
+
return (t, l) => (a(), n("div", ns, [
|
|
4545
|
+
o("table", ss, [
|
|
4546
|
+
o("thead", os, [
|
|
4547
|
+
o("tr", null, [
|
|
4548
|
+
(a(!0), n(M, null, _(e.headers, (s) => (a(), n("th", {
|
|
4549
|
+
key: s,
|
|
4550
|
+
class: "px-4 py-3 text-left text-xs font-semibold text-slate-600 uppercase tracking-wide"
|
|
4551
|
+
}, b(s), 1))), 128))
|
|
4552
|
+
])
|
|
4553
|
+
]),
|
|
4554
|
+
o("tbody", rs, [
|
|
4555
|
+
$(t.$slots, "default")
|
|
4556
|
+
])
|
|
4557
|
+
])
|
|
4558
|
+
]));
|
|
4559
|
+
}
|
|
4560
|
+
}, is = {
|
|
4561
|
+
class: "flex flex-wrap gap-2",
|
|
4562
|
+
"data-component": "DXTabs"
|
|
4563
|
+
}, ds = ["onClick"], us = { class: "flex items-center gap-2" }, bo = {
|
|
4564
|
+
__name: "DXTabs",
|
|
4565
|
+
props: {
|
|
4566
|
+
/** Текущее значение (v-model) */
|
|
4567
|
+
modelValue: [String, Number],
|
|
4568
|
+
/** Табы: [{ value, label, icon?, count?, iconAnimation? }] */
|
|
4569
|
+
tabs: { type: Array, default: () => [] },
|
|
4570
|
+
/** Анимация иконок: none | wiggle | scale | rotate */
|
|
4571
|
+
iconAnimation: { type: String, default: "wiggle" },
|
|
4572
|
+
/** Анимировать только активную иконку */
|
|
4573
|
+
animateActiveOnly: { type: Boolean, default: !0 }
|
|
4574
|
+
},
|
|
4575
|
+
emits: ["update:modelValue"],
|
|
4576
|
+
setup(e) {
|
|
4577
|
+
const t = e, l = (s) => s.iconAnimation ? s.iconAnimation : t.animateActiveOnly ? t.modelValue === s.value ? t.iconAnimation : "none" : t.iconAnimation;
|
|
4578
|
+
return (s, r) => (a(), n("div", is, [
|
|
4579
|
+
(a(!0), n(M, null, _(e.tabs, (i) => (a(), n("button", {
|
|
4580
|
+
key: i.value,
|
|
4581
|
+
class: f(["tab-btn px-3 py-2 rounded-xl text-sm font-semibold border transition", e.modelValue === i.value ? "bg-slate-800 text-white border-slate-800" : "border-slate-200 text-slate-700 hover:border-slate-300"]),
|
|
4582
|
+
onClick: (d) => s.$emit("update:modelValue", i.value)
|
|
4583
|
+
}, [
|
|
4584
|
+
o("span", us, [
|
|
4585
|
+
i.icon ? (a(), C(S, {
|
|
4586
|
+
key: 0,
|
|
4587
|
+
icon: i.icon,
|
|
4588
|
+
size: "sm",
|
|
4589
|
+
animation: l(i)
|
|
4590
|
+
}, null, 8, ["icon", "animation"])) : c("", !0),
|
|
4591
|
+
o("span", null, b(i.label), 1),
|
|
4592
|
+
i.count !== void 0 ? (a(), n("span", {
|
|
4593
|
+
key: 1,
|
|
4594
|
+
class: f(["inline-flex items-center justify-center min-w-[24px] px-2 py-1 text-[11px] rounded-full", e.modelValue === i.value ? "bg-white/20 text-white" : "bg-slate-100 text-slate-700"])
|
|
4595
|
+
}, b(i.count), 3)) : c("", !0)
|
|
4596
|
+
])
|
|
4597
|
+
], 10, ds))), 128))
|
|
4598
|
+
]));
|
|
4599
|
+
}
|
|
4600
|
+
}, ho = {
|
|
4601
|
+
type: String,
|
|
4602
|
+
default: "md",
|
|
4603
|
+
validator: (e) => ["xs", "sm", "md", "lg", "xl"].includes(e)
|
|
4604
|
+
}, xo = {
|
|
4605
|
+
type: String,
|
|
4606
|
+
default: "info",
|
|
4607
|
+
validator: (e) => ["info", "success", "warning", "danger"].includes(e)
|
|
4608
|
+
}, yo = {
|
|
4609
|
+
type: String,
|
|
4610
|
+
default: "primary",
|
|
4611
|
+
validator: (e) => ["primary", "ghost", "danger", "success", "warning", "outline"].includes(e)
|
|
4612
|
+
}, wo = {
|
|
4613
|
+
type: String,
|
|
4614
|
+
default: "none",
|
|
4615
|
+
validator: (e) => ["none", "wiggle", "scale", "rotate"].includes(e)
|
|
4616
|
+
}, ko = {
|
|
4617
|
+
type: Boolean,
|
|
4618
|
+
default: !1
|
|
4619
|
+
}, $o = {
|
|
4620
|
+
type: String,
|
|
4621
|
+
default: ""
|
|
4622
|
+
}, Co = {
|
|
4623
|
+
type: String,
|
|
4624
|
+
default: ""
|
|
4625
|
+
}, So = {
|
|
4626
|
+
type: String,
|
|
4627
|
+
default: ""
|
|
4628
|
+
}, Vo = {
|
|
4629
|
+
type: String,
|
|
4630
|
+
default: ""
|
|
4631
|
+
}, se = {
|
|
4632
|
+
favorite: {
|
|
4633
|
+
activeIcon: Ve,
|
|
4634
|
+
inactiveIcon: tt,
|
|
4635
|
+
activeVariant: "danger",
|
|
4636
|
+
inactiveVariant: "ghost",
|
|
4637
|
+
iconAnimation: "scale"
|
|
4638
|
+
},
|
|
4639
|
+
bookmark: {
|
|
4640
|
+
activeIcon: $e,
|
|
4641
|
+
inactiveIcon: Ge,
|
|
4642
|
+
activeVariant: "warning",
|
|
4643
|
+
inactiveVariant: "ghost",
|
|
4644
|
+
iconAnimation: "scale"
|
|
4645
|
+
},
|
|
4646
|
+
star: {
|
|
4647
|
+
activeIcon: Ie,
|
|
4648
|
+
inactiveIcon: dt,
|
|
4649
|
+
activeVariant: "warning",
|
|
4650
|
+
inactiveVariant: "ghost",
|
|
4651
|
+
iconAnimation: "scale"
|
|
4652
|
+
},
|
|
4653
|
+
notifications: {
|
|
4654
|
+
activeIcon: ke,
|
|
4655
|
+
inactiveIcon: Ee,
|
|
4656
|
+
activeVariant: "primary",
|
|
4657
|
+
inactiveVariant: "ghost",
|
|
4658
|
+
iconAnimation: "wiggle"
|
|
4659
|
+
},
|
|
4660
|
+
visibility: {
|
|
4661
|
+
activeIcon: ae,
|
|
4662
|
+
inactiveIcon: Se,
|
|
4663
|
+
activeLabel: "Visible",
|
|
4664
|
+
inactiveLabel: "Hidden",
|
|
4665
|
+
activeVariant: "success",
|
|
4666
|
+
inactiveVariant: "ghost",
|
|
4667
|
+
iconAnimation: "scale"
|
|
4668
|
+
},
|
|
4669
|
+
lock: {
|
|
4670
|
+
activeIcon: De,
|
|
4671
|
+
inactiveIcon: lt,
|
|
4672
|
+
activeLabel: "Locked",
|
|
4673
|
+
inactiveLabel: "Unlocked",
|
|
4674
|
+
activeVariant: "danger",
|
|
4675
|
+
inactiveVariant: "success",
|
|
4676
|
+
iconAnimation: "rotate"
|
|
4677
|
+
},
|
|
4678
|
+
theme: {
|
|
4679
|
+
activeIcon: ze,
|
|
4680
|
+
inactiveIcon: ut,
|
|
4681
|
+
activeLabel: "Dark",
|
|
4682
|
+
inactiveLabel: "Light",
|
|
4683
|
+
activeVariant: "primary",
|
|
4684
|
+
inactiveVariant: "warning",
|
|
4685
|
+
iconAnimation: "rotate"
|
|
4686
|
+
},
|
|
4687
|
+
sound: {
|
|
4688
|
+
activeIcon: Xe,
|
|
4689
|
+
inactiveIcon: rt,
|
|
4690
|
+
activeVariant: "danger",
|
|
4691
|
+
inactiveVariant: "primary",
|
|
4692
|
+
iconAnimation: "scale"
|
|
4693
|
+
},
|
|
4694
|
+
playPause: {
|
|
4695
|
+
activeIcon: Be,
|
|
4696
|
+
inactiveIcon: nt,
|
|
4697
|
+
activeLabel: "Pause",
|
|
4698
|
+
inactiveLabel: "Play",
|
|
4699
|
+
activeVariant: "warning",
|
|
4700
|
+
inactiveVariant: "success",
|
|
4701
|
+
iconAnimation: "scale"
|
|
4702
|
+
}
|
|
4703
|
+
};
|
|
4704
|
+
function Do(e) {
|
|
4705
|
+
return se[e] || se.favorite;
|
|
4706
|
+
}
|
|
4707
|
+
export {
|
|
4708
|
+
mo as DXAccordion,
|
|
4709
|
+
Gs as DXActionButtons,
|
|
4710
|
+
Us as DXAlert,
|
|
4711
|
+
Cs as DXAvatar,
|
|
4712
|
+
Ss as DXBadge,
|
|
4713
|
+
vs as DXBlockquote,
|
|
4714
|
+
$s as DXBox,
|
|
4715
|
+
Ks as DXBreadcrumb,
|
|
4716
|
+
Vs as DXButton,
|
|
4717
|
+
Ws as DXButtonGroup,
|
|
4718
|
+
Ds as DXCard,
|
|
4719
|
+
zs as DXCheckbox,
|
|
4720
|
+
ce as DXCloseButton,
|
|
4721
|
+
gs as DXCode,
|
|
4722
|
+
Ys as DXComboBox,
|
|
4723
|
+
hs as DXContainer,
|
|
4724
|
+
Js as DXCopyField,
|
|
4725
|
+
Qs as DXDatePicker,
|
|
4726
|
+
Bs as DXDivider,
|
|
4727
|
+
fo as DXDropdown,
|
|
4728
|
+
Xs as DXDropdownItem,
|
|
4729
|
+
po as DXEmptyState,
|
|
4730
|
+
eo as DXFileUpload,
|
|
4731
|
+
to as DXFilterGroup,
|
|
4732
|
+
ys as DXFlex,
|
|
4733
|
+
lo as DXFormControl,
|
|
4734
|
+
xs as DXGrid,
|
|
4735
|
+
ms as DXHeading,
|
|
4736
|
+
S as DXIcon,
|
|
4737
|
+
Is as DXInput,
|
|
4738
|
+
As as DXInputAddon,
|
|
4739
|
+
ao as DXInputGroup,
|
|
4740
|
+
no as DXInputMask,
|
|
4741
|
+
ps as DXLabel,
|
|
4742
|
+
bs as DXList,
|
|
4743
|
+
js as DXLoader,
|
|
4744
|
+
go as DXModal,
|
|
4745
|
+
so as DXPagination,
|
|
4746
|
+
oo as DXPasswordInput,
|
|
4747
|
+
Ms as DXProgress,
|
|
4748
|
+
Ls as DXRadio,
|
|
4749
|
+
ro as DXRadioCard,
|
|
4750
|
+
io as DXRadioGroup,
|
|
4751
|
+
uo as DXSearchSelect,
|
|
4752
|
+
co as DXSegmentedControl,
|
|
4753
|
+
_s as DXSelect,
|
|
4754
|
+
Os as DXSkeleton,
|
|
4755
|
+
Ts as DXSlider,
|
|
4756
|
+
ks as DXSpacer,
|
|
4757
|
+
ws as DXStack,
|
|
4758
|
+
vo as DXTable,
|
|
4759
|
+
bo as DXTabs,
|
|
4760
|
+
Zs as DXTags,
|
|
4761
|
+
fs as DXText,
|
|
4762
|
+
Ns as DXTextarea,
|
|
4763
|
+
Hs as DXToast,
|
|
4764
|
+
Rs as DXToggle,
|
|
4765
|
+
qs as DXToggleButton,
|
|
4766
|
+
Es as DXTooltip,
|
|
4767
|
+
ne as DXValidationIcon,
|
|
4768
|
+
se as TOGGLE_PRESETS,
|
|
4769
|
+
F as VARIANT_CONFIGS,
|
|
4770
|
+
yo as buttonVariantProp,
|
|
4771
|
+
ko as disabledProp,
|
|
4772
|
+
So as errorProp,
|
|
4773
|
+
Vo as helperProp,
|
|
4774
|
+
wo as iconAnimationProp,
|
|
4775
|
+
$o as labelProp,
|
|
4776
|
+
Co as placeholderProp,
|
|
4777
|
+
ho as sizeProp,
|
|
4778
|
+
me as useComponentSize,
|
|
4779
|
+
Do as useTogglePreset,
|
|
4780
|
+
Ps as useVariantClasses,
|
|
4781
|
+
hl as useVariantConfig,
|
|
4782
|
+
Fs as useVariantIcon,
|
|
4783
|
+
xo as variantProp
|
|
4784
|
+
};
|