@efficiency-point/design-system 0.0.33 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -220,77 +220,77 @@ var T = {
|
|
|
220
220
|
let n = new Date(r);
|
|
221
221
|
return n.setDate(r.getDate() + t), n;
|
|
222
222
|
});
|
|
223
|
-
},
|
|
223
|
+
}, z = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), B = (e, t, n) => {
|
|
224
224
|
let r = P(e).getTime();
|
|
225
225
|
return !!(t && r < P(t).getTime() || n && r > P(n).getTime());
|
|
226
|
-
},
|
|
227
|
-
let k = c(), N = w ?? `ds-date-time-${T ?? k}`, P = g ? `${N}-hint` : void 0,
|
|
226
|
+
}, V = 8, ee = 6, H = ({ value: r, onChange: i, mode: a = "date", label: m, placeholder: h, hint: g, error: _, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: w, name: T, className: O = "" }) => {
|
|
227
|
+
let k = c(), N = w ?? `ds-date-time-${T ?? k}`, P = g ? `${N}-hint` : void 0, H = _ ? `${N}-error` : void 0, U = d(null), W = d(null), te = d(null), [G, ne] = f(!1), [K, q] = f(r ?? /* @__PURE__ */ new Date()), [re, ie] = f(F(r, "time")), [J, ae] = f(null), oe = u(() => R(K), [K]), se = a !== "time", ce = a !== "date";
|
|
228
228
|
s(() => {
|
|
229
|
-
r &&
|
|
229
|
+
r && q(r), ie(F(r, "time"));
|
|
230
230
|
}, [r]);
|
|
231
|
-
let
|
|
232
|
-
let e =
|
|
231
|
+
let le = o(() => {
|
|
232
|
+
let e = W.current, t = te.current;
|
|
233
233
|
if (!e || !t) return;
|
|
234
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom -
|
|
235
|
-
|
|
234
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - V, o = n.top - V, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(V, n.top - r.height - ee) : n.bottom + ee, u = n.left, d = i - r.width - V;
|
|
235
|
+
ae({
|
|
236
236
|
top: l,
|
|
237
|
-
left: Math.max(
|
|
237
|
+
left: Math.max(V, Math.min(u, d)),
|
|
238
238
|
maxHeight: c
|
|
239
239
|
});
|
|
240
240
|
}, []);
|
|
241
241
|
l(() => {
|
|
242
|
-
if (!
|
|
243
|
-
|
|
242
|
+
if (!G) {
|
|
243
|
+
ae(null);
|
|
244
244
|
return;
|
|
245
245
|
}
|
|
246
|
-
return
|
|
247
|
-
window.removeEventListener("resize",
|
|
246
|
+
return le(), window.addEventListener("resize", le), window.addEventListener("scroll", le, !0), () => {
|
|
247
|
+
window.removeEventListener("resize", le), window.removeEventListener("scroll", le, !0);
|
|
248
248
|
};
|
|
249
249
|
}, [
|
|
250
|
-
U,
|
|
251
|
-
J,
|
|
252
250
|
G,
|
|
253
|
-
|
|
251
|
+
le,
|
|
252
|
+
K,
|
|
253
|
+
re
|
|
254
254
|
]), s(() => {
|
|
255
|
-
if (!
|
|
255
|
+
if (!G) return;
|
|
256
256
|
let e = (e) => {
|
|
257
|
-
let t = e.target, n =
|
|
258
|
-
!n && !r &&
|
|
257
|
+
let t = e.target, n = U.current?.contains(t), r = te.current?.contains(t);
|
|
258
|
+
!n && !r && ne(!1);
|
|
259
259
|
}, t = (e) => {
|
|
260
|
-
e.key === "Escape" && (
|
|
260
|
+
e.key === "Escape" && (ne(!1), W.current?.focus());
|
|
261
261
|
};
|
|
262
262
|
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
263
263
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
264
264
|
};
|
|
265
|
-
}, [
|
|
265
|
+
}, [G]);
|
|
266
266
|
let ue = (e) => {
|
|
267
|
-
if (
|
|
267
|
+
if (B(e, x, S)) return;
|
|
268
268
|
let t = new Date(e);
|
|
269
|
-
t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" &&
|
|
270
|
-
},
|
|
271
|
-
if (
|
|
269
|
+
t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && ne(!1);
|
|
270
|
+
}, Y = (e) => {
|
|
271
|
+
if (ie(e), !e) {
|
|
272
272
|
i?.(null);
|
|
273
273
|
return;
|
|
274
274
|
}
|
|
275
275
|
let t = I(e, "time");
|
|
276
276
|
if (!t) return;
|
|
277
|
-
let n = new Date(a === "datetime" ? r ??
|
|
277
|
+
let n = new Date(a === "datetime" ? r ?? K : /* @__PURE__ */ new Date());
|
|
278
278
|
n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
|
|
279
|
-
},
|
|
280
|
-
ref:
|
|
279
|
+
}, de = h ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), fe = [P, H].filter(Boolean).join(" ") || void 0, pe = G && !y ? /* @__PURE__ */ n("div", {
|
|
280
|
+
ref: te,
|
|
281
281
|
className: A.panel,
|
|
282
282
|
role: "dialog",
|
|
283
|
-
"aria-label": m ??
|
|
284
|
-
style:
|
|
285
|
-
top:
|
|
286
|
-
left:
|
|
287
|
-
maxHeight:
|
|
283
|
+
"aria-label": m ?? de,
|
|
284
|
+
style: J ? {
|
|
285
|
+
top: J.top,
|
|
286
|
+
left: J.left,
|
|
287
|
+
maxHeight: J.maxHeight
|
|
288
288
|
} : {
|
|
289
289
|
visibility: "hidden",
|
|
290
290
|
top: 0,
|
|
291
291
|
left: 0
|
|
292
292
|
},
|
|
293
|
-
children: [
|
|
293
|
+
children: [se && /* @__PURE__ */ n(e, { children: [
|
|
294
294
|
/* @__PURE__ */ n("div", {
|
|
295
295
|
className: A.calendarHeader,
|
|
296
296
|
children: [
|
|
@@ -298,14 +298,14 @@ var T = {
|
|
|
298
298
|
type: "button",
|
|
299
299
|
className: A.nav,
|
|
300
300
|
"aria-label": "Предыдущий месяц",
|
|
301
|
-
onClick: () =>
|
|
301
|
+
onClick: () => q(new Date(K.getFullYear(), K.getMonth() - 1, 1)),
|
|
302
302
|
children: "‹"
|
|
303
303
|
}),
|
|
304
304
|
/* @__PURE__ */ t("select", {
|
|
305
305
|
className: A.monthSelect,
|
|
306
306
|
"aria-label": "Месяц",
|
|
307
|
-
value:
|
|
308
|
-
onChange: (e) =>
|
|
307
|
+
value: K.getMonth(),
|
|
308
|
+
onChange: (e) => q(new Date(K.getFullYear(), Number(e.target.value), 1)),
|
|
309
309
|
children: M.map((e, n) => /* @__PURE__ */ t("option", {
|
|
310
310
|
value: n,
|
|
311
311
|
children: e
|
|
@@ -315,14 +315,14 @@ var T = {
|
|
|
315
315
|
className: A.yearInput,
|
|
316
316
|
type: "number",
|
|
317
317
|
"aria-label": "Год",
|
|
318
|
-
value:
|
|
319
|
-
onChange: (e) =>
|
|
318
|
+
value: K.getFullYear(),
|
|
319
|
+
onChange: (e) => q(new Date(Number(e.target.value), K.getMonth(), 1))
|
|
320
320
|
}),
|
|
321
321
|
/* @__PURE__ */ t("button", {
|
|
322
322
|
type: "button",
|
|
323
323
|
className: A.nav,
|
|
324
324
|
"aria-label": "Следующий месяц",
|
|
325
|
-
onClick: () =>
|
|
325
|
+
onClick: () => q(new Date(K.getFullYear(), K.getMonth() + 1, 1)),
|
|
326
326
|
children: "›"
|
|
327
327
|
})
|
|
328
328
|
]
|
|
@@ -333,30 +333,30 @@ var T = {
|
|
|
333
333
|
}),
|
|
334
334
|
/* @__PURE__ */ t("div", {
|
|
335
335
|
className: A.days,
|
|
336
|
-
children:
|
|
337
|
-
let n =
|
|
336
|
+
children: oe.map((e) => {
|
|
337
|
+
let n = z(r, e);
|
|
338
338
|
return /* @__PURE__ */ t("button", {
|
|
339
339
|
type: "button",
|
|
340
|
-
className: `${A.day} ${e.getMonth() ===
|
|
341
|
-
disabled:
|
|
340
|
+
className: `${A.day} ${e.getMonth() === K.getMonth() ? "" : A.outside} ${n ? A.selected : ""}`,
|
|
341
|
+
disabled: B(e, x, S),
|
|
342
342
|
"aria-pressed": n,
|
|
343
343
|
onClick: () => ue(e),
|
|
344
344
|
children: e.getDate()
|
|
345
345
|
}, e.toISOString());
|
|
346
346
|
})
|
|
347
347
|
})
|
|
348
|
-
] }),
|
|
348
|
+
] }), ce && /* @__PURE__ */ n("label", {
|
|
349
349
|
className: A.timeLabel,
|
|
350
350
|
children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
|
|
351
351
|
className: A.timeInput,
|
|
352
352
|
type: "time",
|
|
353
|
-
value:
|
|
354
|
-
onChange: (e) =>
|
|
353
|
+
value: re,
|
|
354
|
+
onChange: (e) => Y(e.target.value)
|
|
355
355
|
})]
|
|
356
356
|
})]
|
|
357
357
|
}) : null;
|
|
358
358
|
return /* @__PURE__ */ n("div", {
|
|
359
|
-
ref:
|
|
359
|
+
ref: U,
|
|
360
360
|
className: `${A.wrapper} ${O}`,
|
|
361
361
|
children: [
|
|
362
362
|
m && /* @__PURE__ */ t(E, {
|
|
@@ -366,24 +366,24 @@ var T = {
|
|
|
366
366
|
children: m
|
|
367
367
|
}),
|
|
368
368
|
/* @__PURE__ */ n("button", {
|
|
369
|
-
ref:
|
|
369
|
+
ref: W,
|
|
370
370
|
id: N,
|
|
371
371
|
name: T,
|
|
372
372
|
type: "button",
|
|
373
373
|
className: `${A.trigger} ${A[C]} ${_ ? A.error : ""}`,
|
|
374
374
|
disabled: v,
|
|
375
375
|
"aria-readonly": y || void 0,
|
|
376
|
-
"aria-expanded":
|
|
376
|
+
"aria-expanded": G,
|
|
377
377
|
"aria-haspopup": "dialog",
|
|
378
|
-
"aria-describedby":
|
|
378
|
+
"aria-describedby": fe,
|
|
379
379
|
onClick: () => {
|
|
380
|
-
y ||
|
|
380
|
+
y || ne((e) => !e);
|
|
381
381
|
},
|
|
382
382
|
children: [/* @__PURE__ */ t("span", {
|
|
383
383
|
className: r ? A.value : A.placeholder,
|
|
384
|
-
children: L(r, a) ||
|
|
384
|
+
children: L(r, a) || de
|
|
385
385
|
}), /* @__PURE__ */ t("span", {
|
|
386
|
-
className: [A.chevron,
|
|
386
|
+
className: [A.chevron, pe ? A.chevronOpen : ""].filter(Boolean).join(" "),
|
|
387
387
|
"aria-hidden": "true",
|
|
388
388
|
children: /* @__PURE__ */ t("svg", {
|
|
389
389
|
viewBox: "0 0 20 20",
|
|
@@ -398,32 +398,32 @@ var T = {
|
|
|
398
398
|
})
|
|
399
399
|
})]
|
|
400
400
|
}),
|
|
401
|
-
|
|
401
|
+
pe && p(pe, document.body),
|
|
402
402
|
g && !_ && /* @__PURE__ */ t(D, {
|
|
403
403
|
id: P,
|
|
404
404
|
children: g
|
|
405
405
|
}),
|
|
406
406
|
_ && /* @__PURE__ */ t(D, {
|
|
407
|
-
id:
|
|
407
|
+
id: H,
|
|
408
408
|
variant: "error",
|
|
409
409
|
children: _
|
|
410
410
|
})
|
|
411
411
|
]
|
|
412
412
|
});
|
|
413
|
-
},
|
|
413
|
+
}, U = {
|
|
414
414
|
root: "_root_1q42e_1",
|
|
415
415
|
legend: "_legend_1q42e_3",
|
|
416
416
|
range: "_range_1q42e_5"
|
|
417
|
-
},
|
|
417
|
+
}, W = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), te = ({ value: e, onChange: r, onDraftChange: i, mode: a = "date", fromLabel: o = "От", toLabel: s = "До", hint: c, error: l, min: u, max: d, disabled: f = !1, readOnly: p = !1, required: m = !1, className: h = "" }) => {
|
|
418
418
|
let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
|
|
419
|
-
i?.(e),
|
|
419
|
+
i?.(e), W(e) && r?.(e);
|
|
420
420
|
};
|
|
421
421
|
return /* @__PURE__ */ n("fieldset", {
|
|
422
|
-
className: `${
|
|
422
|
+
className: `${U.root} ${h}`,
|
|
423
423
|
disabled: f,
|
|
424
424
|
children: [/* @__PURE__ */ n("div", {
|
|
425
|
-
className:
|
|
426
|
-
children: [/* @__PURE__ */ t(
|
|
425
|
+
className: U.range,
|
|
426
|
+
children: [/* @__PURE__ */ t(H, {
|
|
427
427
|
value: e.from,
|
|
428
428
|
mode: a === "datetime" ? "datetime" : a,
|
|
429
429
|
label: o,
|
|
@@ -437,7 +437,7 @@ var T = {
|
|
|
437
437
|
...e,
|
|
438
438
|
from: t
|
|
439
439
|
})
|
|
440
|
-
}), /* @__PURE__ */ t(
|
|
440
|
+
}), /* @__PURE__ */ t(H, {
|
|
441
441
|
value: e.to,
|
|
442
442
|
mode: a === "datetime" ? "datetime" : a,
|
|
443
443
|
label: s,
|
|
@@ -454,7 +454,7 @@ var T = {
|
|
|
454
454
|
})]
|
|
455
455
|
}), c && !g && /* @__PURE__ */ t(D, { children: c })]
|
|
456
456
|
});
|
|
457
|
-
},
|
|
457
|
+
}, G = {
|
|
458
458
|
group: "_group_1fs9e_1",
|
|
459
459
|
skeleton: "_skeleton_1fs9e_3",
|
|
460
460
|
text: "_text_1fs9e_5",
|
|
@@ -462,54 +462,54 @@ var T = {
|
|
|
462
462
|
circular: "_circular_1fs9e_9",
|
|
463
463
|
animated: "_animated_1fs9e_11",
|
|
464
464
|
"ds-skeleton": "_ds-skeleton_1fs9e_1"
|
|
465
|
-
},
|
|
466
|
-
className: `${
|
|
465
|
+
}, ne = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
|
|
466
|
+
className: `${G.group} ${o}`,
|
|
467
467
|
"aria-hidden": "true",
|
|
468
468
|
children: Array.from({ length: Math.max(1, i) }, (o, s) => /* @__PURE__ */ t("span", {
|
|
469
|
-
className: `${
|
|
469
|
+
className: `${G.skeleton} ${G[e]} ${a ? G.animated : ""}`,
|
|
470
470
|
style: {
|
|
471
471
|
width: s === i - 1 && i > 1 ? "70%" : n,
|
|
472
472
|
height: r
|
|
473
473
|
}
|
|
474
474
|
}, s))
|
|
475
|
-
}),
|
|
476
|
-
wrapper: "
|
|
477
|
-
label: "
|
|
478
|
-
container: "
|
|
479
|
-
trigger: "
|
|
480
|
-
disabledText: "
|
|
481
|
-
sm: "
|
|
482
|
-
md: "
|
|
483
|
-
lg: "
|
|
484
|
-
value: "
|
|
485
|
-
placeholder: "
|
|
486
|
-
chevron: "
|
|
487
|
-
chevronOpen: "
|
|
488
|
-
menu: "
|
|
489
|
-
option: "
|
|
490
|
-
selected: "
|
|
491
|
-
message: "
|
|
492
|
-
error: "
|
|
493
|
-
errorState: "
|
|
494
|
-
},
|
|
475
|
+
}), K = {
|
|
476
|
+
wrapper: "_wrapper_1f1hc_1",
|
|
477
|
+
label: "_label_1f1hc_17",
|
|
478
|
+
container: "_container_1f1hc_29",
|
|
479
|
+
trigger: "_trigger_1f1hc_37",
|
|
480
|
+
disabledText: "_disabledText_1f1hc_39",
|
|
481
|
+
sm: "_sm_1f1hc_61",
|
|
482
|
+
md: "_md_1f1hc_71",
|
|
483
|
+
lg: "_lg_1f1hc_81",
|
|
484
|
+
value: "_value_1f1hc_141",
|
|
485
|
+
placeholder: "_placeholder_1f1hc_143",
|
|
486
|
+
chevron: "_chevron_1f1hc_195",
|
|
487
|
+
chevronOpen: "_chevronOpen_1f1hc_221",
|
|
488
|
+
menu: "_menu_1f1hc_229",
|
|
489
|
+
option: "_option_1f1hc_259",
|
|
490
|
+
selected: "_selected_1f1hc_329",
|
|
491
|
+
message: "_message_1f1hc_349",
|
|
492
|
+
error: "_error_1f1hc_351",
|
|
493
|
+
errorState: "_errorState_1f1hc_377"
|
|
494
|
+
}, q = 8, re = 6, ie = 120, J = (e, t, n) => {
|
|
495
495
|
if (!e.length) return -1;
|
|
496
496
|
for (let r = 0; r < e.length; r += 1) {
|
|
497
497
|
let i = (t + r * n + e.length) % e.length;
|
|
498
498
|
if (!e[i]?.disabled) return i;
|
|
499
499
|
}
|
|
500
500
|
return -1;
|
|
501
|
-
},
|
|
501
|
+
}, ae = (e) => {
|
|
502
502
|
if (typeof e == "number") return e;
|
|
503
503
|
if (typeof e == "string") {
|
|
504
504
|
let t = Number.parseFloat(e);
|
|
505
505
|
if (Number.isFinite(t)) return t;
|
|
506
506
|
}
|
|
507
507
|
return Infinity;
|
|
508
|
-
},
|
|
509
|
-
let D = c(), O = C ?? `ds-dropdown-${S ?? D}`, k = `${O}-listbox`, [A, j] = f(!1), [M, N] = f(null), P = d(null), F = d(null), I = d(null), L = d([]), R = u(() => e.find((e) => e.value === r), [e, r]),
|
|
508
|
+
}, oe = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: m = !1, stringWhileDisabled: h = !1, label: g, error: _, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: w = !0, maxMenuHeight: T }) => {
|
|
509
|
+
let D = c(), O = C ?? `ds-dropdown-${S ?? D}`, k = `${O}-listbox`, [A, j] = f(!1), [M, N] = f(null), P = d(null), F = d(null), I = d(null), L = d([]), R = u(() => e.find((e) => e.value === r), [e, r]), z = y ? `${O}-hint` : void 0, B = _ ? `${O}-error` : void 0, V = [z, B].filter(Boolean).join(" ") || void 0, ee = m && h, H = o(() => {
|
|
510
510
|
let e = F.current, t = I.current;
|
|
511
511
|
if (!e || !t) return;
|
|
512
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom -
|
|
512
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - q, o = n.top - q, s = a < r.height && o > a, c = Math.max(ie, s ? o : a), l = ae(T), u = Math.min(c, l), d = n.left, f = i - n.width - q, p = Math.max(q, Math.min(d, f)), m = s ? Math.max(q, n.top - r.height - re) : n.bottom + re;
|
|
513
513
|
N({
|
|
514
514
|
top: m,
|
|
515
515
|
left: p,
|
|
@@ -522,12 +522,12 @@ var T = {
|
|
|
522
522
|
N(null);
|
|
523
523
|
return;
|
|
524
524
|
}
|
|
525
|
-
return
|
|
526
|
-
window.removeEventListener("resize",
|
|
525
|
+
return H(), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
|
|
526
|
+
window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
|
|
527
527
|
};
|
|
528
528
|
}, [
|
|
529
529
|
A,
|
|
530
|
-
|
|
530
|
+
H,
|
|
531
531
|
e.length
|
|
532
532
|
]), s(() => {
|
|
533
533
|
if (!A) return;
|
|
@@ -541,17 +541,17 @@ var T = {
|
|
|
541
541
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
542
542
|
};
|
|
543
543
|
}, [A]);
|
|
544
|
-
let
|
|
545
|
-
let r =
|
|
544
|
+
let U = (t, n) => {
|
|
545
|
+
let r = J(e, t, n);
|
|
546
546
|
if (r === -1) return;
|
|
547
547
|
let i = L.current[r];
|
|
548
548
|
i?.focus(), i?.scrollIntoView({ block: "nearest" });
|
|
549
|
-
},
|
|
549
|
+
}, W = (e) => {
|
|
550
550
|
e.disabled || (i?.(e.value, e), j(!1), F.current?.focus());
|
|
551
|
-
},
|
|
551
|
+
}, te = A ? /* @__PURE__ */ t("ul", {
|
|
552
552
|
ref: I,
|
|
553
553
|
id: k,
|
|
554
|
-
className:
|
|
554
|
+
className: K.menu,
|
|
555
555
|
role: "listbox",
|
|
556
556
|
"aria-label": g,
|
|
557
557
|
style: M ? {
|
|
@@ -580,23 +580,23 @@ var T = {
|
|
|
580
580
|
"aria-selected": o,
|
|
581
581
|
disabled: i.disabled,
|
|
582
582
|
className: [
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
o ?
|
|
583
|
+
K[v],
|
|
584
|
+
K.option,
|
|
585
|
+
o ? K.selected : ""
|
|
586
586
|
].filter(Boolean).join(" "),
|
|
587
|
-
onClick: () =>
|
|
587
|
+
onClick: () => W(i),
|
|
588
588
|
onKeyDown: (t) => {
|
|
589
589
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
590
590
|
t.preventDefault();
|
|
591
591
|
let e = t.key === "ArrowDown" ? 1 : -1;
|
|
592
|
-
|
|
592
|
+
U(a + e, e);
|
|
593
593
|
}
|
|
594
594
|
if (t.key === "Tab" && j(!1), t.key === "Home" || t.key === "End") {
|
|
595
595
|
t.preventDefault();
|
|
596
596
|
let n = t.key === "Home" ? 1 : -1;
|
|
597
|
-
|
|
597
|
+
U(t.key === "Home" ? 0 : e.length - 1, n);
|
|
598
598
|
}
|
|
599
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
599
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), W(i));
|
|
600
600
|
},
|
|
601
601
|
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t("span", {
|
|
602
602
|
"aria-hidden": "true",
|
|
@@ -609,35 +609,35 @@ var T = {
|
|
|
609
609
|
return /* @__PURE__ */ n("div", {
|
|
610
610
|
ref: P,
|
|
611
611
|
className: [
|
|
612
|
-
|
|
613
|
-
_ ?
|
|
612
|
+
K.wrapper,
|
|
613
|
+
_ ? K.errorState : "",
|
|
614
614
|
b
|
|
615
615
|
].filter(Boolean).join(" "),
|
|
616
616
|
children: [
|
|
617
617
|
g && /* @__PURE__ */ t(E, {
|
|
618
618
|
required: x,
|
|
619
619
|
disabled: m,
|
|
620
|
-
htmlFor:
|
|
620
|
+
htmlFor: ee ? void 0 : O,
|
|
621
621
|
children: g
|
|
622
622
|
}),
|
|
623
623
|
/* @__PURE__ */ t("div", {
|
|
624
|
-
className:
|
|
625
|
-
children:
|
|
624
|
+
className: K.container,
|
|
625
|
+
children: ee ? /* @__PURE__ */ t("div", {
|
|
626
626
|
id: O,
|
|
627
|
-
className:
|
|
628
|
-
"aria-describedby":
|
|
627
|
+
className: K.disabledText,
|
|
628
|
+
"aria-describedby": V,
|
|
629
629
|
children: R?.label ?? a
|
|
630
630
|
}) : /* @__PURE__ */ n("button", {
|
|
631
631
|
ref: F,
|
|
632
632
|
id: O,
|
|
633
633
|
type: "button",
|
|
634
634
|
name: S,
|
|
635
|
-
className: `${
|
|
635
|
+
className: `${K.trigger} ${K[v]}`,
|
|
636
636
|
disabled: m,
|
|
637
637
|
"aria-haspopup": "listbox",
|
|
638
638
|
"aria-expanded": A,
|
|
639
639
|
"aria-controls": k,
|
|
640
|
-
"aria-describedby":
|
|
640
|
+
"aria-describedby": V,
|
|
641
641
|
"aria-invalid": !!_,
|
|
642
642
|
onClick: () => j((e) => !e),
|
|
643
643
|
onKeyDown: (t) => {
|
|
@@ -645,21 +645,21 @@ var T = {
|
|
|
645
645
|
t.preventDefault(), j(!0);
|
|
646
646
|
let n = t.key === "ArrowDown" ? 1 : -1;
|
|
647
647
|
requestAnimationFrame(() => {
|
|
648
|
-
|
|
648
|
+
U(t.key === "ArrowDown" ? 0 : e.length - 1, n);
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
651
|
if (t.key === "Enter" && A) {
|
|
652
652
|
t.preventDefault();
|
|
653
653
|
let n = e.findIndex((e) => e.value === r);
|
|
654
|
-
|
|
654
|
+
U(n >= 0 ? n : 0, 1);
|
|
655
655
|
}
|
|
656
656
|
},
|
|
657
657
|
children: [/* @__PURE__ */ t("span", {
|
|
658
|
-
className: `${R ?
|
|
659
|
-
${
|
|
658
|
+
className: `${R ? K.value : K.placeholder}
|
|
659
|
+
${K[v]}`,
|
|
660
660
|
children: R?.label ?? a
|
|
661
661
|
}), /* @__PURE__ */ t("span", {
|
|
662
|
-
className: [
|
|
662
|
+
className: [K.chevron, A ? K.chevronOpen : ""].filter(Boolean).join(" "),
|
|
663
663
|
"aria-hidden": "true",
|
|
664
664
|
children: /* @__PURE__ */ t("svg", {
|
|
665
665
|
viewBox: "0 0 20 20",
|
|
@@ -675,38 +675,38 @@ var T = {
|
|
|
675
675
|
})]
|
|
676
676
|
})
|
|
677
677
|
}),
|
|
678
|
-
A && p(
|
|
678
|
+
A && p(te, document.body),
|
|
679
679
|
y && !_ && /* @__PURE__ */ t("span", {
|
|
680
|
-
id:
|
|
681
|
-
className:
|
|
680
|
+
id: z,
|
|
681
|
+
className: K.message,
|
|
682
682
|
children: y
|
|
683
683
|
}),
|
|
684
684
|
_ && /* @__PURE__ */ t("span", {
|
|
685
|
-
id:
|
|
686
|
-
className:
|
|
685
|
+
id: B,
|
|
686
|
+
className: K.error,
|
|
687
687
|
children: _
|
|
688
688
|
})
|
|
689
689
|
]
|
|
690
690
|
});
|
|
691
|
-
},
|
|
691
|
+
}, se = (e) => `${e.id}:${e.direction}`, ce = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
|
|
692
692
|
let c = e.flatMap((e) => [{
|
|
693
|
-
value:
|
|
693
|
+
value: se({
|
|
694
694
|
id: e.id,
|
|
695
695
|
direction: "asc"
|
|
696
696
|
}),
|
|
697
697
|
label: e.ascLabel ?? `${e.label} · по возрастанию`,
|
|
698
698
|
disabled: e.disabled
|
|
699
699
|
}, {
|
|
700
|
-
value:
|
|
700
|
+
value: se({
|
|
701
701
|
id: e.id,
|
|
702
702
|
direction: "desc"
|
|
703
703
|
}),
|
|
704
704
|
label: e.descLabel ?? `${e.label} · по убыванию`,
|
|
705
705
|
disabled: e.disabled
|
|
706
706
|
}]);
|
|
707
|
-
return /* @__PURE__ */ t(
|
|
707
|
+
return /* @__PURE__ */ t(oe, {
|
|
708
708
|
options: c,
|
|
709
|
-
value: n ?
|
|
709
|
+
value: n ? se(n) : "",
|
|
710
710
|
label: i,
|
|
711
711
|
placeholder: a,
|
|
712
712
|
disabled: o,
|
|
@@ -719,25 +719,80 @@ var T = {
|
|
|
719
719
|
});
|
|
720
720
|
}
|
|
721
721
|
});
|
|
722
|
-
},
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
722
|
+
}, le = {
|
|
723
|
+
approve: "M4 12l5 5L20 6",
|
|
724
|
+
reject: "M5 5l14 14M19 5L5 19",
|
|
725
|
+
edit: "M4 20h4L19 9l-4-4L4 16v4z",
|
|
726
|
+
cross: "M5 5l14 14M19 5L5 19",
|
|
727
|
+
chevron: "M6 9l6 6 6-6",
|
|
728
|
+
basket: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3",
|
|
729
|
+
info: "M12 10v7m0-10v.01",
|
|
730
|
+
warning: "M12 4L3 20h18L12 4zm0 5v5m0 3v.01"
|
|
731
|
+
}, ue = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
|
|
732
|
+
viewBox: "0 0 24 24",
|
|
733
|
+
width: i,
|
|
734
|
+
height: a,
|
|
735
|
+
fill: "none",
|
|
736
|
+
stroke: "currentColor",
|
|
737
|
+
strokeWidth: "1.8",
|
|
738
|
+
strokeLinecap: "round",
|
|
739
|
+
strokeLinejoin: "round",
|
|
740
|
+
role: r ? "img" : void 0,
|
|
741
|
+
"aria-hidden": !r || void 0,
|
|
742
|
+
focusable: "false",
|
|
743
|
+
...o,
|
|
744
|
+
children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: le[e] })]
|
|
745
|
+
}), Y = {
|
|
746
|
+
root: "_root_l2civ_1",
|
|
747
|
+
tableWrap: "_tableWrap_l2civ_3",
|
|
748
|
+
table: "_table_l2civ_3",
|
|
749
|
+
sticky: "_sticky_l2civ_15",
|
|
750
|
+
sortButton: "_sortButton_l2civ_17",
|
|
751
|
+
state: "_state_l2civ_21",
|
|
752
|
+
cards: "_cards_l2civ_23",
|
|
753
|
+
mobileSort: "_mobileSort_l2civ_23",
|
|
754
|
+
card: "_card_l2civ_23",
|
|
755
|
+
spanTwo: "_spanTwo_l2civ_37",
|
|
756
|
+
clickableRow: "_clickableRow_l2civ_41",
|
|
757
|
+
pagination: "_pagination_l2civ_49",
|
|
758
|
+
paginationRange: "_paginationRange_l2civ_75",
|
|
759
|
+
paginationControls: "_paginationControls_l2civ_87",
|
|
760
|
+
pageNumbers: "_pageNumbers_l2civ_89",
|
|
761
|
+
pageButton: "_pageButton_l2civ_101",
|
|
762
|
+
ellipsis: "_ellipsis_l2civ_111",
|
|
763
|
+
previousIcon: "_previousIcon_l2civ_123",
|
|
764
|
+
nextIcon: "_nextIcon_l2civ_131",
|
|
765
|
+
default: "_default_l2civ_169",
|
|
766
|
+
tableOnMobile: "_tableOnMobile_l2civ_169",
|
|
767
|
+
wide: "_wide_l2civ_173"
|
|
768
|
+
}, de = g({
|
|
738
769
|
rowSortingFeature: h,
|
|
739
770
|
sortedRowModel: m()
|
|
740
|
-
}),
|
|
771
|
+
}), fe = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
|
|
772
|
+
0,
|
|
773
|
+
1,
|
|
774
|
+
2,
|
|
775
|
+
3,
|
|
776
|
+
4,
|
|
777
|
+
"ellipsis-end",
|
|
778
|
+
t - 1
|
|
779
|
+
] : e >= t - 4 ? [
|
|
780
|
+
0,
|
|
781
|
+
"ellipsis-start",
|
|
782
|
+
t - 5,
|
|
783
|
+
t - 4,
|
|
784
|
+
t - 3,
|
|
785
|
+
t - 2,
|
|
786
|
+
t - 1
|
|
787
|
+
] : [
|
|
788
|
+
0,
|
|
789
|
+
"ellipsis-start",
|
|
790
|
+
e - 1,
|
|
791
|
+
e,
|
|
792
|
+
e + 1,
|
|
793
|
+
"ellipsis-end",
|
|
794
|
+
t - 1
|
|
795
|
+
], pe = (e, t) => {
|
|
741
796
|
let n = /* @__PURE__ */ new Set();
|
|
742
797
|
for (let t of e) {
|
|
743
798
|
if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
|
|
@@ -749,36 +804,36 @@ var T = {
|
|
|
749
804
|
for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
|
|
750
805
|
}
|
|
751
806
|
return null;
|
|
752
|
-
},
|
|
807
|
+
}, me = (e, t) => typeof e == "function" ? e(t) : t[e], he = (e) => {
|
|
753
808
|
if (e == null || e === "") return null;
|
|
754
809
|
let t = Date.parse(String(e));
|
|
755
810
|
return Number.isNaN(t) ? null : t;
|
|
756
|
-
},
|
|
757
|
-
let r =
|
|
811
|
+
}, ge = (e, t, n) => {
|
|
812
|
+
let r = he(e.getValue(n)), i = he(t.getValue(n));
|
|
758
813
|
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
759
|
-
},
|
|
814
|
+
}, _e = (e, t, n) => {
|
|
760
815
|
let r = e.getValue(n), i = t.getValue(n);
|
|
761
816
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
762
|
-
},
|
|
817
|
+
}, ve = (e, t, n) => {
|
|
763
818
|
let r = e.getValue(n), i = t.getValue(n);
|
|
764
819
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
765
|
-
},
|
|
820
|
+
}, ye = (e, t, n) => {
|
|
766
821
|
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
767
822
|
return r.localeCompare(i, void 0, {
|
|
768
823
|
numeric: !0,
|
|
769
824
|
sensitivity: "base"
|
|
770
825
|
});
|
|
771
|
-
},
|
|
826
|
+
}, be = (e) => {
|
|
772
827
|
switch (e) {
|
|
773
|
-
case "date": return
|
|
774
|
-
case "number": return
|
|
775
|
-
case "boolean": return
|
|
828
|
+
case "date": return ge;
|
|
829
|
+
case "number": return _e;
|
|
830
|
+
case "boolean": return ve;
|
|
776
831
|
case "text":
|
|
777
|
-
case void 0: return
|
|
832
|
+
case void 0: return ye;
|
|
778
833
|
case "custom": return;
|
|
779
834
|
}
|
|
780
|
-
},
|
|
781
|
-
let t = (t) =>
|
|
835
|
+
}, xe = (e) => {
|
|
836
|
+
let t = (t) => me(e.accessor, t), n = e.sortFn ?? be(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
|
|
782
837
|
id: e.id,
|
|
783
838
|
accessorFn: t,
|
|
784
839
|
header: () => e.header,
|
|
@@ -790,63 +845,81 @@ var T = {
|
|
|
790
845
|
sortDescFirst: e.sortDescFirst
|
|
791
846
|
};
|
|
792
847
|
return n !== void 0 && (i.sortFn = n), i;
|
|
793
|
-
},
|
|
794
|
-
let [
|
|
795
|
-
|
|
796
|
-
|
|
848
|
+
}, Se = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: c, renderMobileCard: l, getRowId: d, caption: p, ariaLabel: m, loading: h = !1, error: g, emptyState: v = "Нет данных", stickyHeader: y = !1, maxHeight: b, className: x = "", onRowClick: S, pagination: C = !1, pageSize: T = 30, visibleColumnIds: E }) => {
|
|
849
|
+
let [D, O] = f([]), [k, A] = f(0), j = o ?? D, M = j.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), N = Number.isFinite(T) && T > 0 ? Math.floor(T) : 30, P = u(() => {
|
|
850
|
+
if (E === void 0) return e;
|
|
851
|
+
let t = new Set(E);
|
|
852
|
+
return e.filter((e) => t.has(e.id));
|
|
853
|
+
}, [e, E]), F = u(() => P.length === 0 ? "Должна быть видима хотя бы одна колонка" : pe(P, r), [r, P]), I = u(() => P.map(xe), [P]), L = _({
|
|
854
|
+
features: de,
|
|
855
|
+
columns: I,
|
|
797
856
|
data: r,
|
|
798
|
-
state: { sorting:
|
|
857
|
+
state: { sorting: j },
|
|
799
858
|
onSortingChange: (e) => {
|
|
800
|
-
let t = typeof e == "function" ? e(
|
|
801
|
-
o === void 0 &&
|
|
859
|
+
let t = typeof e == "function" ? e(j) : e;
|
|
860
|
+
o === void 0 && O(t), A(0), c?.(t);
|
|
802
861
|
},
|
|
803
|
-
getRowId:
|
|
804
|
-
}),
|
|
862
|
+
getRowId: d
|
|
863
|
+
}), R = L.getRowModel().rows, z = C ? Math.max(1, Math.ceil(R.length / N)) : 1, B = Math.min(k, z - 1), V = u(() => C ? R.slice(B * N, (B + 1) * N) : R, [
|
|
864
|
+
N,
|
|
865
|
+
C,
|
|
866
|
+
B,
|
|
867
|
+
R
|
|
868
|
+
]), ee = u(() => P.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
805
869
|
id: e.id,
|
|
806
870
|
label: typeof e.header == "string" ? e.header : e.id
|
|
807
|
-
})),
|
|
808
|
-
|
|
809
|
-
a === "wide" ?
|
|
810
|
-
i ?
|
|
811
|
-
|
|
812
|
-
].filter(Boolean).join(" "),
|
|
813
|
-
return
|
|
814
|
-
|
|
815
|
-
|
|
871
|
+
})), [P]), H = u(() => fe(B, z), [z, B]), U = [
|
|
872
|
+
Y.root,
|
|
873
|
+
a === "wide" ? Y.wide : Y.default,
|
|
874
|
+
i ? Y.tableOnMobile : "",
|
|
875
|
+
x
|
|
876
|
+
].filter(Boolean).join(" "), W = F ?? g, te = C && !h && !W && R.length > N, G = B * N + 1, K = Math.min((B + 1) * N, R.length);
|
|
877
|
+
return s(() => {
|
|
878
|
+
A(0);
|
|
879
|
+
}, [
|
|
880
|
+
r,
|
|
881
|
+
N,
|
|
882
|
+
C,
|
|
883
|
+
M
|
|
884
|
+
]), s(() => {
|
|
885
|
+
k >= z && A(z - 1);
|
|
886
|
+
}, [z, k]), /* @__PURE__ */ n("section", {
|
|
887
|
+
className: U,
|
|
888
|
+
"aria-busy": h,
|
|
816
889
|
children: [
|
|
817
|
-
!i && !
|
|
818
|
-
className:
|
|
819
|
-
options:
|
|
820
|
-
value:
|
|
821
|
-
id:
|
|
822
|
-
direction:
|
|
890
|
+
!i && !h && !W && V.length > 0 && ee.length > 0 && /* @__PURE__ */ t(ce, {
|
|
891
|
+
className: Y.mobileSort,
|
|
892
|
+
options: ee,
|
|
893
|
+
value: j[0] ? {
|
|
894
|
+
id: j[0].id,
|
|
895
|
+
direction: j[0].desc ? "desc" : "asc"
|
|
823
896
|
} : null,
|
|
824
|
-
onChange: (e) =>
|
|
897
|
+
onChange: (e) => L.setSorting([{
|
|
825
898
|
id: e.id,
|
|
826
899
|
desc: e.direction === "desc"
|
|
827
900
|
}])
|
|
828
901
|
}),
|
|
829
902
|
/* @__PURE__ */ t("div", {
|
|
830
|
-
className:
|
|
831
|
-
style: { maxHeight:
|
|
903
|
+
className: Y.tableWrap,
|
|
904
|
+
style: { maxHeight: b },
|
|
832
905
|
children: /* @__PURE__ */ n("table", {
|
|
833
|
-
className:
|
|
834
|
-
"aria-label":
|
|
906
|
+
className: Y.table,
|
|
907
|
+
"aria-label": m,
|
|
835
908
|
children: [
|
|
836
|
-
|
|
909
|
+
p && /* @__PURE__ */ t("caption", { children: p }),
|
|
837
910
|
/* @__PURE__ */ t("thead", {
|
|
838
|
-
className:
|
|
839
|
-
children:
|
|
911
|
+
className: y ? Y.sticky : "",
|
|
912
|
+
children: L.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
|
|
840
913
|
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
|
|
841
914
|
return /* @__PURE__ */ t("th", {
|
|
842
915
|
scope: "col",
|
|
843
916
|
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
844
917
|
children: /* @__PURE__ */ n("button", {
|
|
845
918
|
type: "button",
|
|
846
|
-
className:
|
|
919
|
+
className: Y.sortButton,
|
|
847
920
|
disabled: !i,
|
|
848
921
|
onClick: a,
|
|
849
|
-
children: [/* @__PURE__ */ t(
|
|
922
|
+
children: [/* @__PURE__ */ t(L.FlexRender, { header: e }), /* @__PURE__ */ t("span", {
|
|
850
923
|
"aria-hidden": "true",
|
|
851
924
|
children: r === "asc" ? "↑" : r === "desc" ? "↓" : "↕"
|
|
852
925
|
})]
|
|
@@ -854,66 +927,139 @@ var T = {
|
|
|
854
927
|
}, e.id);
|
|
855
928
|
}) }, e.id))
|
|
856
929
|
}),
|
|
857
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
858
|
-
colSpan:
|
|
859
|
-
children: /* @__PURE__ */ t(
|
|
860
|
-
}) }) :
|
|
861
|
-
className:
|
|
862
|
-
colSpan:
|
|
863
|
-
children:
|
|
864
|
-
}) }) :
|
|
865
|
-
className:
|
|
866
|
-
colSpan:
|
|
867
|
-
children:
|
|
868
|
-
}) }) :
|
|
869
|
-
className:
|
|
870
|
-
onClick: () =>
|
|
930
|
+
/* @__PURE__ */ t("tbody", { children: h ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
931
|
+
colSpan: P.length,
|
|
932
|
+
children: /* @__PURE__ */ t(ne, { lines: 3 })
|
|
933
|
+
}) }) : W ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
934
|
+
className: Y.state,
|
|
935
|
+
colSpan: P.length,
|
|
936
|
+
children: W
|
|
937
|
+
}) }) : V.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
938
|
+
className: Y.state,
|
|
939
|
+
colSpan: P.length,
|
|
940
|
+
children: v
|
|
941
|
+
}) }) : V.map((e) => /* @__PURE__ */ t("tr", {
|
|
942
|
+
className: S ? Y.clickableRow : void 0,
|
|
943
|
+
onClick: () => S?.(e.original),
|
|
871
944
|
onKeyDown: (t) => {
|
|
872
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
945
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), S?.(e.original));
|
|
873
946
|
},
|
|
874
|
-
tabIndex:
|
|
875
|
-
role:
|
|
876
|
-
children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(
|
|
947
|
+
tabIndex: S ? 0 : void 0,
|
|
948
|
+
role: S ? "button" : void 0,
|
|
949
|
+
children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(L.FlexRender, { cell: e }) }, e.id))
|
|
877
950
|
}, e.id)) })
|
|
878
951
|
]
|
|
879
952
|
})
|
|
880
953
|
}),
|
|
881
954
|
!i && /* @__PURE__ */ t("div", {
|
|
882
|
-
className:
|
|
955
|
+
className: Y.cards,
|
|
883
956
|
role: "list",
|
|
884
|
-
"aria-label":
|
|
885
|
-
children:
|
|
886
|
-
className:
|
|
887
|
-
children:
|
|
888
|
-
}) :
|
|
889
|
-
className:
|
|
890
|
-
children:
|
|
891
|
-
}) :
|
|
892
|
-
if (
|
|
957
|
+
"aria-label": m ?? p,
|
|
958
|
+
children: h ? /* @__PURE__ */ t(ne, { lines: 4 }) : W ? /* @__PURE__ */ t("div", {
|
|
959
|
+
className: Y.state,
|
|
960
|
+
children: W
|
|
961
|
+
}) : V.length === 0 ? /* @__PURE__ */ t("div", {
|
|
962
|
+
className: Y.state,
|
|
963
|
+
children: v
|
|
964
|
+
}) : V.map((e) => {
|
|
965
|
+
if (l) return /* @__PURE__ */ t("div", {
|
|
893
966
|
role: "listitem",
|
|
894
|
-
children:
|
|
895
|
-
row:
|
|
896
|
-
columns:
|
|
967
|
+
children: l({
|
|
968
|
+
row: e.original,
|
|
969
|
+
columns: P
|
|
897
970
|
})
|
|
898
|
-
},
|
|
899
|
-
let
|
|
971
|
+
}, e.id);
|
|
972
|
+
let r = P.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), i = r.find((e) => e.mobile?.primary) ?? r.find((e) => e.mobile?.mobileVariant !== "actions"), a = (t) => me(t.accessor, e.original), o = (t) => t.mobile?.renderMobile?.(e.original, a(t)) ?? t.cell?.(e.original, a(t)) ?? String(a(t) ?? "");
|
|
900
973
|
return /* @__PURE__ */ n("article", {
|
|
901
974
|
role: "listitem",
|
|
902
|
-
className:
|
|
975
|
+
className: Y.card,
|
|
903
976
|
children: [
|
|
904
|
-
/* @__PURE__ */ t("h3", { children:
|
|
905
|
-
/* @__PURE__ */ t("dl", { children:
|
|
906
|
-
className: e.mobile?.mobileSpan === 2 ?
|
|
907
|
-
children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children:
|
|
977
|
+
/* @__PURE__ */ t("h3", { children: i ? o(i) : `Строка ${e.index + 1}` }),
|
|
978
|
+
/* @__PURE__ */ t("dl", { children: r.filter((e) => e !== i && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
|
|
979
|
+
className: e.mobile?.mobileSpan === 2 ? Y.spanTwo : "",
|
|
980
|
+
children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: o(e) })]
|
|
908
981
|
}, e.id)) }),
|
|
909
|
-
|
|
982
|
+
r.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: o(e) }, e.id))
|
|
910
983
|
]
|
|
911
|
-
},
|
|
984
|
+
}, e.id);
|
|
912
985
|
})
|
|
986
|
+
}),
|
|
987
|
+
te && /* @__PURE__ */ n("nav", {
|
|
988
|
+
className: Y.pagination,
|
|
989
|
+
"aria-label": "Пагинация таблицы",
|
|
990
|
+
children: [/* @__PURE__ */ n("span", {
|
|
991
|
+
className: Y.paginationRange,
|
|
992
|
+
"aria-live": "polite",
|
|
993
|
+
children: [
|
|
994
|
+
G,
|
|
995
|
+
"–",
|
|
996
|
+
K,
|
|
997
|
+
" из ",
|
|
998
|
+
R.length
|
|
999
|
+
]
|
|
1000
|
+
}), /* @__PURE__ */ n("div", {
|
|
1001
|
+
className: Y.paginationControls,
|
|
1002
|
+
children: [
|
|
1003
|
+
/* @__PURE__ */ n(w, {
|
|
1004
|
+
variant: "empty",
|
|
1005
|
+
size: "md",
|
|
1006
|
+
disabled: B === 0,
|
|
1007
|
+
"aria-label": "Предыдущая страница",
|
|
1008
|
+
onClick: () => {
|
|
1009
|
+
A((e) => Math.max(0, e - 1));
|
|
1010
|
+
},
|
|
1011
|
+
children: [/* @__PURE__ */ t(ue, {
|
|
1012
|
+
name: "chevron",
|
|
1013
|
+
width: 18,
|
|
1014
|
+
height: 18,
|
|
1015
|
+
className: Y.previousIcon
|
|
1016
|
+
}), /* @__PURE__ */ t("span", {
|
|
1017
|
+
className: Y.paginationButtonLabel,
|
|
1018
|
+
children: "Назад"
|
|
1019
|
+
})]
|
|
1020
|
+
}),
|
|
1021
|
+
/* @__PURE__ */ t("div", {
|
|
1022
|
+
className: Y.pageNumbers,
|
|
1023
|
+
children: H.map((e) => typeof e == "number" ? /* @__PURE__ */ t(w, {
|
|
1024
|
+
variant: e === B ? "secondary" : "empty",
|
|
1025
|
+
size: "md",
|
|
1026
|
+
className: Y.pageButton,
|
|
1027
|
+
"aria-label": `Перейти на страницу ${e + 1}`,
|
|
1028
|
+
"aria-current": e === B ? "page" : void 0,
|
|
1029
|
+
onClick: () => {
|
|
1030
|
+
A(e);
|
|
1031
|
+
},
|
|
1032
|
+
children: e + 1
|
|
1033
|
+
}, e) : /* @__PURE__ */ t("span", {
|
|
1034
|
+
className: Y.ellipsis,
|
|
1035
|
+
"aria-hidden": "true",
|
|
1036
|
+
children: "…"
|
|
1037
|
+
}, e))
|
|
1038
|
+
}),
|
|
1039
|
+
/* @__PURE__ */ n(w, {
|
|
1040
|
+
variant: "empty",
|
|
1041
|
+
size: "md",
|
|
1042
|
+
disabled: B === z - 1,
|
|
1043
|
+
"aria-label": "Следующая страница",
|
|
1044
|
+
onClick: () => {
|
|
1045
|
+
A((e) => Math.min(z - 1, e + 1));
|
|
1046
|
+
},
|
|
1047
|
+
children: [/* @__PURE__ */ t("span", {
|
|
1048
|
+
className: Y.paginationButtonLabel,
|
|
1049
|
+
children: "Вперёд"
|
|
1050
|
+
}), /* @__PURE__ */ t(ue, {
|
|
1051
|
+
name: "chevron",
|
|
1052
|
+
width: 18,
|
|
1053
|
+
height: 18,
|
|
1054
|
+
className: Y.nextIcon
|
|
1055
|
+
})]
|
|
1056
|
+
})
|
|
1057
|
+
]
|
|
1058
|
+
})]
|
|
913
1059
|
})
|
|
914
1060
|
]
|
|
915
1061
|
});
|
|
916
|
-
},
|
|
1062
|
+
}, Ce = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, label: l, error: p, hint: m, className: h = "", name: g, id: _, closeOnSelect: v = !1, maxMenuHeight: y }) => {
|
|
917
1063
|
let b = c(), x = _ ?? `ds-dropdown-multiple-${g ?? b}`, [S, C] = f(!1), w = d(null), T = d(null), E = d([]), D = u(() => e.filter((e) => r.includes(e.value)), [e, r]), O = D.map((e) => e.label).join(", "), k = m ? `${x}-hint` : void 0, A = p ? `${x}-error` : void 0;
|
|
918
1064
|
s(() => {
|
|
919
1065
|
let e = (e) => {
|
|
@@ -930,30 +1076,30 @@ var T = {
|
|
|
930
1076
|
let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
|
|
931
1077
|
i?.(n, e.filter((e) => n.includes(e.value))), v && (C(!1), T.current?.focus());
|
|
932
1078
|
}, M = (t, n) => {
|
|
933
|
-
let r =
|
|
1079
|
+
let r = J(e, t, n);
|
|
934
1080
|
E.current[r]?.focus(), E.current[r]?.scrollIntoView({ block: "nearest" });
|
|
935
1081
|
};
|
|
936
1082
|
return /* @__PURE__ */ n("div", {
|
|
937
1083
|
ref: w,
|
|
938
1084
|
className: [
|
|
939
|
-
|
|
940
|
-
p ?
|
|
1085
|
+
K.wrapper,
|
|
1086
|
+
p ? K.errorState : "",
|
|
941
1087
|
h
|
|
942
1088
|
].filter(Boolean).join(" "),
|
|
943
1089
|
children: [
|
|
944
1090
|
l && /* @__PURE__ */ t("label", {
|
|
945
1091
|
htmlFor: x,
|
|
946
|
-
className:
|
|
1092
|
+
className: K.label,
|
|
947
1093
|
children: l
|
|
948
1094
|
}),
|
|
949
1095
|
/* @__PURE__ */ n("div", {
|
|
950
|
-
className:
|
|
1096
|
+
className: K.container,
|
|
951
1097
|
children: [/* @__PURE__ */ n("button", {
|
|
952
1098
|
ref: T,
|
|
953
1099
|
id: x,
|
|
954
1100
|
type: "button",
|
|
955
1101
|
name: g,
|
|
956
|
-
className:
|
|
1102
|
+
className: K.trigger,
|
|
957
1103
|
disabled: o,
|
|
958
1104
|
"aria-haspopup": "listbox",
|
|
959
1105
|
"aria-expanded": S,
|
|
@@ -969,16 +1115,16 @@ var T = {
|
|
|
969
1115
|
}
|
|
970
1116
|
},
|
|
971
1117
|
children: [/* @__PURE__ */ t("span", {
|
|
972
|
-
className: D.length ?
|
|
1118
|
+
className: D.length ? K.value : K.placeholder,
|
|
973
1119
|
children: O || a
|
|
974
1120
|
}), /* @__PURE__ */ t("span", {
|
|
975
|
-
className: `${
|
|
1121
|
+
className: `${K.chevron} ${S ? K.chevronOpen : ""}`,
|
|
976
1122
|
"aria-hidden": "true",
|
|
977
1123
|
children: "⌄"
|
|
978
1124
|
})]
|
|
979
1125
|
}), S && /* @__PURE__ */ t("ul", {
|
|
980
1126
|
id: `${x}-listbox`,
|
|
981
|
-
className:
|
|
1127
|
+
className: K.menu,
|
|
982
1128
|
role: "listbox",
|
|
983
1129
|
"aria-label": l,
|
|
984
1130
|
"aria-multiselectable": "true",
|
|
@@ -995,7 +1141,7 @@ var T = {
|
|
|
995
1141
|
role: "option",
|
|
996
1142
|
"aria-selected": o,
|
|
997
1143
|
disabled: i.disabled,
|
|
998
|
-
className: `${
|
|
1144
|
+
className: `${K.option} ${o ? K.selected : ""}`,
|
|
999
1145
|
onClick: () => j(i),
|
|
1000
1146
|
onKeyDown: (t) => {
|
|
1001
1147
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
@@ -1021,40 +1167,17 @@ var T = {
|
|
|
1021
1167
|
}),
|
|
1022
1168
|
m && !p && /* @__PURE__ */ t("span", {
|
|
1023
1169
|
id: k,
|
|
1024
|
-
className:
|
|
1170
|
+
className: K.message,
|
|
1025
1171
|
children: m
|
|
1026
1172
|
}),
|
|
1027
1173
|
p && /* @__PURE__ */ t("span", {
|
|
1028
1174
|
id: A,
|
|
1029
|
-
className:
|
|
1175
|
+
className: K.error,
|
|
1030
1176
|
children: p
|
|
1031
1177
|
})
|
|
1032
1178
|
]
|
|
1033
1179
|
});
|
|
1034
|
-
},
|
|
1035
|
-
approve: "M4 12l5 5L20 6",
|
|
1036
|
-
reject: "M5 5l14 14M19 5L5 19",
|
|
1037
|
-
edit: "M4 20h4L19 9l-4-4L4 16v4z",
|
|
1038
|
-
cross: "M5 5l14 14M19 5L5 19",
|
|
1039
|
-
chevron: "M6 9l6 6 6-6",
|
|
1040
|
-
basket: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3",
|
|
1041
|
-
info: "M12 10v7m0-10v.01",
|
|
1042
|
-
warning: "M12 4L3 20h18L12 4zm0 5v5m0 3v.01"
|
|
1043
|
-
}, Ce = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
|
|
1044
|
-
viewBox: "0 0 24 24",
|
|
1045
|
-
width: i,
|
|
1046
|
-
height: a,
|
|
1047
|
-
fill: "none",
|
|
1048
|
-
stroke: "currentColor",
|
|
1049
|
-
strokeWidth: "1.8",
|
|
1050
|
-
strokeLinecap: "round",
|
|
1051
|
-
strokeLinejoin: "round",
|
|
1052
|
-
role: r ? "img" : void 0,
|
|
1053
|
-
"aria-hidden": !r || void 0,
|
|
1054
|
-
focusable: "false",
|
|
1055
|
-
...o,
|
|
1056
|
-
children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: Se[e] })]
|
|
1057
|
-
}), we = {
|
|
1180
|
+
}, we = {
|
|
1058
1181
|
root: "_root_1y2s8_1",
|
|
1059
1182
|
header: "_header_1y2s8_21",
|
|
1060
1183
|
title: "_title_1y2s8_41",
|
|
@@ -1093,7 +1216,7 @@ var T = {
|
|
|
1093
1216
|
children: r
|
|
1094
1217
|
})]
|
|
1095
1218
|
});
|
|
1096
|
-
},
|
|
1219
|
+
}, X = {
|
|
1097
1220
|
wrapper: "_wrapper_kz2dd_1",
|
|
1098
1221
|
control: "_control_kz2dd_3",
|
|
1099
1222
|
input: "_input_kz2dd_5",
|
|
@@ -1104,11 +1227,11 @@ var T = {
|
|
|
1104
1227
|
inputError: "_inputError_kz2dd_77",
|
|
1105
1228
|
trailingAction: "_trailingAction_kz2dd_79"
|
|
1106
1229
|
}, Ee = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: l = !1, stringWhileDisabled: u = !1, label: p, error: m, hint: h, className: g = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: w = "Скрыть пароль", passwordHiddenLabel: T = "Показать пароль", onFocus: O, ...k }) => {
|
|
1107
|
-
let A = c(), j = v ?? `ds-input-${_ ?? A}`, M = d(null), [N, P] = f(!1), F = h ? `${j}-hint` : void 0, I = m ? `${j}-error` : void 0, L = String(e ?? ""), R = [F, I].filter(Boolean).join(" ") || void 0,
|
|
1230
|
+
let A = c(), j = v ?? `ds-input-${_ ?? A}`, M = d(null), [N, P] = f(!1), F = h ? `${j}-hint` : void 0, I = m ? `${j}-error` : void 0, L = String(e ?? ""), R = [F, I].filter(Boolean).join(" ") || void 0, z = C ? N ? "text" : "password" : i;
|
|
1108
1231
|
return s(() => {
|
|
1109
1232
|
C || P(!1);
|
|
1110
1233
|
}, [C]), /* @__PURE__ */ n("div", {
|
|
1111
|
-
className: `${
|
|
1234
|
+
className: `${X.wrapper} ${g}`,
|
|
1112
1235
|
children: [
|
|
1113
1236
|
p && /* @__PURE__ */ t(E, {
|
|
1114
1237
|
htmlFor: j,
|
|
@@ -1118,17 +1241,17 @@ var T = {
|
|
|
1118
1241
|
}),
|
|
1119
1242
|
o && u ? /* @__PURE__ */ t("div", {
|
|
1120
1243
|
id: j,
|
|
1121
|
-
className:
|
|
1244
|
+
className: X.disabledText,
|
|
1122
1245
|
"aria-describedby": R,
|
|
1123
1246
|
children: L || a
|
|
1124
1247
|
}) : /* @__PURE__ */ n("div", {
|
|
1125
|
-
className:
|
|
1248
|
+
className: X.control,
|
|
1126
1249
|
children: [
|
|
1127
1250
|
/* @__PURE__ */ t("input", {
|
|
1128
1251
|
ref: M,
|
|
1129
1252
|
id: j,
|
|
1130
1253
|
name: _,
|
|
1131
|
-
type:
|
|
1254
|
+
type: z,
|
|
1132
1255
|
value: L,
|
|
1133
1256
|
placeholder: a,
|
|
1134
1257
|
disabled: o,
|
|
@@ -1136,7 +1259,7 @@ var T = {
|
|
|
1136
1259
|
required: x,
|
|
1137
1260
|
"aria-invalid": !!m,
|
|
1138
1261
|
"aria-describedby": R,
|
|
1139
|
-
className: `${
|
|
1262
|
+
className: `${X.input} ${X[y]} ${m ? X.inputError : ""}`,
|
|
1140
1263
|
onChange: (e) => {
|
|
1141
1264
|
if (i === "number" && !C) {
|
|
1142
1265
|
let t = e.target.value === "" ? "" : Number(e.target.value);
|
|
@@ -1152,7 +1275,7 @@ var T = {
|
|
|
1152
1275
|
}),
|
|
1153
1276
|
C && /* @__PURE__ */ t("button", {
|
|
1154
1277
|
type: "button",
|
|
1155
|
-
className:
|
|
1278
|
+
className: X.trailingAction,
|
|
1156
1279
|
disabled: o,
|
|
1157
1280
|
"aria-label": N ? w : T,
|
|
1158
1281
|
"aria-pressed": N,
|
|
@@ -1173,7 +1296,7 @@ var T = {
|
|
|
1173
1296
|
}),
|
|
1174
1297
|
!C && b && L && !o && !l && /* @__PURE__ */ t("button", {
|
|
1175
1298
|
type: "button",
|
|
1176
|
-
className:
|
|
1299
|
+
className: X.trailingAction,
|
|
1177
1300
|
"aria-label": "Очистить поле",
|
|
1178
1301
|
onClick: () => {
|
|
1179
1302
|
let e = M.current;
|
|
@@ -1271,7 +1394,7 @@ var T = {
|
|
|
1271
1394
|
onChange: (t) => d(e.id, t)
|
|
1272
1395
|
}, e.id);
|
|
1273
1396
|
}
|
|
1274
|
-
if (e.type === "dropdown") return /* @__PURE__ */ t(
|
|
1397
|
+
if (e.type === "dropdown") return /* @__PURE__ */ t(oe, {
|
|
1275
1398
|
label: e.label,
|
|
1276
1399
|
hint: e.hint,
|
|
1277
1400
|
placeholder: e.placeholder,
|
|
@@ -1280,7 +1403,7 @@ var T = {
|
|
|
1280
1403
|
disabled: n,
|
|
1281
1404
|
onChange: (t) => d(e.id, t)
|
|
1282
1405
|
}, e.id);
|
|
1283
|
-
if (e.type === "multiple") return /* @__PURE__ */ t(
|
|
1406
|
+
if (e.type === "multiple") return /* @__PURE__ */ t(Ce, {
|
|
1284
1407
|
label: e.label,
|
|
1285
1408
|
hint: e.hint,
|
|
1286
1409
|
placeholder: e.placeholder,
|
|
@@ -1306,7 +1429,7 @@ var T = {
|
|
|
1306
1429
|
from: null,
|
|
1307
1430
|
to: null
|
|
1308
1431
|
};
|
|
1309
|
-
return /* @__PURE__ */ t(
|
|
1432
|
+
return /* @__PURE__ */ t(te, {
|
|
1310
1433
|
hint: e.hint,
|
|
1311
1434
|
mode: e.mode,
|
|
1312
1435
|
min: e.min,
|
|
@@ -1331,7 +1454,7 @@ var T = {
|
|
|
1331
1454
|
})]
|
|
1332
1455
|
})]
|
|
1333
1456
|
});
|
|
1334
|
-
},
|
|
1457
|
+
}, Z = {
|
|
1335
1458
|
wrapper: "_wrapper_1ymdr_1",
|
|
1336
1459
|
dropzone: "_dropzone_1ymdr_3",
|
|
1337
1460
|
dragActive: "_dragActive_1ymdr_5",
|
|
@@ -1360,7 +1483,7 @@ var T = {
|
|
|
1360
1483
|
})), d = d.slice(0, u)), t.length && T?.(t), c.length && i?.(d), A.current && (A.current.value = "");
|
|
1361
1484
|
};
|
|
1362
1485
|
return /* @__PURE__ */ n("div", {
|
|
1363
|
-
className: `${
|
|
1486
|
+
className: `${Z.wrapper} ${b}`,
|
|
1364
1487
|
children: [
|
|
1365
1488
|
u && /* @__PURE__ */ t(E, {
|
|
1366
1489
|
htmlFor: k,
|
|
@@ -1369,7 +1492,7 @@ var T = {
|
|
|
1369
1492
|
children: u
|
|
1370
1493
|
}),
|
|
1371
1494
|
/* @__PURE__ */ n("div", {
|
|
1372
|
-
className: `${
|
|
1495
|
+
className: `${Z.dropzone} ${M ? Z.dragActive : ""} ${g ? Z.disabled : ""} ${m ? Z.error : ""}`,
|
|
1373
1496
|
onDragEnter: (e) => {
|
|
1374
1497
|
e.preventDefault(), L && ++j.current === 1 && N(!0);
|
|
1375
1498
|
},
|
|
@@ -1384,7 +1507,7 @@ var T = {
|
|
|
1384
1507
|
ref: A,
|
|
1385
1508
|
id: k,
|
|
1386
1509
|
name: v,
|
|
1387
|
-
className:
|
|
1510
|
+
className: Z.nativeInput,
|
|
1388
1511
|
type: "file",
|
|
1389
1512
|
multiple: a,
|
|
1390
1513
|
accept: o,
|
|
@@ -1395,18 +1518,18 @@ var T = {
|
|
|
1395
1518
|
onChange: (e) => R(Array.from(e.target.files ?? []))
|
|
1396
1519
|
}), r.length ? /* @__PURE__ */ n(e, { children: [
|
|
1397
1520
|
/* @__PURE__ */ t("ul", {
|
|
1398
|
-
className:
|
|
1521
|
+
className: Z.files,
|
|
1399
1522
|
"aria-live": "polite",
|
|
1400
1523
|
children: r.map((e, a) => /* @__PURE__ */ n("li", {
|
|
1401
|
-
className:
|
|
1524
|
+
className: Z.file,
|
|
1402
1525
|
children: [
|
|
1403
1526
|
/* @__PURE__ */ t("span", {
|
|
1404
|
-
className:
|
|
1527
|
+
className: Z.fileName,
|
|
1405
1528
|
title: e.name,
|
|
1406
1529
|
children: e.name
|
|
1407
1530
|
}),
|
|
1408
1531
|
/* @__PURE__ */ t("span", {
|
|
1409
|
-
className:
|
|
1532
|
+
className: Z.fileSize,
|
|
1410
1533
|
children: Me(e.size)
|
|
1411
1534
|
}),
|
|
1412
1535
|
L && /* @__PURE__ */ t(w, {
|
|
@@ -1420,28 +1543,28 @@ var T = {
|
|
|
1420
1543
|
}, je(e)))
|
|
1421
1544
|
}),
|
|
1422
1545
|
L && (a || r.length === 0) && /* @__PURE__ */ t(w, {
|
|
1423
|
-
className:
|
|
1546
|
+
className: Z.browseButton,
|
|
1424
1547
|
size: "sm",
|
|
1425
1548
|
onClick: () => A.current?.click(),
|
|
1426
1549
|
children: C
|
|
1427
1550
|
}),
|
|
1428
1551
|
L && !a && /* @__PURE__ */ t(w, {
|
|
1429
|
-
className:
|
|
1552
|
+
className: Z.browseButton,
|
|
1430
1553
|
size: "sm",
|
|
1431
1554
|
onClick: () => A.current?.click(),
|
|
1432
1555
|
children: S
|
|
1433
1556
|
})
|
|
1434
1557
|
] }) : /* @__PURE__ */ n("div", {
|
|
1435
|
-
className:
|
|
1558
|
+
className: Z.empty,
|
|
1436
1559
|
children: [
|
|
1437
1560
|
/* @__PURE__ */ t("span", {
|
|
1438
|
-
className:
|
|
1561
|
+
className: Z.uploadIcon,
|
|
1439
1562
|
"aria-hidden": "true",
|
|
1440
1563
|
children: "↑"
|
|
1441
1564
|
}),
|
|
1442
1565
|
/* @__PURE__ */ t("strong", { children: M ? "Отпустите файлы здесь" : x }),
|
|
1443
1566
|
!M && L && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(w, {
|
|
1444
|
-
className:
|
|
1567
|
+
className: Z.browseButton,
|
|
1445
1568
|
onClick: () => A.current?.click(),
|
|
1446
1569
|
children: S
|
|
1447
1570
|
})] })
|
|
@@ -1460,7 +1583,7 @@ var T = {
|
|
|
1460
1583
|
})
|
|
1461
1584
|
]
|
|
1462
1585
|
});
|
|
1463
|
-
}, Fe = 0,
|
|
1586
|
+
}, Fe = 0, Q = v((e) => ({
|
|
1464
1587
|
modals: [],
|
|
1465
1588
|
openModal: (t, n = {}, r = {}) => {
|
|
1466
1589
|
Fe += 1;
|
|
@@ -1476,22 +1599,22 @@ var T = {
|
|
|
1476
1599
|
closeModal: (t) => e((e) => ({ modals: e.modals.filter((e) => e.id !== t) })),
|
|
1477
1600
|
closeTopModal: () => e((e) => ({ modals: e.modals.slice(0, -1) })),
|
|
1478
1601
|
closeAllModals: () => e({ modals: [] })
|
|
1479
|
-
})), Ie = () =>
|
|
1480
|
-
layer: "
|
|
1481
|
-
backdrop: "
|
|
1482
|
-
panel: "
|
|
1483
|
-
header: "
|
|
1484
|
-
title: "
|
|
1485
|
-
description: "
|
|
1486
|
-
content: "
|
|
1487
|
-
},
|
|
1488
|
-
let f = c(), p = c(), m = d(null), h =
|
|
1602
|
+
})), Ie = () => Q.setState({ modals: [] }), Le = {
|
|
1603
|
+
layer: "_layer_rnqi6_1",
|
|
1604
|
+
backdrop: "_backdrop_rnqi6_3",
|
|
1605
|
+
panel: "_panel_rnqi6_5",
|
|
1606
|
+
header: "_header_rnqi6_9",
|
|
1607
|
+
title: "_title_rnqi6_11",
|
|
1608
|
+
description: "_description_rnqi6_13",
|
|
1609
|
+
content: "_content_rnqi6_15"
|
|
1610
|
+
}, Re = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", ze = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: u = "dialog" }) => {
|
|
1611
|
+
let f = c(), p = c(), m = d(null), h = Q((e) => e.closeModal);
|
|
1489
1612
|
return s(() => {
|
|
1490
1613
|
let e = document.activeElement, t = m.current;
|
|
1491
|
-
return (t?.querySelector(
|
|
1614
|
+
return (t?.querySelector(Re) ?? t)?.focus(), () => e?.focus();
|
|
1492
1615
|
}, []), /* @__PURE__ */ n("div", {
|
|
1493
1616
|
ref: m,
|
|
1494
|
-
className: `${
|
|
1617
|
+
className: `${Le.panel} ${l}`,
|
|
1495
1618
|
role: u,
|
|
1496
1619
|
"aria-modal": "true",
|
|
1497
1620
|
"aria-labelledby": r ? f : void 0,
|
|
@@ -1499,7 +1622,7 @@ var T = {
|
|
|
1499
1622
|
tabIndex: -1,
|
|
1500
1623
|
onKeyDown: (e) => {
|
|
1501
1624
|
if (e.key !== "Tab") return;
|
|
1502
|
-
let t = Array.from(m.current?.querySelectorAll(
|
|
1625
|
+
let t = Array.from(m.current?.querySelectorAll(Re) ?? []);
|
|
1503
1626
|
if (!t.length) {
|
|
1504
1627
|
e.preventDefault();
|
|
1505
1628
|
return;
|
|
@@ -1509,10 +1632,10 @@ var T = {
|
|
|
1509
1632
|
},
|
|
1510
1633
|
children: [
|
|
1511
1634
|
(r || o) && /* @__PURE__ */ n("header", {
|
|
1512
|
-
className:
|
|
1635
|
+
className: Le.header,
|
|
1513
1636
|
children: [r && /* @__PURE__ */ t("h2", {
|
|
1514
1637
|
id: f,
|
|
1515
|
-
className:
|
|
1638
|
+
className: Le.title,
|
|
1516
1639
|
children: r
|
|
1517
1640
|
}), /* @__PURE__ */ t(w, {
|
|
1518
1641
|
variant: "empty",
|
|
@@ -1535,31 +1658,31 @@ var T = {
|
|
|
1535
1658
|
}),
|
|
1536
1659
|
i && /* @__PURE__ */ t("p", {
|
|
1537
1660
|
id: p,
|
|
1538
|
-
className:
|
|
1661
|
+
className: Le.description,
|
|
1539
1662
|
children: i
|
|
1540
1663
|
}),
|
|
1541
1664
|
/* @__PURE__ */ t("div", {
|
|
1542
|
-
className:
|
|
1665
|
+
className: Le.content,
|
|
1543
1666
|
children: e
|
|
1544
1667
|
})
|
|
1545
1668
|
]
|
|
1546
1669
|
});
|
|
1547
|
-
},
|
|
1548
|
-
let n =
|
|
1670
|
+
}, Be = ({ registry: e }) => {
|
|
1671
|
+
let n = Q((e) => e.modals), r = Q((e) => e.closeModal), i = Q((e) => e.closeAllModals);
|
|
1549
1672
|
return s(() => {
|
|
1550
1673
|
let e = (e) => {
|
|
1551
1674
|
if (e.key !== "Escape") return;
|
|
1552
|
-
let t =
|
|
1675
|
+
let t = Q.getState().modals.at(-1);
|
|
1553
1676
|
t?.closeOnEscape && r(t.id);
|
|
1554
1677
|
};
|
|
1555
1678
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1556
1679
|
}, [r]), !n.length || typeof document > "u" ? null : p(/* @__PURE__ */ t("div", {
|
|
1557
|
-
className:
|
|
1680
|
+
className: Le.layer,
|
|
1558
1681
|
"aria-label": "Модальные окна",
|
|
1559
1682
|
children: n.map((a, o) => {
|
|
1560
1683
|
let s = e[a.name];
|
|
1561
1684
|
return s ? /* @__PURE__ */ t("div", {
|
|
1562
|
-
className:
|
|
1685
|
+
className: Le.backdrop,
|
|
1563
1686
|
"aria-hidden": o !== n.length - 1 || void 0,
|
|
1564
1687
|
onMouseDown: (e) => {
|
|
1565
1688
|
e.target === e.currentTarget && a.closeOnBackdrop && r(a.id);
|
|
@@ -1573,31 +1696,31 @@ var T = {
|
|
|
1573
1696
|
}, a.id) : null;
|
|
1574
1697
|
})
|
|
1575
1698
|
}), document.body);
|
|
1576
|
-
},
|
|
1577
|
-
let o =
|
|
1699
|
+
}, Ve = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
|
|
1700
|
+
let o = Q((e) => e.modals.length);
|
|
1578
1701
|
return s(() => {
|
|
1579
1702
|
if (!a || o === 0) return;
|
|
1580
1703
|
let e = document.body.style.overflow;
|
|
1581
1704
|
return document.body.style.overflow = "hidden", () => {
|
|
1582
1705
|
document.body.style.overflow = e;
|
|
1583
1706
|
};
|
|
1584
|
-
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(
|
|
1585
|
-
},
|
|
1707
|
+
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Be, { registry: r })] });
|
|
1708
|
+
}, He = (e) => e, Ue = {
|
|
1586
1709
|
message: "_message_1vtru_1",
|
|
1587
1710
|
actions: "_actions_1vtru_3"
|
|
1588
|
-
},
|
|
1711
|
+
}, We = /* @__PURE__ */ new Map(), Ge = 0, Ke = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
|
|
1589
1712
|
let u = (e) => {
|
|
1590
|
-
|
|
1713
|
+
We.get(l)?.(e), We.delete(l), r();
|
|
1591
1714
|
};
|
|
1592
|
-
return /* @__PURE__ */ n(
|
|
1715
|
+
return /* @__PURE__ */ n(ze, {
|
|
1593
1716
|
modalId: e,
|
|
1594
1717
|
title: i,
|
|
1595
1718
|
role: "alertdialog",
|
|
1596
1719
|
children: [/* @__PURE__ */ t("p", {
|
|
1597
|
-
className:
|
|
1720
|
+
className: Ue.message,
|
|
1598
1721
|
children: a
|
|
1599
1722
|
}), /* @__PURE__ */ n("div", {
|
|
1600
|
-
className:
|
|
1723
|
+
className: Ue.actions,
|
|
1601
1724
|
children: [/* @__PURE__ */ t(w, {
|
|
1602
1725
|
variant: "outline",
|
|
1603
1726
|
onClick: () => u(!1),
|
|
@@ -1609,55 +1732,55 @@ var T = {
|
|
|
1609
1732
|
})]
|
|
1610
1733
|
})]
|
|
1611
1734
|
});
|
|
1612
|
-
},
|
|
1735
|
+
}, qe = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(ze, {
|
|
1613
1736
|
modalId: e,
|
|
1614
1737
|
title: i,
|
|
1615
1738
|
role: "alertdialog",
|
|
1616
1739
|
children: [/* @__PURE__ */ t("p", {
|
|
1617
|
-
className:
|
|
1740
|
+
className: Ue.message,
|
|
1618
1741
|
children: a
|
|
1619
1742
|
}), /* @__PURE__ */ t("div", {
|
|
1620
|
-
className:
|
|
1743
|
+
className: Ue.actions,
|
|
1621
1744
|
children: /* @__PURE__ */ t(w, {
|
|
1622
1745
|
onClick: r,
|
|
1623
1746
|
children: o
|
|
1624
1747
|
})
|
|
1625
1748
|
})]
|
|
1626
|
-
}),
|
|
1627
|
-
ConfirmModal:
|
|
1628
|
-
ErrorModal:
|
|
1629
|
-
}),
|
|
1630
|
-
let e =
|
|
1749
|
+
}), Je = He({
|
|
1750
|
+
ConfirmModal: Ke,
|
|
1751
|
+
ErrorModal: qe
|
|
1752
|
+
}), Ye = () => {
|
|
1753
|
+
let e = Q((e) => e.openModal);
|
|
1631
1754
|
return (t = {}) => new Promise((n) => {
|
|
1632
|
-
|
|
1633
|
-
let r = `confirm-${
|
|
1634
|
-
|
|
1755
|
+
Ge += 1;
|
|
1756
|
+
let r = `confirm-${Ge}`;
|
|
1757
|
+
We.set(r, n), e("ConfirmModal", {
|
|
1635
1758
|
...t,
|
|
1636
1759
|
requestId: r
|
|
1637
1760
|
}, { closeOnEscape: !1 });
|
|
1638
1761
|
});
|
|
1639
|
-
},
|
|
1640
|
-
let e =
|
|
1762
|
+
}, Xe = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Ze = () => {
|
|
1763
|
+
let e = Q((e) => e.openModal);
|
|
1641
1764
|
return { showError: (t, n) => e("ErrorModal", {
|
|
1642
1765
|
title: n,
|
|
1643
|
-
message:
|
|
1766
|
+
message: Xe(t)
|
|
1644
1767
|
}) };
|
|
1645
|
-
},
|
|
1646
|
-
let e =
|
|
1768
|
+
}, Qe = v(() => ({})), $e = v(() => ({})), et = () => {
|
|
1769
|
+
let e = Q((e) => e.modals), t = Q((e) => e.openModal);
|
|
1647
1770
|
return {
|
|
1648
1771
|
openModal: (e, n = {}, r) => t(e, n, r),
|
|
1649
|
-
closeModal:
|
|
1650
|
-
closeTopModal:
|
|
1651
|
-
closeAllModals:
|
|
1772
|
+
closeModal: Q((e) => e.closeModal),
|
|
1773
|
+
closeTopModal: Q((e) => e.closeTopModal),
|
|
1774
|
+
closeAllModals: Q((e) => e.closeAllModals),
|
|
1652
1775
|
isOpen: (t) => e.some((e) => e.name === t),
|
|
1653
1776
|
count: e.length
|
|
1654
1777
|
};
|
|
1655
|
-
},
|
|
1656
|
-
className: `${
|
|
1778
|
+
}, tt = { root: "_root_fvxpr_1" }, nt = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
|
|
1779
|
+
className: `${tt.root} ${r}`,
|
|
1657
1780
|
role: "status",
|
|
1658
1781
|
"aria-label": e,
|
|
1659
1782
|
children: [/* @__PURE__ */ t(S, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
|
|
1660
|
-
}),
|
|
1783
|
+
}), rt = {
|
|
1661
1784
|
viewport: "_viewport_15mi5_1",
|
|
1662
1785
|
"top-right": "_top-right_15mi5_3",
|
|
1663
1786
|
"top-left": "_top-left_15mi5_5",
|
|
@@ -1670,7 +1793,7 @@ var T = {
|
|
|
1670
1793
|
success: "_success_15mi5_19",
|
|
1671
1794
|
warning: "_warning_15mi5_21",
|
|
1672
1795
|
error: "_error_15mi5_23"
|
|
1673
|
-
},
|
|
1796
|
+
}, it = (e) => {
|
|
1674
1797
|
let r;
|
|
1675
1798
|
return r = e === "info" ? /* @__PURE__ */ n("svg", {
|
|
1676
1799
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1756,7 +1879,7 @@ var T = {
|
|
|
1756
1879
|
/* @__PURE__ */ t("path", { d: "m9 9 6 6" })
|
|
1757
1880
|
]
|
|
1758
1881
|
}), r;
|
|
1759
|
-
},
|
|
1882
|
+
}, at = ({ toast: e, onClose: r }) => {
|
|
1760
1883
|
let [i, a] = f(!1), o = d(e.duration), c = d(Date.now());
|
|
1761
1884
|
return s(() => {
|
|
1762
1885
|
if (i || e.duration <= 0) return;
|
|
@@ -1771,7 +1894,7 @@ var T = {
|
|
|
1771
1894
|
e.duration,
|
|
1772
1895
|
e.id
|
|
1773
1896
|
]), /* @__PURE__ */ n("article", {
|
|
1774
|
-
className: `${
|
|
1897
|
+
className: `${rt.toast} ${rt[e.variant]}`,
|
|
1775
1898
|
role: e.variant === "error" ? "alert" : "status",
|
|
1776
1899
|
"aria-live": e.variant === "error" ? "assertive" : "polite",
|
|
1777
1900
|
onMouseEnter: () => a(!0),
|
|
@@ -1779,9 +1902,9 @@ var T = {
|
|
|
1779
1902
|
onFocus: () => a(!0),
|
|
1780
1903
|
onBlur: () => a(!1),
|
|
1781
1904
|
children: [
|
|
1782
|
-
/* @__PURE__ */ t("div", { children:
|
|
1905
|
+
/* @__PURE__ */ t("div", { children: it(e.variant) }),
|
|
1783
1906
|
/* @__PURE__ */ n("div", {
|
|
1784
|
-
className:
|
|
1907
|
+
className: rt.body,
|
|
1785
1908
|
children: [
|
|
1786
1909
|
e.title && /* @__PURE__ */ t("strong", { children: e.title }),
|
|
1787
1910
|
/* @__PURE__ */ t("div", { children: e.message }),
|
|
@@ -1815,11 +1938,11 @@ var T = {
|
|
|
1815
1938
|
})
|
|
1816
1939
|
]
|
|
1817
1940
|
});
|
|
1818
|
-
},
|
|
1941
|
+
}, ot = 0, st = v((e) => ({
|
|
1819
1942
|
toasts: [],
|
|
1820
1943
|
showToast: (t) => {
|
|
1821
|
-
|
|
1822
|
-
let n = `ds-toast-${
|
|
1944
|
+
ot += 1;
|
|
1945
|
+
let n = `ds-toast-${ot}`;
|
|
1823
1946
|
return e((e) => ({ toasts: [...e.toasts, {
|
|
1824
1947
|
variant: "info",
|
|
1825
1948
|
duration: 5e3,
|
|
@@ -1830,18 +1953,18 @@ var T = {
|
|
|
1830
1953
|
},
|
|
1831
1954
|
removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
|
|
1832
1955
|
clearToasts: () => e({ toasts: [] })
|
|
1833
|
-
})),
|
|
1834
|
-
let n =
|
|
1956
|
+
})), ct = () => st.setState({ toasts: [] }), lt = ({ position: e = "top-right" }) => {
|
|
1957
|
+
let n = st((e) => e.toasts), r = st((e) => e.removeToast);
|
|
1835
1958
|
return /* @__PURE__ */ t("div", {
|
|
1836
|
-
className: `${
|
|
1959
|
+
className: `${rt.viewport} ${rt[e]}`,
|
|
1837
1960
|
"aria-label": "Уведомления",
|
|
1838
|
-
children: n.map((e) => /* @__PURE__ */ t(
|
|
1961
|
+
children: n.map((e) => /* @__PURE__ */ t(at, {
|
|
1839
1962
|
toast: e,
|
|
1840
1963
|
onClose: r
|
|
1841
1964
|
}, e.id))
|
|
1842
1965
|
});
|
|
1843
|
-
},
|
|
1844
|
-
let e =
|
|
1966
|
+
}, ut = () => {
|
|
1967
|
+
let e = st((e) => e.showToast), t = st((e) => e.removeToast), n = st((e) => e.clearToasts), r = o((t) => e({
|
|
1845
1968
|
...t,
|
|
1846
1969
|
variant: "info"
|
|
1847
1970
|
}), [e]), i = o((t) => e({
|
|
@@ -1871,7 +1994,7 @@ var T = {
|
|
|
1871
1994
|
i,
|
|
1872
1995
|
a
|
|
1873
1996
|
]);
|
|
1874
|
-
},
|
|
1997
|
+
}, dt = {
|
|
1875
1998
|
root: "_root_s9o0g_1",
|
|
1876
1999
|
tooltip: "_tooltip_s9o0g_3",
|
|
1877
2000
|
"ds-tooltip-in": "_ds-tooltip-in_s9o0g_1",
|
|
@@ -1879,7 +2002,7 @@ var T = {
|
|
|
1879
2002
|
bottom: "_bottom_s9o0g_7",
|
|
1880
2003
|
left: "_left_s9o0g_9",
|
|
1881
2004
|
right: "_right_s9o0g_11"
|
|
1882
|
-
},
|
|
2005
|
+
}, ft = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: u = !1, maxWidth: p = 280, className: m = "" }) => {
|
|
1883
2006
|
let h = c(), [g, _] = f(!1), v = d(null), y = () => {
|
|
1884
2007
|
u || !e || (v.current = setTimeout(() => _(!0), l));
|
|
1885
2008
|
}, b = () => {
|
|
@@ -1901,29 +2024,29 @@ var T = {
|
|
|
1901
2024
|
onBlur: b
|
|
1902
2025
|
});
|
|
1903
2026
|
return /* @__PURE__ */ n("span", {
|
|
1904
|
-
className: `${
|
|
2027
|
+
className: `${dt.root} ${m}`,
|
|
1905
2028
|
onPointerDown: g ? b : y,
|
|
1906
2029
|
children: [x, g && /* @__PURE__ */ t("span", {
|
|
1907
2030
|
id: h,
|
|
1908
2031
|
role: "tooltip",
|
|
1909
|
-
className: `${
|
|
2032
|
+
className: `${dt.tooltip} ${dt[o]}`,
|
|
1910
2033
|
style: { maxWidth: p },
|
|
1911
2034
|
children: e
|
|
1912
2035
|
})]
|
|
1913
2036
|
});
|
|
1914
|
-
},
|
|
2037
|
+
}, pt = {
|
|
1915
2038
|
root: "_root_1ue3g_1",
|
|
1916
2039
|
frame: "_frame_1ue3g_3",
|
|
1917
2040
|
video: "_video_1ue3g_5",
|
|
1918
2041
|
overlay: "_overlay_1ue3g_7",
|
|
1919
2042
|
error: "_error_1ue3g_7",
|
|
1920
2043
|
caption: "_caption_1ue3g_13"
|
|
1921
|
-
},
|
|
2044
|
+
}, mt = ({ sources: e, tracks: r = [], title: i, aspectRatio: a = "16 / 9", objectFit: o = "contain", loading: s = !1, error: c, fallback: l, className: u = "", controls: d = !0, playsInline: p = !0, ...m }) => {
|
|
1922
2045
|
let [h, g] = f(!1), _ = c ?? (h ? "Не удалось воспроизвести видео" : void 0);
|
|
1923
2046
|
return /* @__PURE__ */ n("figure", {
|
|
1924
|
-
className: `${
|
|
2047
|
+
className: `${pt.root} ${u}`,
|
|
1925
2048
|
children: [/* @__PURE__ */ n("div", {
|
|
1926
|
-
className:
|
|
2049
|
+
className: pt.frame,
|
|
1927
2050
|
style: { aspectRatio: a },
|
|
1928
2051
|
children: [
|
|
1929
2052
|
!_ && e.length > 0 && /* @__PURE__ */ n("video", {
|
|
@@ -1931,7 +2054,7 @@ var T = {
|
|
|
1931
2054
|
"aria-label": i,
|
|
1932
2055
|
controls: d,
|
|
1933
2056
|
playsInline: p,
|
|
1934
|
-
className:
|
|
2057
|
+
className: pt.video,
|
|
1935
2058
|
style: { objectFit: o },
|
|
1936
2059
|
onError: (e) => {
|
|
1937
2060
|
g(!0), m.onError?.(e);
|
|
@@ -1939,21 +2062,21 @@ var T = {
|
|
|
1939
2062
|
children: [e.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), r.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
|
|
1940
2063
|
}),
|
|
1941
2064
|
s && /* @__PURE__ */ t("div", {
|
|
1942
|
-
className:
|
|
2065
|
+
className: pt.overlay,
|
|
1943
2066
|
children: /* @__PURE__ */ t(S, { label: "Загрузка видео" })
|
|
1944
2067
|
}),
|
|
1945
2068
|
(_ || e.length === 0) && /* @__PURE__ */ t("div", {
|
|
1946
|
-
className:
|
|
2069
|
+
className: pt.error,
|
|
1947
2070
|
role: "alert",
|
|
1948
2071
|
children: l ?? _ ?? "Источник видео не указан"
|
|
1949
2072
|
})
|
|
1950
2073
|
]
|
|
1951
2074
|
}), /* @__PURE__ */ t("figcaption", {
|
|
1952
|
-
className:
|
|
2075
|
+
className: pt.caption,
|
|
1953
2076
|
children: i
|
|
1954
2077
|
})]
|
|
1955
2078
|
});
|
|
1956
|
-
},
|
|
2079
|
+
}, ht = {
|
|
1957
2080
|
popup: "_popup_15ovj_1",
|
|
1958
2081
|
trigger: "_trigger_15ovj_15",
|
|
1959
2082
|
content: "_content_15ovj_23",
|
|
@@ -1961,13 +2084,13 @@ var T = {
|
|
|
1961
2084
|
right: "_right_15ovj_141",
|
|
1962
2085
|
bottom: "_bottom_15ovj_175",
|
|
1963
2086
|
left: "_left_15ovj_209"
|
|
1964
|
-
},
|
|
1965
|
-
className: `${
|
|
2087
|
+
}, gt = ({ content: r, children: i, placement: a = "top", disabled: o = !1 }) => o ? /* @__PURE__ */ t(e, { children: i }) : /* @__PURE__ */ n("span", {
|
|
2088
|
+
className: `${ht.popup} ${ht[a]}`,
|
|
1966
2089
|
children: [/* @__PURE__ */ t("span", {
|
|
1967
|
-
className:
|
|
2090
|
+
className: ht.trigger,
|
|
1968
2091
|
children: i
|
|
1969
2092
|
}), /* @__PURE__ */ t("span", {
|
|
1970
|
-
className:
|
|
2093
|
+
className: ht.content,
|
|
1971
2094
|
role: "tooltip",
|
|
1972
2095
|
children: r
|
|
1973
2096
|
})]
|
|
@@ -1981,7 +2104,7 @@ var T = {
|
|
|
1981
2104
|
open: "_open_1tdda_91",
|
|
1982
2105
|
content: "_content_1tdda_99",
|
|
1983
2106
|
contentInner: "_contentInner_1tdda_119"
|
|
1984
|
-
},
|
|
2107
|
+
}, _t = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, className: l = "" }) => {
|
|
1985
2108
|
let u = c(), [d, p] = f(a), m = o ?? d;
|
|
1986
2109
|
return /* @__PURE__ */ n("section", {
|
|
1987
2110
|
className: `${$.root} ${m ? $.open : ""} ${l}`,
|
|
@@ -2028,7 +2151,7 @@ var T = {
|
|
|
2028
2151
|
})
|
|
2029
2152
|
})]
|
|
2030
2153
|
});
|
|
2031
|
-
},
|
|
2154
|
+
}, vt = ({ children: e, containerId: t = "overlay-root" }) => {
|
|
2032
2155
|
let [n, r] = f(null);
|
|
2033
2156
|
return s(() => {
|
|
2034
2157
|
let e = document.getElementById(t);
|
|
@@ -2043,4 +2166,4 @@ var T = {
|
|
|
2043
2166
|
}, [t]), n ? p(e, n) : null;
|
|
2044
2167
|
};
|
|
2045
2168
|
//#endregion
|
|
2046
|
-
export {
|
|
2169
|
+
export { Ke as ConfirmModal, _t as DSAccordion, b as DSBadge, w as DSButton, k as DSCheckbox, Se as DSDataTable, te as DSDateRange, H as DSDateTimePicker, oe as DSDropDown, Ce as DSDropDownMultiple, E as DSFieldLabel, D as DSFieldMessage, Pe as DSFileInput, Ae as DSFilters, ue as DSIcon, Te as DSInfoBlock, Ee as DSInput, S as DSLoader, Be as DSModal, ze as DSModalFrame, nt as DSPageLoader, gt as DSPopup, vt as DSPortal, Oe as DSRadioButton, ne as DSSkeleton, ce as DSSort, at as DSToast, lt as DSToastProvider, ft as DSTooltip, mt as DSVideoPlayerFrame, qe as ErrorModal, Ve as ModalSystemProvider, Je as builtInModalRegistry, He as defineModalRegistry, F as formatDateTimeLocalValue, fe as getDSDataTablePaginationItems, Xe as getErrorMessage, J as getNextEnabledOptionIndex, W as isValidDateRange, I as parseDateTimeLocalValue, Ie as resetModalStore, ct as resetToastStore, Ye as useConfirmModal, Qe as useConfirmModalStore, Ze as useErrorModal, $e as useErrorModalStore, et as useModals, Q as useModalsStore, ut as useToast, st as useToastStore, pe as validateDSDataTableData };
|