@efficiency-point/design-system 0.0.32 → 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 +18 -4
- package/dist/components/DSDataTable/DSDataTable.d.ts +6 -1
- package/dist/components/DSDataTable/DSDataTable.d.ts.map +1 -1
- package/dist/components/DSDropDown/DSDropDown.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.es.js +509 -387
- package/dist/style.css +1 -1
- package/package.json +1 -1
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
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
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_vdtvv_1",
|
|
477
|
+
label: "_label_vdtvv_17",
|
|
478
|
+
container: "_container_vdtvv_29",
|
|
479
|
+
trigger: "_trigger_vdtvv_37",
|
|
480
|
+
disabledText: "_disabledText_vdtvv_39",
|
|
481
|
+
sm: "_sm_vdtvv_61",
|
|
482
|
+
md: "_md_vdtvv_71",
|
|
483
|
+
lg: "_lg_vdtvv_81",
|
|
484
|
+
value: "_value_vdtvv_141",
|
|
485
|
+
placeholder: "_placeholder_vdtvv_143",
|
|
486
|
+
chevron: "_chevron_vdtvv_195",
|
|
487
|
+
chevronOpen: "_chevronOpen_vdtvv_221",
|
|
488
|
+
menu: "_menu_vdtvv_229",
|
|
489
|
+
option: "_option_vdtvv_259",
|
|
490
|
+
selected: "_selected_vdtvv_329",
|
|
491
|
+
message: "_message_vdtvv_349",
|
|
492
|
+
error: "_error_vdtvv_351",
|
|
493
|
+
errorState: "_errorState_vdtvv_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,36 +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:
|
|
621
|
-
className: `${G.label} ${G[v]}`,
|
|
620
|
+
htmlFor: ee ? void 0 : O,
|
|
622
621
|
children: g
|
|
623
622
|
}),
|
|
624
623
|
/* @__PURE__ */ t("div", {
|
|
625
|
-
className:
|
|
626
|
-
children:
|
|
624
|
+
className: K.container,
|
|
625
|
+
children: ee ? /* @__PURE__ */ t("div", {
|
|
627
626
|
id: O,
|
|
628
|
-
className:
|
|
629
|
-
"aria-describedby":
|
|
627
|
+
className: K.disabledText,
|
|
628
|
+
"aria-describedby": V,
|
|
630
629
|
children: R?.label ?? a
|
|
631
630
|
}) : /* @__PURE__ */ n("button", {
|
|
632
631
|
ref: F,
|
|
633
632
|
id: O,
|
|
634
633
|
type: "button",
|
|
635
634
|
name: S,
|
|
636
|
-
className: `${
|
|
635
|
+
className: `${K.trigger} ${K[v]}`,
|
|
637
636
|
disabled: m,
|
|
638
637
|
"aria-haspopup": "listbox",
|
|
639
638
|
"aria-expanded": A,
|
|
640
639
|
"aria-controls": k,
|
|
641
|
-
"aria-describedby":
|
|
640
|
+
"aria-describedby": V,
|
|
642
641
|
"aria-invalid": !!_,
|
|
643
642
|
onClick: () => j((e) => !e),
|
|
644
643
|
onKeyDown: (t) => {
|
|
@@ -646,21 +645,21 @@ var T = {
|
|
|
646
645
|
t.preventDefault(), j(!0);
|
|
647
646
|
let n = t.key === "ArrowDown" ? 1 : -1;
|
|
648
647
|
requestAnimationFrame(() => {
|
|
649
|
-
|
|
648
|
+
U(t.key === "ArrowDown" ? 0 : e.length - 1, n);
|
|
650
649
|
});
|
|
651
650
|
}
|
|
652
651
|
if (t.key === "Enter" && A) {
|
|
653
652
|
t.preventDefault();
|
|
654
653
|
let n = e.findIndex((e) => e.value === r);
|
|
655
|
-
|
|
654
|
+
U(n >= 0 ? n : 0, 1);
|
|
656
655
|
}
|
|
657
656
|
},
|
|
658
657
|
children: [/* @__PURE__ */ t("span", {
|
|
659
|
-
className: `${R ?
|
|
660
|
-
${
|
|
658
|
+
className: `${R ? K.value : K.placeholder}
|
|
659
|
+
${K[v]}`,
|
|
661
660
|
children: R?.label ?? a
|
|
662
661
|
}), /* @__PURE__ */ t("span", {
|
|
663
|
-
className: [
|
|
662
|
+
className: [K.chevron, A ? K.chevronOpen : ""].filter(Boolean).join(" "),
|
|
664
663
|
"aria-hidden": "true",
|
|
665
664
|
children: /* @__PURE__ */ t("svg", {
|
|
666
665
|
viewBox: "0 0 20 20",
|
|
@@ -676,38 +675,38 @@ var T = {
|
|
|
676
675
|
})]
|
|
677
676
|
})
|
|
678
677
|
}),
|
|
679
|
-
A && p(
|
|
678
|
+
A && p(te, document.body),
|
|
680
679
|
y && !_ && /* @__PURE__ */ t("span", {
|
|
681
|
-
id:
|
|
682
|
-
className:
|
|
680
|
+
id: z,
|
|
681
|
+
className: K.message,
|
|
683
682
|
children: y
|
|
684
683
|
}),
|
|
685
684
|
_ && /* @__PURE__ */ t("span", {
|
|
686
|
-
id:
|
|
687
|
-
className:
|
|
685
|
+
id: B,
|
|
686
|
+
className: K.error,
|
|
688
687
|
children: _
|
|
689
688
|
})
|
|
690
689
|
]
|
|
691
690
|
});
|
|
692
|
-
},
|
|
691
|
+
}, se = (e) => `${e.id}:${e.direction}`, ce = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
|
|
693
692
|
let c = e.flatMap((e) => [{
|
|
694
|
-
value:
|
|
693
|
+
value: se({
|
|
695
694
|
id: e.id,
|
|
696
695
|
direction: "asc"
|
|
697
696
|
}),
|
|
698
697
|
label: e.ascLabel ?? `${e.label} · по возрастанию`,
|
|
699
698
|
disabled: e.disabled
|
|
700
699
|
}, {
|
|
701
|
-
value:
|
|
700
|
+
value: se({
|
|
702
701
|
id: e.id,
|
|
703
702
|
direction: "desc"
|
|
704
703
|
}),
|
|
705
704
|
label: e.descLabel ?? `${e.label} · по убыванию`,
|
|
706
705
|
disabled: e.disabled
|
|
707
706
|
}]);
|
|
708
|
-
return /* @__PURE__ */ t(
|
|
707
|
+
return /* @__PURE__ */ t(oe, {
|
|
709
708
|
options: c,
|
|
710
|
-
value: n ?
|
|
709
|
+
value: n ? se(n) : "",
|
|
711
710
|
label: i,
|
|
712
711
|
placeholder: a,
|
|
713
712
|
disabled: o,
|
|
@@ -720,25 +719,80 @@ var T = {
|
|
|
720
719
|
});
|
|
721
720
|
}
|
|
722
721
|
});
|
|
723
|
-
},
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
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_osyhx_1",
|
|
747
|
+
tableWrap: "_tableWrap_osyhx_3",
|
|
748
|
+
table: "_table_osyhx_3",
|
|
749
|
+
sticky: "_sticky_osyhx_15",
|
|
750
|
+
sortButton: "_sortButton_osyhx_17",
|
|
751
|
+
state: "_state_osyhx_21",
|
|
752
|
+
cards: "_cards_osyhx_23",
|
|
753
|
+
mobileSort: "_mobileSort_osyhx_23",
|
|
754
|
+
card: "_card_osyhx_23",
|
|
755
|
+
spanTwo: "_spanTwo_osyhx_37",
|
|
756
|
+
clickableRow: "_clickableRow_osyhx_39",
|
|
757
|
+
pagination: "_pagination_osyhx_43",
|
|
758
|
+
paginationRange: "_paginationRange_osyhx_56",
|
|
759
|
+
paginationControls: "_paginationControls_osyhx_62",
|
|
760
|
+
pageNumbers: "_pageNumbers_osyhx_63",
|
|
761
|
+
pageButton: "_pageButton_osyhx_69",
|
|
762
|
+
ellipsis: "_ellipsis_osyhx_74",
|
|
763
|
+
previousIcon: "_previousIcon_osyhx_80",
|
|
764
|
+
nextIcon: "_nextIcon_osyhx_84",
|
|
765
|
+
default: "_default_osyhx_104",
|
|
766
|
+
tableOnMobile: "_tableOnMobile_osyhx_104",
|
|
767
|
+
wide: "_wide_osyhx_108"
|
|
768
|
+
}, de = g({
|
|
739
769
|
rowSortingFeature: h,
|
|
740
770
|
sortedRowModel: m()
|
|
741
|
-
}),
|
|
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) => {
|
|
742
796
|
let n = /* @__PURE__ */ new Set();
|
|
743
797
|
for (let t of e) {
|
|
744
798
|
if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
|
|
@@ -750,36 +804,36 @@ var T = {
|
|
|
750
804
|
for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
|
|
751
805
|
}
|
|
752
806
|
return null;
|
|
753
|
-
},
|
|
807
|
+
}, me = (e, t) => typeof e == "function" ? e(t) : t[e], he = (e) => {
|
|
754
808
|
if (e == null || e === "") return null;
|
|
755
809
|
let t = Date.parse(String(e));
|
|
756
810
|
return Number.isNaN(t) ? null : t;
|
|
757
|
-
},
|
|
758
|
-
let r =
|
|
811
|
+
}, ge = (e, t, n) => {
|
|
812
|
+
let r = he(e.getValue(n)), i = he(t.getValue(n));
|
|
759
813
|
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
760
|
-
},
|
|
814
|
+
}, _e = (e, t, n) => {
|
|
761
815
|
let r = e.getValue(n), i = t.getValue(n);
|
|
762
816
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
763
|
-
},
|
|
817
|
+
}, ve = (e, t, n) => {
|
|
764
818
|
let r = e.getValue(n), i = t.getValue(n);
|
|
765
819
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
766
|
-
},
|
|
820
|
+
}, ye = (e, t, n) => {
|
|
767
821
|
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
768
822
|
return r.localeCompare(i, void 0, {
|
|
769
823
|
numeric: !0,
|
|
770
824
|
sensitivity: "base"
|
|
771
825
|
});
|
|
772
|
-
},
|
|
826
|
+
}, be = (e) => {
|
|
773
827
|
switch (e) {
|
|
774
|
-
case "date": return
|
|
775
|
-
case "number": return
|
|
776
|
-
case "boolean": return
|
|
828
|
+
case "date": return ge;
|
|
829
|
+
case "number": return _e;
|
|
830
|
+
case "boolean": return ve;
|
|
777
831
|
case "text":
|
|
778
|
-
case void 0: return
|
|
832
|
+
case void 0: return ye;
|
|
779
833
|
case "custom": return;
|
|
780
834
|
}
|
|
781
|
-
},
|
|
782
|
-
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 = {
|
|
783
837
|
id: e.id,
|
|
784
838
|
accessorFn: t,
|
|
785
839
|
header: () => e.header,
|
|
@@ -791,63 +845,81 @@ var T = {
|
|
|
791
845
|
sortDescFirst: e.sortDescFirst
|
|
792
846
|
};
|
|
793
847
|
return n !== void 0 && (i.sortFn = n), i;
|
|
794
|
-
},
|
|
795
|
-
let [
|
|
796
|
-
|
|
797
|
-
|
|
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,
|
|
798
856
|
data: r,
|
|
799
|
-
state: { sorting:
|
|
857
|
+
state: { sorting: j },
|
|
800
858
|
onSortingChange: (e) => {
|
|
801
|
-
let t = typeof e == "function" ? e(
|
|
802
|
-
o === void 0 &&
|
|
859
|
+
let t = typeof e == "function" ? e(j) : e;
|
|
860
|
+
o === void 0 && O(t), A(0), c?.(t);
|
|
803
861
|
},
|
|
804
|
-
getRowId:
|
|
805
|
-
}),
|
|
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) => ({
|
|
806
869
|
id: e.id,
|
|
807
870
|
label: typeof e.header == "string" ? e.header : e.id
|
|
808
|
-
})),
|
|
809
|
-
|
|
810
|
-
a === "wide" ?
|
|
811
|
-
i ?
|
|
812
|
-
|
|
813
|
-
].filter(Boolean).join(" "),
|
|
814
|
-
return
|
|
815
|
-
|
|
816
|
-
|
|
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,
|
|
817
889
|
children: [
|
|
818
|
-
!i && !
|
|
819
|
-
className:
|
|
820
|
-
options:
|
|
821
|
-
value:
|
|
822
|
-
id:
|
|
823
|
-
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"
|
|
824
896
|
} : null,
|
|
825
|
-
onChange: (e) =>
|
|
897
|
+
onChange: (e) => L.setSorting([{
|
|
826
898
|
id: e.id,
|
|
827
899
|
desc: e.direction === "desc"
|
|
828
900
|
}])
|
|
829
901
|
}),
|
|
830
902
|
/* @__PURE__ */ t("div", {
|
|
831
|
-
className:
|
|
832
|
-
style: { maxHeight:
|
|
903
|
+
className: Y.tableWrap,
|
|
904
|
+
style: { maxHeight: b },
|
|
833
905
|
children: /* @__PURE__ */ n("table", {
|
|
834
|
-
className:
|
|
835
|
-
"aria-label":
|
|
906
|
+
className: Y.table,
|
|
907
|
+
"aria-label": m,
|
|
836
908
|
children: [
|
|
837
|
-
|
|
909
|
+
p && /* @__PURE__ */ t("caption", { children: p }),
|
|
838
910
|
/* @__PURE__ */ t("thead", {
|
|
839
|
-
className:
|
|
840
|
-
children:
|
|
911
|
+
className: y ? Y.sticky : "",
|
|
912
|
+
children: L.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
|
|
841
913
|
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
|
|
842
914
|
return /* @__PURE__ */ t("th", {
|
|
843
915
|
scope: "col",
|
|
844
916
|
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
845
917
|
children: /* @__PURE__ */ n("button", {
|
|
846
918
|
type: "button",
|
|
847
|
-
className:
|
|
919
|
+
className: Y.sortButton,
|
|
848
920
|
disabled: !i,
|
|
849
921
|
onClick: a,
|
|
850
|
-
children: [/* @__PURE__ */ t(
|
|
922
|
+
children: [/* @__PURE__ */ t(L.FlexRender, { header: e }), /* @__PURE__ */ t("span", {
|
|
851
923
|
"aria-hidden": "true",
|
|
852
924
|
children: r === "asc" ? "↑" : r === "desc" ? "↓" : "↕"
|
|
853
925
|
})]
|
|
@@ -855,66 +927,139 @@ var T = {
|
|
|
855
927
|
}, e.id);
|
|
856
928
|
}) }, e.id))
|
|
857
929
|
}),
|
|
858
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
859
|
-
colSpan:
|
|
860
|
-
children: /* @__PURE__ */ t(
|
|
861
|
-
}) }) :
|
|
862
|
-
className:
|
|
863
|
-
colSpan:
|
|
864
|
-
children:
|
|
865
|
-
}) }) :
|
|
866
|
-
className:
|
|
867
|
-
colSpan:
|
|
868
|
-
children:
|
|
869
|
-
}) }) :
|
|
870
|
-
className:
|
|
871
|
-
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),
|
|
872
944
|
onKeyDown: (t) => {
|
|
873
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
945
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), S?.(e.original));
|
|
874
946
|
},
|
|
875
|
-
tabIndex:
|
|
876
|
-
role:
|
|
877
|
-
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))
|
|
878
950
|
}, e.id)) })
|
|
879
951
|
]
|
|
880
952
|
})
|
|
881
953
|
}),
|
|
882
954
|
!i && /* @__PURE__ */ t("div", {
|
|
883
|
-
className:
|
|
955
|
+
className: Y.cards,
|
|
884
956
|
role: "list",
|
|
885
|
-
"aria-label":
|
|
886
|
-
children:
|
|
887
|
-
className:
|
|
888
|
-
children:
|
|
889
|
-
}) :
|
|
890
|
-
className:
|
|
891
|
-
children:
|
|
892
|
-
}) :
|
|
893
|
-
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", {
|
|
894
966
|
role: "listitem",
|
|
895
|
-
children:
|
|
896
|
-
row:
|
|
897
|
-
columns:
|
|
967
|
+
children: l({
|
|
968
|
+
row: e.original,
|
|
969
|
+
columns: P
|
|
898
970
|
})
|
|
899
|
-
},
|
|
900
|
-
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) ?? "");
|
|
901
973
|
return /* @__PURE__ */ n("article", {
|
|
902
974
|
role: "listitem",
|
|
903
|
-
className:
|
|
975
|
+
className: Y.card,
|
|
904
976
|
children: [
|
|
905
|
-
/* @__PURE__ */ t("h3", { children:
|
|
906
|
-
/* @__PURE__ */ t("dl", { children:
|
|
907
|
-
className: e.mobile?.mobileSpan === 2 ?
|
|
908
|
-
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) })]
|
|
909
981
|
}, e.id)) }),
|
|
910
|
-
|
|
982
|
+
r.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: o(e) }, e.id))
|
|
911
983
|
]
|
|
912
|
-
},
|
|
984
|
+
}, e.id);
|
|
913
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
|
+
})]
|
|
914
1059
|
})
|
|
915
1060
|
]
|
|
916
1061
|
});
|
|
917
|
-
},
|
|
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 }) => {
|
|
918
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;
|
|
919
1064
|
s(() => {
|
|
920
1065
|
let e = (e) => {
|
|
@@ -931,30 +1076,30 @@ var T = {
|
|
|
931
1076
|
let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
|
|
932
1077
|
i?.(n, e.filter((e) => n.includes(e.value))), v && (C(!1), T.current?.focus());
|
|
933
1078
|
}, M = (t, n) => {
|
|
934
|
-
let r =
|
|
1079
|
+
let r = J(e, t, n);
|
|
935
1080
|
E.current[r]?.focus(), E.current[r]?.scrollIntoView({ block: "nearest" });
|
|
936
1081
|
};
|
|
937
1082
|
return /* @__PURE__ */ n("div", {
|
|
938
1083
|
ref: w,
|
|
939
1084
|
className: [
|
|
940
|
-
|
|
941
|
-
p ?
|
|
1085
|
+
K.wrapper,
|
|
1086
|
+
p ? K.errorState : "",
|
|
942
1087
|
h
|
|
943
1088
|
].filter(Boolean).join(" "),
|
|
944
1089
|
children: [
|
|
945
1090
|
l && /* @__PURE__ */ t("label", {
|
|
946
1091
|
htmlFor: x,
|
|
947
|
-
className:
|
|
1092
|
+
className: K.label,
|
|
948
1093
|
children: l
|
|
949
1094
|
}),
|
|
950
1095
|
/* @__PURE__ */ n("div", {
|
|
951
|
-
className:
|
|
1096
|
+
className: K.container,
|
|
952
1097
|
children: [/* @__PURE__ */ n("button", {
|
|
953
1098
|
ref: T,
|
|
954
1099
|
id: x,
|
|
955
1100
|
type: "button",
|
|
956
1101
|
name: g,
|
|
957
|
-
className:
|
|
1102
|
+
className: K.trigger,
|
|
958
1103
|
disabled: o,
|
|
959
1104
|
"aria-haspopup": "listbox",
|
|
960
1105
|
"aria-expanded": S,
|
|
@@ -970,16 +1115,16 @@ var T = {
|
|
|
970
1115
|
}
|
|
971
1116
|
},
|
|
972
1117
|
children: [/* @__PURE__ */ t("span", {
|
|
973
|
-
className: D.length ?
|
|
1118
|
+
className: D.length ? K.value : K.placeholder,
|
|
974
1119
|
children: O || a
|
|
975
1120
|
}), /* @__PURE__ */ t("span", {
|
|
976
|
-
className: `${
|
|
1121
|
+
className: `${K.chevron} ${S ? K.chevronOpen : ""}`,
|
|
977
1122
|
"aria-hidden": "true",
|
|
978
1123
|
children: "⌄"
|
|
979
1124
|
})]
|
|
980
1125
|
}), S && /* @__PURE__ */ t("ul", {
|
|
981
1126
|
id: `${x}-listbox`,
|
|
982
|
-
className:
|
|
1127
|
+
className: K.menu,
|
|
983
1128
|
role: "listbox",
|
|
984
1129
|
"aria-label": l,
|
|
985
1130
|
"aria-multiselectable": "true",
|
|
@@ -996,7 +1141,7 @@ var T = {
|
|
|
996
1141
|
role: "option",
|
|
997
1142
|
"aria-selected": o,
|
|
998
1143
|
disabled: i.disabled,
|
|
999
|
-
className: `${
|
|
1144
|
+
className: `${K.option} ${o ? K.selected : ""}`,
|
|
1000
1145
|
onClick: () => j(i),
|
|
1001
1146
|
onKeyDown: (t) => {
|
|
1002
1147
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
@@ -1022,40 +1167,17 @@ var T = {
|
|
|
1022
1167
|
}),
|
|
1023
1168
|
m && !p && /* @__PURE__ */ t("span", {
|
|
1024
1169
|
id: k,
|
|
1025
|
-
className:
|
|
1170
|
+
className: K.message,
|
|
1026
1171
|
children: m
|
|
1027
1172
|
}),
|
|
1028
1173
|
p && /* @__PURE__ */ t("span", {
|
|
1029
1174
|
id: A,
|
|
1030
|
-
className:
|
|
1175
|
+
className: K.error,
|
|
1031
1176
|
children: p
|
|
1032
1177
|
})
|
|
1033
1178
|
]
|
|
1034
1179
|
});
|
|
1035
|
-
},
|
|
1036
|
-
approve: "M4 12l5 5L20 6",
|
|
1037
|
-
reject: "M5 5l14 14M19 5L5 19",
|
|
1038
|
-
edit: "M4 20h4L19 9l-4-4L4 16v4z",
|
|
1039
|
-
cross: "M5 5l14 14M19 5L5 19",
|
|
1040
|
-
chevron: "M6 9l6 6 6-6",
|
|
1041
|
-
basket: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3",
|
|
1042
|
-
info: "M12 10v7m0-10v.01",
|
|
1043
|
-
warning: "M12 4L3 20h18L12 4zm0 5v5m0 3v.01"
|
|
1044
|
-
}, Ce = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
|
|
1045
|
-
viewBox: "0 0 24 24",
|
|
1046
|
-
width: i,
|
|
1047
|
-
height: a,
|
|
1048
|
-
fill: "none",
|
|
1049
|
-
stroke: "currentColor",
|
|
1050
|
-
strokeWidth: "1.8",
|
|
1051
|
-
strokeLinecap: "round",
|
|
1052
|
-
strokeLinejoin: "round",
|
|
1053
|
-
role: r ? "img" : void 0,
|
|
1054
|
-
"aria-hidden": !r || void 0,
|
|
1055
|
-
focusable: "false",
|
|
1056
|
-
...o,
|
|
1057
|
-
children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: Se[e] })]
|
|
1058
|
-
}), we = {
|
|
1180
|
+
}, we = {
|
|
1059
1181
|
root: "_root_1y2s8_1",
|
|
1060
1182
|
header: "_header_1y2s8_21",
|
|
1061
1183
|
title: "_title_1y2s8_41",
|
|
@@ -1094,22 +1216,22 @@ var T = {
|
|
|
1094
1216
|
children: r
|
|
1095
1217
|
})]
|
|
1096
1218
|
});
|
|
1097
|
-
},
|
|
1098
|
-
wrapper: "
|
|
1099
|
-
control: "
|
|
1100
|
-
input: "
|
|
1101
|
-
disabledText: "
|
|
1102
|
-
sm: "
|
|
1103
|
-
md: "
|
|
1104
|
-
lg: "
|
|
1105
|
-
inputError: "
|
|
1106
|
-
trailingAction: "
|
|
1219
|
+
}, X = {
|
|
1220
|
+
wrapper: "_wrapper_kz2dd_1",
|
|
1221
|
+
control: "_control_kz2dd_3",
|
|
1222
|
+
input: "_input_kz2dd_5",
|
|
1223
|
+
disabledText: "_disabledText_kz2dd_5",
|
|
1224
|
+
sm: "_sm_kz2dd_41",
|
|
1225
|
+
md: "_md_kz2dd_53",
|
|
1226
|
+
lg: "_lg_kz2dd_65",
|
|
1227
|
+
inputError: "_inputError_kz2dd_77",
|
|
1228
|
+
trailingAction: "_trailingAction_kz2dd_79"
|
|
1107
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 }) => {
|
|
1108
|
-
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;
|
|
1109
1231
|
return s(() => {
|
|
1110
1232
|
C || P(!1);
|
|
1111
1233
|
}, [C]), /* @__PURE__ */ n("div", {
|
|
1112
|
-
className: `${
|
|
1234
|
+
className: `${X.wrapper} ${g}`,
|
|
1113
1235
|
children: [
|
|
1114
1236
|
p && /* @__PURE__ */ t(E, {
|
|
1115
1237
|
htmlFor: j,
|
|
@@ -1119,17 +1241,17 @@ var T = {
|
|
|
1119
1241
|
}),
|
|
1120
1242
|
o && u ? /* @__PURE__ */ t("div", {
|
|
1121
1243
|
id: j,
|
|
1122
|
-
className:
|
|
1244
|
+
className: X.disabledText,
|
|
1123
1245
|
"aria-describedby": R,
|
|
1124
1246
|
children: L || a
|
|
1125
1247
|
}) : /* @__PURE__ */ n("div", {
|
|
1126
|
-
className:
|
|
1248
|
+
className: X.control,
|
|
1127
1249
|
children: [
|
|
1128
1250
|
/* @__PURE__ */ t("input", {
|
|
1129
1251
|
ref: M,
|
|
1130
1252
|
id: j,
|
|
1131
1253
|
name: _,
|
|
1132
|
-
type:
|
|
1254
|
+
type: z,
|
|
1133
1255
|
value: L,
|
|
1134
1256
|
placeholder: a,
|
|
1135
1257
|
disabled: o,
|
|
@@ -1137,7 +1259,7 @@ var T = {
|
|
|
1137
1259
|
required: x,
|
|
1138
1260
|
"aria-invalid": !!m,
|
|
1139
1261
|
"aria-describedby": R,
|
|
1140
|
-
className: `${
|
|
1262
|
+
className: `${X.input} ${X[y]} ${m ? X.inputError : ""}`,
|
|
1141
1263
|
onChange: (e) => {
|
|
1142
1264
|
if (i === "number" && !C) {
|
|
1143
1265
|
let t = e.target.value === "" ? "" : Number(e.target.value);
|
|
@@ -1153,7 +1275,7 @@ var T = {
|
|
|
1153
1275
|
}),
|
|
1154
1276
|
C && /* @__PURE__ */ t("button", {
|
|
1155
1277
|
type: "button",
|
|
1156
|
-
className:
|
|
1278
|
+
className: X.trailingAction,
|
|
1157
1279
|
disabled: o,
|
|
1158
1280
|
"aria-label": N ? w : T,
|
|
1159
1281
|
"aria-pressed": N,
|
|
@@ -1174,7 +1296,7 @@ var T = {
|
|
|
1174
1296
|
}),
|
|
1175
1297
|
!C && b && L && !o && !l && /* @__PURE__ */ t("button", {
|
|
1176
1298
|
type: "button",
|
|
1177
|
-
className:
|
|
1299
|
+
className: X.trailingAction,
|
|
1178
1300
|
"aria-label": "Очистить поле",
|
|
1179
1301
|
onClick: () => {
|
|
1180
1302
|
let e = M.current;
|
|
@@ -1272,7 +1394,7 @@ var T = {
|
|
|
1272
1394
|
onChange: (t) => d(e.id, t)
|
|
1273
1395
|
}, e.id);
|
|
1274
1396
|
}
|
|
1275
|
-
if (e.type === "dropdown") return /* @__PURE__ */ t(
|
|
1397
|
+
if (e.type === "dropdown") return /* @__PURE__ */ t(oe, {
|
|
1276
1398
|
label: e.label,
|
|
1277
1399
|
hint: e.hint,
|
|
1278
1400
|
placeholder: e.placeholder,
|
|
@@ -1281,7 +1403,7 @@ var T = {
|
|
|
1281
1403
|
disabled: n,
|
|
1282
1404
|
onChange: (t) => d(e.id, t)
|
|
1283
1405
|
}, e.id);
|
|
1284
|
-
if (e.type === "multiple") return /* @__PURE__ */ t(
|
|
1406
|
+
if (e.type === "multiple") return /* @__PURE__ */ t(Ce, {
|
|
1285
1407
|
label: e.label,
|
|
1286
1408
|
hint: e.hint,
|
|
1287
1409
|
placeholder: e.placeholder,
|
|
@@ -1307,7 +1429,7 @@ var T = {
|
|
|
1307
1429
|
from: null,
|
|
1308
1430
|
to: null
|
|
1309
1431
|
};
|
|
1310
|
-
return /* @__PURE__ */ t(
|
|
1432
|
+
return /* @__PURE__ */ t(te, {
|
|
1311
1433
|
hint: e.hint,
|
|
1312
1434
|
mode: e.mode,
|
|
1313
1435
|
min: e.min,
|
|
@@ -1332,7 +1454,7 @@ var T = {
|
|
|
1332
1454
|
})]
|
|
1333
1455
|
})]
|
|
1334
1456
|
});
|
|
1335
|
-
},
|
|
1457
|
+
}, Z = {
|
|
1336
1458
|
wrapper: "_wrapper_1ymdr_1",
|
|
1337
1459
|
dropzone: "_dropzone_1ymdr_3",
|
|
1338
1460
|
dragActive: "_dragActive_1ymdr_5",
|
|
@@ -1361,7 +1483,7 @@ var T = {
|
|
|
1361
1483
|
})), d = d.slice(0, u)), t.length && T?.(t), c.length && i?.(d), A.current && (A.current.value = "");
|
|
1362
1484
|
};
|
|
1363
1485
|
return /* @__PURE__ */ n("div", {
|
|
1364
|
-
className: `${
|
|
1486
|
+
className: `${Z.wrapper} ${b}`,
|
|
1365
1487
|
children: [
|
|
1366
1488
|
u && /* @__PURE__ */ t(E, {
|
|
1367
1489
|
htmlFor: k,
|
|
@@ -1370,7 +1492,7 @@ var T = {
|
|
|
1370
1492
|
children: u
|
|
1371
1493
|
}),
|
|
1372
1494
|
/* @__PURE__ */ n("div", {
|
|
1373
|
-
className: `${
|
|
1495
|
+
className: `${Z.dropzone} ${M ? Z.dragActive : ""} ${g ? Z.disabled : ""} ${m ? Z.error : ""}`,
|
|
1374
1496
|
onDragEnter: (e) => {
|
|
1375
1497
|
e.preventDefault(), L && ++j.current === 1 && N(!0);
|
|
1376
1498
|
},
|
|
@@ -1385,7 +1507,7 @@ var T = {
|
|
|
1385
1507
|
ref: A,
|
|
1386
1508
|
id: k,
|
|
1387
1509
|
name: v,
|
|
1388
|
-
className:
|
|
1510
|
+
className: Z.nativeInput,
|
|
1389
1511
|
type: "file",
|
|
1390
1512
|
multiple: a,
|
|
1391
1513
|
accept: o,
|
|
@@ -1396,18 +1518,18 @@ var T = {
|
|
|
1396
1518
|
onChange: (e) => R(Array.from(e.target.files ?? []))
|
|
1397
1519
|
}), r.length ? /* @__PURE__ */ n(e, { children: [
|
|
1398
1520
|
/* @__PURE__ */ t("ul", {
|
|
1399
|
-
className:
|
|
1521
|
+
className: Z.files,
|
|
1400
1522
|
"aria-live": "polite",
|
|
1401
1523
|
children: r.map((e, a) => /* @__PURE__ */ n("li", {
|
|
1402
|
-
className:
|
|
1524
|
+
className: Z.file,
|
|
1403
1525
|
children: [
|
|
1404
1526
|
/* @__PURE__ */ t("span", {
|
|
1405
|
-
className:
|
|
1527
|
+
className: Z.fileName,
|
|
1406
1528
|
title: e.name,
|
|
1407
1529
|
children: e.name
|
|
1408
1530
|
}),
|
|
1409
1531
|
/* @__PURE__ */ t("span", {
|
|
1410
|
-
className:
|
|
1532
|
+
className: Z.fileSize,
|
|
1411
1533
|
children: Me(e.size)
|
|
1412
1534
|
}),
|
|
1413
1535
|
L && /* @__PURE__ */ t(w, {
|
|
@@ -1421,28 +1543,28 @@ var T = {
|
|
|
1421
1543
|
}, je(e)))
|
|
1422
1544
|
}),
|
|
1423
1545
|
L && (a || r.length === 0) && /* @__PURE__ */ t(w, {
|
|
1424
|
-
className:
|
|
1546
|
+
className: Z.browseButton,
|
|
1425
1547
|
size: "sm",
|
|
1426
1548
|
onClick: () => A.current?.click(),
|
|
1427
1549
|
children: C
|
|
1428
1550
|
}),
|
|
1429
1551
|
L && !a && /* @__PURE__ */ t(w, {
|
|
1430
|
-
className:
|
|
1552
|
+
className: Z.browseButton,
|
|
1431
1553
|
size: "sm",
|
|
1432
1554
|
onClick: () => A.current?.click(),
|
|
1433
1555
|
children: S
|
|
1434
1556
|
})
|
|
1435
1557
|
] }) : /* @__PURE__ */ n("div", {
|
|
1436
|
-
className:
|
|
1558
|
+
className: Z.empty,
|
|
1437
1559
|
children: [
|
|
1438
1560
|
/* @__PURE__ */ t("span", {
|
|
1439
|
-
className:
|
|
1561
|
+
className: Z.uploadIcon,
|
|
1440
1562
|
"aria-hidden": "true",
|
|
1441
1563
|
children: "↑"
|
|
1442
1564
|
}),
|
|
1443
1565
|
/* @__PURE__ */ t("strong", { children: M ? "Отпустите файлы здесь" : x }),
|
|
1444
1566
|
!M && L && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(w, {
|
|
1445
|
-
className:
|
|
1567
|
+
className: Z.browseButton,
|
|
1446
1568
|
onClick: () => A.current?.click(),
|
|
1447
1569
|
children: S
|
|
1448
1570
|
})] })
|
|
@@ -1461,7 +1583,7 @@ var T = {
|
|
|
1461
1583
|
})
|
|
1462
1584
|
]
|
|
1463
1585
|
});
|
|
1464
|
-
}, Fe = 0,
|
|
1586
|
+
}, Fe = 0, Q = v((e) => ({
|
|
1465
1587
|
modals: [],
|
|
1466
1588
|
openModal: (t, n = {}, r = {}) => {
|
|
1467
1589
|
Fe += 1;
|
|
@@ -1477,7 +1599,7 @@ var T = {
|
|
|
1477
1599
|
closeModal: (t) => e((e) => ({ modals: e.modals.filter((e) => e.id !== t) })),
|
|
1478
1600
|
closeTopModal: () => e((e) => ({ modals: e.modals.slice(0, -1) })),
|
|
1479
1601
|
closeAllModals: () => e({ modals: [] })
|
|
1480
|
-
})), Ie = () =>
|
|
1602
|
+
})), Ie = () => Q.setState({ modals: [] }), Le = {
|
|
1481
1603
|
layer: "_layer_1nb2z_1",
|
|
1482
1604
|
backdrop: "_backdrop_1nb2z_3",
|
|
1483
1605
|
panel: "_panel_1nb2z_5",
|
|
@@ -1485,14 +1607,14 @@ var T = {
|
|
|
1485
1607
|
title: "_title_1nb2z_11",
|
|
1486
1608
|
description: "_description_1nb2z_13",
|
|
1487
1609
|
content: "_content_1nb2z_15"
|
|
1488
|
-
},
|
|
1489
|
-
let f = c(), p = c(), m = d(null), h =
|
|
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);
|
|
1490
1612
|
return s(() => {
|
|
1491
1613
|
let e = document.activeElement, t = m.current;
|
|
1492
|
-
return (t?.querySelector(
|
|
1614
|
+
return (t?.querySelector(Re) ?? t)?.focus(), () => e?.focus();
|
|
1493
1615
|
}, []), /* @__PURE__ */ n("div", {
|
|
1494
1616
|
ref: m,
|
|
1495
|
-
className: `${
|
|
1617
|
+
className: `${Le.panel} ${l}`,
|
|
1496
1618
|
role: u,
|
|
1497
1619
|
"aria-modal": "true",
|
|
1498
1620
|
"aria-labelledby": r ? f : void 0,
|
|
@@ -1500,7 +1622,7 @@ var T = {
|
|
|
1500
1622
|
tabIndex: -1,
|
|
1501
1623
|
onKeyDown: (e) => {
|
|
1502
1624
|
if (e.key !== "Tab") return;
|
|
1503
|
-
let t = Array.from(m.current?.querySelectorAll(
|
|
1625
|
+
let t = Array.from(m.current?.querySelectorAll(Re) ?? []);
|
|
1504
1626
|
if (!t.length) {
|
|
1505
1627
|
e.preventDefault();
|
|
1506
1628
|
return;
|
|
@@ -1510,10 +1632,10 @@ var T = {
|
|
|
1510
1632
|
},
|
|
1511
1633
|
children: [
|
|
1512
1634
|
(r || o) && /* @__PURE__ */ n("header", {
|
|
1513
|
-
className:
|
|
1635
|
+
className: Le.header,
|
|
1514
1636
|
children: [r && /* @__PURE__ */ t("h2", {
|
|
1515
1637
|
id: f,
|
|
1516
|
-
className:
|
|
1638
|
+
className: Le.title,
|
|
1517
1639
|
children: r
|
|
1518
1640
|
}), /* @__PURE__ */ t(w, {
|
|
1519
1641
|
variant: "empty",
|
|
@@ -1536,31 +1658,31 @@ var T = {
|
|
|
1536
1658
|
}),
|
|
1537
1659
|
i && /* @__PURE__ */ t("p", {
|
|
1538
1660
|
id: p,
|
|
1539
|
-
className:
|
|
1661
|
+
className: Le.description,
|
|
1540
1662
|
children: i
|
|
1541
1663
|
}),
|
|
1542
1664
|
/* @__PURE__ */ t("div", {
|
|
1543
|
-
className:
|
|
1665
|
+
className: Le.content,
|
|
1544
1666
|
children: e
|
|
1545
1667
|
})
|
|
1546
1668
|
]
|
|
1547
1669
|
});
|
|
1548
|
-
},
|
|
1549
|
-
let n =
|
|
1670
|
+
}, Be = ({ registry: e }) => {
|
|
1671
|
+
let n = Q((e) => e.modals), r = Q((e) => e.closeModal), i = Q((e) => e.closeAllModals);
|
|
1550
1672
|
return s(() => {
|
|
1551
1673
|
let e = (e) => {
|
|
1552
1674
|
if (e.key !== "Escape") return;
|
|
1553
|
-
let t =
|
|
1675
|
+
let t = Q.getState().modals.at(-1);
|
|
1554
1676
|
t?.closeOnEscape && r(t.id);
|
|
1555
1677
|
};
|
|
1556
1678
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1557
1679
|
}, [r]), !n.length || typeof document > "u" ? null : p(/* @__PURE__ */ t("div", {
|
|
1558
|
-
className:
|
|
1680
|
+
className: Le.layer,
|
|
1559
1681
|
"aria-label": "Модальные окна",
|
|
1560
1682
|
children: n.map((a, o) => {
|
|
1561
1683
|
let s = e[a.name];
|
|
1562
1684
|
return s ? /* @__PURE__ */ t("div", {
|
|
1563
|
-
className:
|
|
1685
|
+
className: Le.backdrop,
|
|
1564
1686
|
"aria-hidden": o !== n.length - 1 || void 0,
|
|
1565
1687
|
onMouseDown: (e) => {
|
|
1566
1688
|
e.target === e.currentTarget && a.closeOnBackdrop && r(a.id);
|
|
@@ -1574,31 +1696,31 @@ var T = {
|
|
|
1574
1696
|
}, a.id) : null;
|
|
1575
1697
|
})
|
|
1576
1698
|
}), document.body);
|
|
1577
|
-
},
|
|
1578
|
-
let o =
|
|
1699
|
+
}, Ve = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
|
|
1700
|
+
let o = Q((e) => e.modals.length);
|
|
1579
1701
|
return s(() => {
|
|
1580
1702
|
if (!a || o === 0) return;
|
|
1581
1703
|
let e = document.body.style.overflow;
|
|
1582
1704
|
return document.body.style.overflow = "hidden", () => {
|
|
1583
1705
|
document.body.style.overflow = e;
|
|
1584
1706
|
};
|
|
1585
|
-
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(
|
|
1586
|
-
},
|
|
1707
|
+
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Be, { registry: r })] });
|
|
1708
|
+
}, He = (e) => e, Ue = {
|
|
1587
1709
|
message: "_message_1vtru_1",
|
|
1588
1710
|
actions: "_actions_1vtru_3"
|
|
1589
|
-
},
|
|
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 }) => {
|
|
1590
1712
|
let u = (e) => {
|
|
1591
|
-
|
|
1713
|
+
We.get(l)?.(e), We.delete(l), r();
|
|
1592
1714
|
};
|
|
1593
|
-
return /* @__PURE__ */ n(
|
|
1715
|
+
return /* @__PURE__ */ n(ze, {
|
|
1594
1716
|
modalId: e,
|
|
1595
1717
|
title: i,
|
|
1596
1718
|
role: "alertdialog",
|
|
1597
1719
|
children: [/* @__PURE__ */ t("p", {
|
|
1598
|
-
className:
|
|
1720
|
+
className: Ue.message,
|
|
1599
1721
|
children: a
|
|
1600
1722
|
}), /* @__PURE__ */ n("div", {
|
|
1601
|
-
className:
|
|
1723
|
+
className: Ue.actions,
|
|
1602
1724
|
children: [/* @__PURE__ */ t(w, {
|
|
1603
1725
|
variant: "outline",
|
|
1604
1726
|
onClick: () => u(!1),
|
|
@@ -1610,55 +1732,55 @@ var T = {
|
|
|
1610
1732
|
})]
|
|
1611
1733
|
})]
|
|
1612
1734
|
});
|
|
1613
|
-
},
|
|
1735
|
+
}, qe = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(ze, {
|
|
1614
1736
|
modalId: e,
|
|
1615
1737
|
title: i,
|
|
1616
1738
|
role: "alertdialog",
|
|
1617
1739
|
children: [/* @__PURE__ */ t("p", {
|
|
1618
|
-
className:
|
|
1740
|
+
className: Ue.message,
|
|
1619
1741
|
children: a
|
|
1620
1742
|
}), /* @__PURE__ */ t("div", {
|
|
1621
|
-
className:
|
|
1743
|
+
className: Ue.actions,
|
|
1622
1744
|
children: /* @__PURE__ */ t(w, {
|
|
1623
1745
|
onClick: r,
|
|
1624
1746
|
children: o
|
|
1625
1747
|
})
|
|
1626
1748
|
})]
|
|
1627
|
-
}),
|
|
1628
|
-
ConfirmModal:
|
|
1629
|
-
ErrorModal:
|
|
1630
|
-
}),
|
|
1631
|
-
let e =
|
|
1749
|
+
}), Je = He({
|
|
1750
|
+
ConfirmModal: Ke,
|
|
1751
|
+
ErrorModal: qe
|
|
1752
|
+
}), Ye = () => {
|
|
1753
|
+
let e = Q((e) => e.openModal);
|
|
1632
1754
|
return (t = {}) => new Promise((n) => {
|
|
1633
|
-
|
|
1634
|
-
let r = `confirm-${
|
|
1635
|
-
|
|
1755
|
+
Ge += 1;
|
|
1756
|
+
let r = `confirm-${Ge}`;
|
|
1757
|
+
We.set(r, n), e("ConfirmModal", {
|
|
1636
1758
|
...t,
|
|
1637
1759
|
requestId: r
|
|
1638
1760
|
}, { closeOnEscape: !1 });
|
|
1639
1761
|
});
|
|
1640
|
-
},
|
|
1641
|
-
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);
|
|
1642
1764
|
return { showError: (t, n) => e("ErrorModal", {
|
|
1643
1765
|
title: n,
|
|
1644
|
-
message:
|
|
1766
|
+
message: Xe(t)
|
|
1645
1767
|
}) };
|
|
1646
|
-
},
|
|
1647
|
-
let e =
|
|
1768
|
+
}, Qe = v(() => ({})), $e = v(() => ({})), et = () => {
|
|
1769
|
+
let e = Q((e) => e.modals), t = Q((e) => e.openModal);
|
|
1648
1770
|
return {
|
|
1649
1771
|
openModal: (e, n = {}, r) => t(e, n, r),
|
|
1650
|
-
closeModal:
|
|
1651
|
-
closeTopModal:
|
|
1652
|
-
closeAllModals:
|
|
1772
|
+
closeModal: Q((e) => e.closeModal),
|
|
1773
|
+
closeTopModal: Q((e) => e.closeTopModal),
|
|
1774
|
+
closeAllModals: Q((e) => e.closeAllModals),
|
|
1653
1775
|
isOpen: (t) => e.some((e) => e.name === t),
|
|
1654
1776
|
count: e.length
|
|
1655
1777
|
};
|
|
1656
|
-
},
|
|
1657
|
-
className: `${
|
|
1778
|
+
}, tt = { root: "_root_fvxpr_1" }, nt = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
|
|
1779
|
+
className: `${tt.root} ${r}`,
|
|
1658
1780
|
role: "status",
|
|
1659
1781
|
"aria-label": e,
|
|
1660
1782
|
children: [/* @__PURE__ */ t(S, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
|
|
1661
|
-
}),
|
|
1783
|
+
}), rt = {
|
|
1662
1784
|
viewport: "_viewport_15mi5_1",
|
|
1663
1785
|
"top-right": "_top-right_15mi5_3",
|
|
1664
1786
|
"top-left": "_top-left_15mi5_5",
|
|
@@ -1671,7 +1793,7 @@ var T = {
|
|
|
1671
1793
|
success: "_success_15mi5_19",
|
|
1672
1794
|
warning: "_warning_15mi5_21",
|
|
1673
1795
|
error: "_error_15mi5_23"
|
|
1674
|
-
},
|
|
1796
|
+
}, it = (e) => {
|
|
1675
1797
|
let r;
|
|
1676
1798
|
return r = e === "info" ? /* @__PURE__ */ n("svg", {
|
|
1677
1799
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1757,7 +1879,7 @@ var T = {
|
|
|
1757
1879
|
/* @__PURE__ */ t("path", { d: "m9 9 6 6" })
|
|
1758
1880
|
]
|
|
1759
1881
|
}), r;
|
|
1760
|
-
},
|
|
1882
|
+
}, at = ({ toast: e, onClose: r }) => {
|
|
1761
1883
|
let [i, a] = f(!1), o = d(e.duration), c = d(Date.now());
|
|
1762
1884
|
return s(() => {
|
|
1763
1885
|
if (i || e.duration <= 0) return;
|
|
@@ -1772,7 +1894,7 @@ var T = {
|
|
|
1772
1894
|
e.duration,
|
|
1773
1895
|
e.id
|
|
1774
1896
|
]), /* @__PURE__ */ n("article", {
|
|
1775
|
-
className: `${
|
|
1897
|
+
className: `${rt.toast} ${rt[e.variant]}`,
|
|
1776
1898
|
role: e.variant === "error" ? "alert" : "status",
|
|
1777
1899
|
"aria-live": e.variant === "error" ? "assertive" : "polite",
|
|
1778
1900
|
onMouseEnter: () => a(!0),
|
|
@@ -1780,9 +1902,9 @@ var T = {
|
|
|
1780
1902
|
onFocus: () => a(!0),
|
|
1781
1903
|
onBlur: () => a(!1),
|
|
1782
1904
|
children: [
|
|
1783
|
-
/* @__PURE__ */ t("div", { children:
|
|
1905
|
+
/* @__PURE__ */ t("div", { children: it(e.variant) }),
|
|
1784
1906
|
/* @__PURE__ */ n("div", {
|
|
1785
|
-
className:
|
|
1907
|
+
className: rt.body,
|
|
1786
1908
|
children: [
|
|
1787
1909
|
e.title && /* @__PURE__ */ t("strong", { children: e.title }),
|
|
1788
1910
|
/* @__PURE__ */ t("div", { children: e.message }),
|
|
@@ -1816,11 +1938,11 @@ var T = {
|
|
|
1816
1938
|
})
|
|
1817
1939
|
]
|
|
1818
1940
|
});
|
|
1819
|
-
},
|
|
1941
|
+
}, ot = 0, st = v((e) => ({
|
|
1820
1942
|
toasts: [],
|
|
1821
1943
|
showToast: (t) => {
|
|
1822
|
-
|
|
1823
|
-
let n = `ds-toast-${
|
|
1944
|
+
ot += 1;
|
|
1945
|
+
let n = `ds-toast-${ot}`;
|
|
1824
1946
|
return e((e) => ({ toasts: [...e.toasts, {
|
|
1825
1947
|
variant: "info",
|
|
1826
1948
|
duration: 5e3,
|
|
@@ -1831,18 +1953,18 @@ var T = {
|
|
|
1831
1953
|
},
|
|
1832
1954
|
removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
|
|
1833
1955
|
clearToasts: () => e({ toasts: [] })
|
|
1834
|
-
})),
|
|
1835
|
-
let n =
|
|
1956
|
+
})), ct = () => st.setState({ toasts: [] }), lt = ({ position: e = "top-right" }) => {
|
|
1957
|
+
let n = st((e) => e.toasts), r = st((e) => e.removeToast);
|
|
1836
1958
|
return /* @__PURE__ */ t("div", {
|
|
1837
|
-
className: `${
|
|
1959
|
+
className: `${rt.viewport} ${rt[e]}`,
|
|
1838
1960
|
"aria-label": "Уведомления",
|
|
1839
|
-
children: n.map((e) => /* @__PURE__ */ t(
|
|
1961
|
+
children: n.map((e) => /* @__PURE__ */ t(at, {
|
|
1840
1962
|
toast: e,
|
|
1841
1963
|
onClose: r
|
|
1842
1964
|
}, e.id))
|
|
1843
1965
|
});
|
|
1844
|
-
},
|
|
1845
|
-
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({
|
|
1846
1968
|
...t,
|
|
1847
1969
|
variant: "info"
|
|
1848
1970
|
}), [e]), i = o((t) => e({
|
|
@@ -1872,7 +1994,7 @@ var T = {
|
|
|
1872
1994
|
i,
|
|
1873
1995
|
a
|
|
1874
1996
|
]);
|
|
1875
|
-
},
|
|
1997
|
+
}, dt = {
|
|
1876
1998
|
root: "_root_s9o0g_1",
|
|
1877
1999
|
tooltip: "_tooltip_s9o0g_3",
|
|
1878
2000
|
"ds-tooltip-in": "_ds-tooltip-in_s9o0g_1",
|
|
@@ -1880,7 +2002,7 @@ var T = {
|
|
|
1880
2002
|
bottom: "_bottom_s9o0g_7",
|
|
1881
2003
|
left: "_left_s9o0g_9",
|
|
1882
2004
|
right: "_right_s9o0g_11"
|
|
1883
|
-
},
|
|
2005
|
+
}, ft = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: u = !1, maxWidth: p = 280, className: m = "" }) => {
|
|
1884
2006
|
let h = c(), [g, _] = f(!1), v = d(null), y = () => {
|
|
1885
2007
|
u || !e || (v.current = setTimeout(() => _(!0), l));
|
|
1886
2008
|
}, b = () => {
|
|
@@ -1902,29 +2024,29 @@ var T = {
|
|
|
1902
2024
|
onBlur: b
|
|
1903
2025
|
});
|
|
1904
2026
|
return /* @__PURE__ */ n("span", {
|
|
1905
|
-
className: `${
|
|
2027
|
+
className: `${dt.root} ${m}`,
|
|
1906
2028
|
onPointerDown: g ? b : y,
|
|
1907
2029
|
children: [x, g && /* @__PURE__ */ t("span", {
|
|
1908
2030
|
id: h,
|
|
1909
2031
|
role: "tooltip",
|
|
1910
|
-
className: `${
|
|
2032
|
+
className: `${dt.tooltip} ${dt[o]}`,
|
|
1911
2033
|
style: { maxWidth: p },
|
|
1912
2034
|
children: e
|
|
1913
2035
|
})]
|
|
1914
2036
|
});
|
|
1915
|
-
},
|
|
2037
|
+
}, pt = {
|
|
1916
2038
|
root: "_root_1ue3g_1",
|
|
1917
2039
|
frame: "_frame_1ue3g_3",
|
|
1918
2040
|
video: "_video_1ue3g_5",
|
|
1919
2041
|
overlay: "_overlay_1ue3g_7",
|
|
1920
2042
|
error: "_error_1ue3g_7",
|
|
1921
2043
|
caption: "_caption_1ue3g_13"
|
|
1922
|
-
},
|
|
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 }) => {
|
|
1923
2045
|
let [h, g] = f(!1), _ = c ?? (h ? "Не удалось воспроизвести видео" : void 0);
|
|
1924
2046
|
return /* @__PURE__ */ n("figure", {
|
|
1925
|
-
className: `${
|
|
2047
|
+
className: `${pt.root} ${u}`,
|
|
1926
2048
|
children: [/* @__PURE__ */ n("div", {
|
|
1927
|
-
className:
|
|
2049
|
+
className: pt.frame,
|
|
1928
2050
|
style: { aspectRatio: a },
|
|
1929
2051
|
children: [
|
|
1930
2052
|
!_ && e.length > 0 && /* @__PURE__ */ n("video", {
|
|
@@ -1932,7 +2054,7 @@ var T = {
|
|
|
1932
2054
|
"aria-label": i,
|
|
1933
2055
|
controls: d,
|
|
1934
2056
|
playsInline: p,
|
|
1935
|
-
className:
|
|
2057
|
+
className: pt.video,
|
|
1936
2058
|
style: { objectFit: o },
|
|
1937
2059
|
onError: (e) => {
|
|
1938
2060
|
g(!0), m.onError?.(e);
|
|
@@ -1940,21 +2062,21 @@ var T = {
|
|
|
1940
2062
|
children: [e.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), r.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
|
|
1941
2063
|
}),
|
|
1942
2064
|
s && /* @__PURE__ */ t("div", {
|
|
1943
|
-
className:
|
|
2065
|
+
className: pt.overlay,
|
|
1944
2066
|
children: /* @__PURE__ */ t(S, { label: "Загрузка видео" })
|
|
1945
2067
|
}),
|
|
1946
2068
|
(_ || e.length === 0) && /* @__PURE__ */ t("div", {
|
|
1947
|
-
className:
|
|
2069
|
+
className: pt.error,
|
|
1948
2070
|
role: "alert",
|
|
1949
2071
|
children: l ?? _ ?? "Источник видео не указан"
|
|
1950
2072
|
})
|
|
1951
2073
|
]
|
|
1952
2074
|
}), /* @__PURE__ */ t("figcaption", {
|
|
1953
|
-
className:
|
|
2075
|
+
className: pt.caption,
|
|
1954
2076
|
children: i
|
|
1955
2077
|
})]
|
|
1956
2078
|
});
|
|
1957
|
-
},
|
|
2079
|
+
}, ht = {
|
|
1958
2080
|
popup: "_popup_15ovj_1",
|
|
1959
2081
|
trigger: "_trigger_15ovj_15",
|
|
1960
2082
|
content: "_content_15ovj_23",
|
|
@@ -1962,13 +2084,13 @@ var T = {
|
|
|
1962
2084
|
right: "_right_15ovj_141",
|
|
1963
2085
|
bottom: "_bottom_15ovj_175",
|
|
1964
2086
|
left: "_left_15ovj_209"
|
|
1965
|
-
},
|
|
1966
|
-
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]}`,
|
|
1967
2089
|
children: [/* @__PURE__ */ t("span", {
|
|
1968
|
-
className:
|
|
2090
|
+
className: ht.trigger,
|
|
1969
2091
|
children: i
|
|
1970
2092
|
}), /* @__PURE__ */ t("span", {
|
|
1971
|
-
className:
|
|
2093
|
+
className: ht.content,
|
|
1972
2094
|
role: "tooltip",
|
|
1973
2095
|
children: r
|
|
1974
2096
|
})]
|
|
@@ -1982,7 +2104,7 @@ var T = {
|
|
|
1982
2104
|
open: "_open_1tdda_91",
|
|
1983
2105
|
content: "_content_1tdda_99",
|
|
1984
2106
|
contentInner: "_contentInner_1tdda_119"
|
|
1985
|
-
},
|
|
2107
|
+
}, _t = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, className: l = "" }) => {
|
|
1986
2108
|
let u = c(), [d, p] = f(a), m = o ?? d;
|
|
1987
2109
|
return /* @__PURE__ */ n("section", {
|
|
1988
2110
|
className: `${$.root} ${m ? $.open : ""} ${l}`,
|
|
@@ -2029,7 +2151,7 @@ var T = {
|
|
|
2029
2151
|
})
|
|
2030
2152
|
})]
|
|
2031
2153
|
});
|
|
2032
|
-
},
|
|
2154
|
+
}, vt = ({ children: e, containerId: t = "overlay-root" }) => {
|
|
2033
2155
|
let [n, r] = f(null);
|
|
2034
2156
|
return s(() => {
|
|
2035
2157
|
let e = document.getElementById(t);
|
|
@@ -2044,4 +2166,4 @@ var T = {
|
|
|
2044
2166
|
}, [t]), n ? p(e, n) : null;
|
|
2045
2167
|
};
|
|
2046
2168
|
//#endregion
|
|
2047
|
-
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 };
|