@efficiency-point/design-system 0.1.42 → 0.1.43
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 +1 -1
- package/dist/components/DSIcon/DSIcon.d.ts +2 -1
- package/dist/components/DSIcon/DSIcon.d.ts.map +1 -1
- package/dist/components/DSIcon/source/IconApplicationActions.d.ts +7 -0
- package/dist/components/DSIcon/source/IconApplicationActions.d.ts.map +1 -0
- package/dist/components/DSIcon/source/index.d.ts +5 -0
- package/dist/components/DSIcon/source/index.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.es.js +925 -861
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -248,17 +248,17 @@ var M = {
|
|
|
248
248
|
y: "3",
|
|
249
249
|
rx: "2"
|
|
250
250
|
}), /* @__PURE__ */ t("path", { d: "M3 9h18M9 21V9" })]
|
|
251
|
-
}),
|
|
251
|
+
}), G = (e) => /* @__PURE__ */ t(P, {
|
|
252
252
|
...e,
|
|
253
253
|
children: /* @__PURE__ */ t("path", {
|
|
254
254
|
d: "M8 5v14M16 5v14",
|
|
255
255
|
strokeWidth: "3"
|
|
256
256
|
})
|
|
257
|
-
}),
|
|
257
|
+
}), le = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(P, {
|
|
258
258
|
strokeWidth: e,
|
|
259
259
|
...n,
|
|
260
260
|
children: /* @__PURE__ */ t("path", { d: "M12 5v14M5 12h14" })
|
|
261
|
-
}),
|
|
261
|
+
}), ue = (e) => /* @__PURE__ */ n(P, {
|
|
262
262
|
...e,
|
|
263
263
|
children: [
|
|
264
264
|
/* @__PURE__ */ t("path", { d: "M12 22v-5" }),
|
|
@@ -266,60 +266,60 @@ var M = {
|
|
|
266
266
|
/* @__PURE__ */ t("path", { d: "M15 8V2" }),
|
|
267
267
|
/* @__PURE__ */ t("path", { d: "M18 8v5a6 6 0 0 1-12 0V8Z" })
|
|
268
268
|
]
|
|
269
|
-
}),
|
|
269
|
+
}), de = (e) => /* @__PURE__ */ t(P, {
|
|
270
270
|
...e,
|
|
271
271
|
children: /* @__PURE__ */ t("path", { d: "M3 5h18v14H3V5Zm10 7h6v5h-6v-5Z" })
|
|
272
|
-
}),
|
|
272
|
+
}), K = (e) => /* @__PURE__ */ t(P, {
|
|
273
273
|
...e,
|
|
274
274
|
children: /* @__PURE__ */ t("path", {
|
|
275
275
|
d: "m8 5 11 7-11 7V5Z",
|
|
276
276
|
fill: "currentColor",
|
|
277
277
|
stroke: "none"
|
|
278
278
|
})
|
|
279
|
-
}),
|
|
279
|
+
}), fe = (e) => /* @__PURE__ */ t(P, {
|
|
280
280
|
...e,
|
|
281
281
|
children: /* @__PURE__ */ t("path", { d: "M4 7v5h5M5.5 11a7 7 0 1 1 1.3 6.3" })
|
|
282
|
-
}),
|
|
282
|
+
}), pe = (e) => /* @__PURE__ */ t(P, {
|
|
283
283
|
...e,
|
|
284
284
|
children: /* @__PURE__ */ t("path", { d: "M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm7.4 5.2.1-1.7-.1-1.7 2-1.5-2-3.4-2.4 1a8 8 0 0 0-2.9-1.7L13.8 2h-3.9l-.4 2.7a8 8 0 0 0-2.8 1.7l-2.5-1-2 3.4 2.1 1.5-.1 1.7.1 1.7-2.1 1.5 2 3.4 2.5-1a8 8 0 0 0 2.8 1.7l.4 2.7h3.9l.3-2.7a8 8 0 0 0 2.9-1.7l2.4 1 2-3.4-2-1.5Z" })
|
|
285
|
-
}),
|
|
285
|
+
}), me = (e) => /* @__PURE__ */ t(P, {
|
|
286
286
|
...e,
|
|
287
287
|
children: /* @__PURE__ */ t("path", { d: "M9 4H4v5m11-5h5v5M9 20H4v-5m11 5h5v-5" })
|
|
288
|
-
}),
|
|
288
|
+
}), he = (e) => /* @__PURE__ */ t(P, {
|
|
289
289
|
...e,
|
|
290
290
|
children: /* @__PURE__ */ t("path", { d: "M4 9h5V4m6 5h5V4M4 15h5v5m6-5h5v5" })
|
|
291
|
-
}),
|
|
291
|
+
}), ge = (e) => /* @__PURE__ */ t(P, {
|
|
292
292
|
...e,
|
|
293
293
|
children: /* @__PURE__ */ t("path", { d: "M4 6h16v12H4V6Zm7 4a2 2 0 1 0 0 4m7-4a2 2 0 1 0 0 4" })
|
|
294
|
-
}),
|
|
294
|
+
}), _e = (e) => /* @__PURE__ */ t(P, {
|
|
295
295
|
...e,
|
|
296
296
|
children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12-1c1.3 1.5 1.3 4.5 0 6m2.5-8.5c3 3 3 8 0 11" })
|
|
297
|
-
}),
|
|
297
|
+
}), ve = (e) => /* @__PURE__ */ t(P, {
|
|
298
298
|
...e,
|
|
299
299
|
children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12 0 4 4m0-4-4 4" })
|
|
300
|
-
}),
|
|
300
|
+
}), ye = (e) => /* @__PURE__ */ t(P, {
|
|
301
301
|
...e,
|
|
302
302
|
children: /* @__PURE__ */ t("path", { d: "M8 17V5m-3 3 3-3 3 3M16 7v12m-3-3 3 3 3-3" })
|
|
303
|
-
}),
|
|
303
|
+
}), be = (e) => /* @__PURE__ */ t(P, {
|
|
304
304
|
...e,
|
|
305
305
|
children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
|
|
306
|
-
}),
|
|
306
|
+
}), xe = (e) => /* @__PURE__ */ t(P, {
|
|
307
307
|
...e,
|
|
308
308
|
children: /* @__PURE__ */ t("path", { d: "M12 5v14m-5-5 5 5 5-5" })
|
|
309
|
-
}),
|
|
309
|
+
}), Se = (e) => /* @__PURE__ */ n(P, {
|
|
310
310
|
...e,
|
|
311
311
|
children: [/* @__PURE__ */ t("circle", {
|
|
312
312
|
cx: "12",
|
|
313
313
|
cy: "12",
|
|
314
314
|
r: "10"
|
|
315
315
|
}), /* @__PURE__ */ t("path", { d: "m9 12 2 2 4-4" })]
|
|
316
|
-
}),
|
|
316
|
+
}), Ce = (e) => /* @__PURE__ */ t(P, {
|
|
317
317
|
...e,
|
|
318
318
|
children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
|
|
319
|
-
}),
|
|
319
|
+
}), we = (e) => /* @__PURE__ */ n(P, {
|
|
320
320
|
...e,
|
|
321
321
|
children: [/* @__PURE__ */ t("path", { d: "M12 3.5L21 19H3L12 3.5Z" }), /* @__PURE__ */ t("path", { d: "M12 9v4.5M12 16.5v.01" })]
|
|
322
|
-
}),
|
|
322
|
+
}), Te = (e) => /* @__PURE__ */ n(P, {
|
|
323
323
|
...e,
|
|
324
324
|
children: [
|
|
325
325
|
/* @__PURE__ */ t("path", { d: "M3 6h18" }),
|
|
@@ -338,59 +338,119 @@ var M = {
|
|
|
338
338
|
y2: "17"
|
|
339
339
|
})
|
|
340
340
|
]
|
|
341
|
-
}),
|
|
341
|
+
}), Ee = (e) => /* @__PURE__ */ t(P, {
|
|
342
|
+
...e,
|
|
343
|
+
children: /* @__PURE__ */ t("path", { d: "m21.4 11.6-8.9 8.9a6 6 0 0 1-8.5-8.5l9.6-9.6a4 4 0 0 1 5.7 5.7l-9.6 9.6a2 2 0 0 1-2.8-2.8l8.9-8.9" })
|
|
344
|
+
}), q = (e) => /* @__PURE__ */ n(P, {
|
|
345
|
+
...e,
|
|
346
|
+
children: [/* @__PURE__ */ t("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t("path", { d: "M22 2 11 13" })]
|
|
347
|
+
}), De = (e) => /* @__PURE__ */ n(P, {
|
|
348
|
+
...e,
|
|
349
|
+
children: [
|
|
350
|
+
/* @__PURE__ */ t("circle", {
|
|
351
|
+
cx: "12",
|
|
352
|
+
cy: "12",
|
|
353
|
+
r: "10"
|
|
354
|
+
}),
|
|
355
|
+
/* @__PURE__ */ t("path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }),
|
|
356
|
+
/* @__PURE__ */ t("path", { d: "M9 9h.01M15 9h.01" })
|
|
357
|
+
]
|
|
358
|
+
}), Oe = (e) => /* @__PURE__ */ n(P, {
|
|
359
|
+
...e,
|
|
360
|
+
children: [
|
|
361
|
+
/* @__PURE__ */ t("circle", {
|
|
362
|
+
cx: "12",
|
|
363
|
+
cy: "5",
|
|
364
|
+
r: "1",
|
|
365
|
+
fill: "currentColor",
|
|
366
|
+
stroke: "none"
|
|
367
|
+
}),
|
|
368
|
+
/* @__PURE__ */ t("circle", {
|
|
369
|
+
cx: "12",
|
|
370
|
+
cy: "12",
|
|
371
|
+
r: "1",
|
|
372
|
+
fill: "currentColor",
|
|
373
|
+
stroke: "none"
|
|
374
|
+
}),
|
|
375
|
+
/* @__PURE__ */ t("circle", {
|
|
376
|
+
cx: "12",
|
|
377
|
+
cy: "19",
|
|
378
|
+
r: "1",
|
|
379
|
+
fill: "currentColor",
|
|
380
|
+
stroke: "none"
|
|
381
|
+
})
|
|
382
|
+
]
|
|
383
|
+
}), ke = (e) => /* @__PURE__ */ t(P, {
|
|
384
|
+
...e,
|
|
385
|
+
children: [
|
|
386
|
+
5,
|
|
387
|
+
12,
|
|
388
|
+
19
|
|
389
|
+
].flatMap((e) => [
|
|
390
|
+
5,
|
|
391
|
+
12,
|
|
392
|
+
19
|
|
393
|
+
].map((n) => /* @__PURE__ */ t("circle", {
|
|
394
|
+
cx: n,
|
|
395
|
+
cy: e,
|
|
396
|
+
r: "1.5",
|
|
397
|
+
fill: "currentColor",
|
|
398
|
+
stroke: "none"
|
|
399
|
+
}, `${n}-${e}`)))
|
|
400
|
+
}), J = (e) => (n) => /* @__PURE__ */ t(P, {
|
|
342
401
|
...n,
|
|
343
402
|
children: e.map(([e, t], n) => o(e, {
|
|
344
403
|
...t,
|
|
345
404
|
key: t.key ?? `${e}-${n}`
|
|
346
405
|
}))
|
|
347
|
-
}),
|
|
348
|
-
|
|
406
|
+
}), Ae = {
|
|
407
|
+
IconAppsGrid: ke,
|
|
408
|
+
IconActivity: J([["path", {
|
|
349
409
|
d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
|
|
350
410
|
key: "169zse"
|
|
351
411
|
}]]),
|
|
352
412
|
IconArchive: R,
|
|
353
|
-
IconAlertTriangle:
|
|
413
|
+
IconAlertTriangle: J([
|
|
354
414
|
["path", { d: "m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }],
|
|
355
415
|
["path", { d: "M12 9v4" }],
|
|
356
416
|
["path", { d: "M12 17h.01" }]
|
|
357
417
|
]),
|
|
358
|
-
IconArrowDown:
|
|
418
|
+
IconArrowDown: J([["path", {
|
|
359
419
|
d: "M12 5v14",
|
|
360
420
|
key: "s699le"
|
|
361
421
|
}], ["path", {
|
|
362
422
|
d: "m19 12-7 7-7-7",
|
|
363
423
|
key: "1idqje"
|
|
364
424
|
}]]),
|
|
365
|
-
IconArrowLeft:
|
|
425
|
+
IconArrowLeft: J([["path", {
|
|
366
426
|
d: "m12 19-7-7 7-7",
|
|
367
427
|
key: "1l729n"
|
|
368
428
|
}], ["path", {
|
|
369
429
|
d: "M19 12H5",
|
|
370
430
|
key: "x3x0zl"
|
|
371
431
|
}]]),
|
|
372
|
-
IconArrowRight:
|
|
432
|
+
IconArrowRight: J([["path", {
|
|
373
433
|
d: "M5 12h14",
|
|
374
434
|
key: "1ays0h"
|
|
375
435
|
}], ["path", {
|
|
376
436
|
d: "m12 5 7 7-7 7",
|
|
377
437
|
key: "xquz4c"
|
|
378
438
|
}]]),
|
|
379
|
-
IconArrowUp:
|
|
439
|
+
IconArrowUp: J([["path", {
|
|
380
440
|
d: "m5 12 7-7 7 7",
|
|
381
441
|
key: "hav0vg"
|
|
382
442
|
}], ["path", {
|
|
383
443
|
d: "M12 19V5",
|
|
384
444
|
key: "x0mq9r"
|
|
385
445
|
}]]),
|
|
386
|
-
IconArrowUpRight:
|
|
446
|
+
IconArrowUpRight: J([["path", {
|
|
387
447
|
d: "M7 7h10v10",
|
|
388
448
|
key: "1tivn9"
|
|
389
449
|
}], ["path", {
|
|
390
450
|
d: "M7 17 17 7",
|
|
391
451
|
key: "1vkiza"
|
|
392
452
|
}]]),
|
|
393
|
-
IconBarChart3:
|
|
453
|
+
IconBarChart3: J([
|
|
394
454
|
["path", { d: "M3 3v18h18" }],
|
|
395
455
|
["path", { d: "M18 17V9" }],
|
|
396
456
|
["path", { d: "M13 17V5" }],
|
|
@@ -398,14 +458,14 @@ var M = {
|
|
|
398
458
|
]),
|
|
399
459
|
IconBedDouble: I,
|
|
400
460
|
IconBookText: L,
|
|
401
|
-
IconBell:
|
|
461
|
+
IconBell: J([["path", {
|
|
402
462
|
d: "M10.268 21a2 2 0 0 0 3.464 0",
|
|
403
463
|
key: "vwvbt9"
|
|
404
464
|
}], ["path", {
|
|
405
465
|
d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",
|
|
406
466
|
key: "11g9vi"
|
|
407
467
|
}]]),
|
|
408
|
-
IconBoxes:
|
|
468
|
+
IconBoxes: J([
|
|
409
469
|
["path", {
|
|
410
470
|
d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",
|
|
411
471
|
key: "lc1i9w"
|
|
@@ -455,7 +515,7 @@ var M = {
|
|
|
455
515
|
key: "1io7kd"
|
|
456
516
|
}]
|
|
457
517
|
]),
|
|
458
|
-
IconBuilding2:
|
|
518
|
+
IconBuilding2: J([
|
|
459
519
|
["path", {
|
|
460
520
|
d: "M10 12h4",
|
|
461
521
|
key: "a56b0p"
|
|
@@ -477,7 +537,7 @@ var M = {
|
|
|
477
537
|
key: "16ra0t"
|
|
478
538
|
}]
|
|
479
539
|
]),
|
|
480
|
-
IconCamera:
|
|
540
|
+
IconCamera: J([["path", {
|
|
481
541
|
d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",
|
|
482
542
|
key: "18u6gg"
|
|
483
543
|
}], ["circle", {
|
|
@@ -486,7 +546,7 @@ var M = {
|
|
|
486
546
|
r: "3",
|
|
487
547
|
key: "1vg3eu"
|
|
488
548
|
}]]),
|
|
489
|
-
IconChartNoAxesCombined:
|
|
549
|
+
IconChartNoAxesCombined: J([
|
|
490
550
|
["path", {
|
|
491
551
|
d: "M12 16v5",
|
|
492
552
|
key: "zza2cw"
|
|
@@ -512,11 +572,11 @@ var M = {
|
|
|
512
572
|
key: "1t2idw"
|
|
513
573
|
}]
|
|
514
574
|
]),
|
|
515
|
-
IconChevronRight:
|
|
575
|
+
IconChevronRight: J([["path", {
|
|
516
576
|
d: "m9 18 6-6-6-6",
|
|
517
577
|
key: "mthhwq"
|
|
518
578
|
}]]),
|
|
519
|
-
IconCircleAlert:
|
|
579
|
+
IconCircleAlert: J([
|
|
520
580
|
["circle", {
|
|
521
581
|
cx: "12",
|
|
522
582
|
cy: "12",
|
|
@@ -538,7 +598,7 @@ var M = {
|
|
|
538
598
|
key: "4dfq90"
|
|
539
599
|
}]
|
|
540
600
|
]),
|
|
541
|
-
IconClock3:
|
|
601
|
+
IconClock3: J([["circle", {
|
|
542
602
|
cx: "12",
|
|
543
603
|
cy: "12",
|
|
544
604
|
r: "10",
|
|
@@ -548,7 +608,7 @@ var M = {
|
|
|
548
608
|
key: "135r8i"
|
|
549
609
|
}]]),
|
|
550
610
|
IconCopy: H,
|
|
551
|
-
IconDownload:
|
|
611
|
+
IconDownload: J([
|
|
552
612
|
["path", {
|
|
553
613
|
d: "M12 15V3",
|
|
554
614
|
key: "m9g1x1"
|
|
@@ -562,7 +622,7 @@ var M = {
|
|
|
562
622
|
key: "brsn70"
|
|
563
623
|
}]
|
|
564
624
|
]),
|
|
565
|
-
IconExternalLink:
|
|
625
|
+
IconExternalLink: J([
|
|
566
626
|
["path", {
|
|
567
627
|
d: "M15 3h6v6",
|
|
568
628
|
key: "1q9fwt"
|
|
@@ -576,7 +636,7 @@ var M = {
|
|
|
576
636
|
key: "a6xqqp"
|
|
577
637
|
}]
|
|
578
638
|
]),
|
|
579
|
-
IconFactory:
|
|
639
|
+
IconFactory: J([
|
|
580
640
|
["path", {
|
|
581
641
|
d: "M12 16h.01",
|
|
582
642
|
key: "1drbdi"
|
|
@@ -595,14 +655,14 @@ var M = {
|
|
|
595
655
|
}]
|
|
596
656
|
]),
|
|
597
657
|
IconFileText: ae,
|
|
598
|
-
IconGauge:
|
|
658
|
+
IconGauge: J([["path", {
|
|
599
659
|
d: "m12 14 4-4",
|
|
600
660
|
key: "9kzdfg"
|
|
601
661
|
}], ["path", {
|
|
602
662
|
d: "M3.34 19a10 10 0 1 1 17.32 0",
|
|
603
663
|
key: "19p75a"
|
|
604
664
|
}]]),
|
|
605
|
-
IconGripVertical:
|
|
665
|
+
IconGripVertical: J([
|
|
606
666
|
["circle", {
|
|
607
667
|
cx: "9",
|
|
608
668
|
cy: "12",
|
|
@@ -640,7 +700,7 @@ var M = {
|
|
|
640
700
|
key: "f4zoj3"
|
|
641
701
|
}]
|
|
642
702
|
]),
|
|
643
|
-
IconLayoutDashboard:
|
|
703
|
+
IconLayoutDashboard: J([
|
|
644
704
|
["rect", {
|
|
645
705
|
width: "7",
|
|
646
706
|
height: "9",
|
|
@@ -674,7 +734,7 @@ var M = {
|
|
|
674
734
|
key: "ldoo1y"
|
|
675
735
|
}]
|
|
676
736
|
]),
|
|
677
|
-
IconLockKeyhole:
|
|
737
|
+
IconLockKeyhole: J([
|
|
678
738
|
["circle", {
|
|
679
739
|
cx: "12",
|
|
680
740
|
cy: "16",
|
|
@@ -694,7 +754,7 @@ var M = {
|
|
|
694
754
|
key: "1pqi11"
|
|
695
755
|
}]
|
|
696
756
|
]),
|
|
697
|
-
IconLogOut:
|
|
757
|
+
IconLogOut: J([
|
|
698
758
|
["path", {
|
|
699
759
|
d: "m16 17 5-5-5-5",
|
|
700
760
|
key: "1bji2h"
|
|
@@ -708,7 +768,7 @@ var M = {
|
|
|
708
768
|
key: "1uf3rs"
|
|
709
769
|
}]
|
|
710
770
|
]),
|
|
711
|
-
IconMaximize2:
|
|
771
|
+
IconMaximize2: J([
|
|
712
772
|
["path", {
|
|
713
773
|
d: "M15 3h6v6",
|
|
714
774
|
key: "1q9fwt"
|
|
@@ -726,7 +786,7 @@ var M = {
|
|
|
726
786
|
key: "wtvkvv"
|
|
727
787
|
}]
|
|
728
788
|
]),
|
|
729
|
-
IconMenu:
|
|
789
|
+
IconMenu: J([
|
|
730
790
|
["path", {
|
|
731
791
|
d: "M4 5h16",
|
|
732
792
|
key: "1tepv9"
|
|
@@ -740,7 +800,7 @@ var M = {
|
|
|
740
800
|
key: "1djgab"
|
|
741
801
|
}]
|
|
742
802
|
]),
|
|
743
|
-
IconPackageCheck:
|
|
803
|
+
IconPackageCheck: J([
|
|
744
804
|
["path", {
|
|
745
805
|
d: "M12 22V12",
|
|
746
806
|
key: "d0xqtd"
|
|
@@ -762,7 +822,7 @@ var M = {
|
|
|
762
822
|
key: "9yrvtv"
|
|
763
823
|
}]
|
|
764
824
|
]),
|
|
765
|
-
IconRefreshCw:
|
|
825
|
+
IconRefreshCw: J([
|
|
766
826
|
["path", {
|
|
767
827
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
768
828
|
key: "v9h5vc"
|
|
@@ -780,14 +840,14 @@ var M = {
|
|
|
780
840
|
key: "1cv678"
|
|
781
841
|
}]
|
|
782
842
|
]),
|
|
783
|
-
IconRotateCw:
|
|
843
|
+
IconRotateCw: J([["path", {
|
|
784
844
|
d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",
|
|
785
845
|
key: "1p45f6"
|
|
786
846
|
}], ["path", {
|
|
787
847
|
d: "M21 3v5h-5",
|
|
788
848
|
key: "1q7to0"
|
|
789
849
|
}]]),
|
|
790
|
-
IconSearch:
|
|
850
|
+
IconSearch: J([["path", {
|
|
791
851
|
d: "m21 21-4.34-4.34",
|
|
792
852
|
key: "14j7rj"
|
|
793
853
|
}], ["circle", {
|
|
@@ -796,7 +856,7 @@ var M = {
|
|
|
796
856
|
r: "8",
|
|
797
857
|
key: "4ej97u"
|
|
798
858
|
}]]),
|
|
799
|
-
IconSettings2:
|
|
859
|
+
IconSettings2: J([
|
|
800
860
|
["path", {
|
|
801
861
|
d: "M14 17H5",
|
|
802
862
|
key: "gfn3mx"
|
|
@@ -818,7 +878,7 @@ var M = {
|
|
|
818
878
|
key: "dfmy0x"
|
|
819
879
|
}]
|
|
820
880
|
]),
|
|
821
|
-
IconShieldAlert:
|
|
881
|
+
IconShieldAlert: J([
|
|
822
882
|
["path", {
|
|
823
883
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
824
884
|
key: "oel41y"
|
|
@@ -832,14 +892,14 @@ var M = {
|
|
|
832
892
|
key: "1drbdi"
|
|
833
893
|
}]
|
|
834
894
|
]),
|
|
835
|
-
IconShieldCheck:
|
|
895
|
+
IconShieldCheck: J([["path", {
|
|
836
896
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
837
897
|
key: "oel41y"
|
|
838
898
|
}], ["path", {
|
|
839
899
|
d: "m9 12 2 2 4-4",
|
|
840
900
|
key: "dzmm74"
|
|
841
901
|
}]]),
|
|
842
|
-
IconSmartphone:
|
|
902
|
+
IconSmartphone: J([["rect", {
|
|
843
903
|
width: "14",
|
|
844
904
|
height: "20",
|
|
845
905
|
x: "5",
|
|
@@ -851,7 +911,7 @@ var M = {
|
|
|
851
911
|
d: "M12 18h.01",
|
|
852
912
|
key: "mhygvu"
|
|
853
913
|
}]]),
|
|
854
|
-
IconSparkles:
|
|
914
|
+
IconSparkles: J([
|
|
855
915
|
["path", {
|
|
856
916
|
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
857
917
|
key: "1s2grr"
|
|
@@ -871,22 +931,22 @@ var M = {
|
|
|
871
931
|
key: "6kqj1y"
|
|
872
932
|
}]
|
|
873
933
|
]),
|
|
874
|
-
IconTable2:
|
|
934
|
+
IconTable2: J([["path", {
|
|
875
935
|
d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",
|
|
876
936
|
key: "gugj83"
|
|
877
937
|
}]]),
|
|
878
|
-
IconThermometer:
|
|
938
|
+
IconThermometer: J([["path", {
|
|
879
939
|
d: "M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",
|
|
880
940
|
key: "17jzev"
|
|
881
941
|
}]]),
|
|
882
|
-
IconTrendingUp:
|
|
942
|
+
IconTrendingUp: J([["path", {
|
|
883
943
|
d: "M16 7h6v6",
|
|
884
944
|
key: "box55l"
|
|
885
945
|
}], ["path", {
|
|
886
946
|
d: "m22 7-8.5 8.5-5-5L2 17",
|
|
887
947
|
key: "1t1m79"
|
|
888
948
|
}]]),
|
|
889
|
-
IconUserCheck:
|
|
949
|
+
IconUserCheck: J([
|
|
890
950
|
["path", {
|
|
891
951
|
d: "m16 11 2 2 4-4",
|
|
892
952
|
key: "9rsbq5"
|
|
@@ -902,7 +962,7 @@ var M = {
|
|
|
902
962
|
key: "nufk8"
|
|
903
963
|
}]
|
|
904
964
|
]),
|
|
905
|
-
IconUserRound:
|
|
965
|
+
IconUserRound: J([["circle", {
|
|
906
966
|
cx: "12",
|
|
907
967
|
cy: "8",
|
|
908
968
|
r: "5",
|
|
@@ -911,7 +971,7 @@ var M = {
|
|
|
911
971
|
d: "M20 21a8 8 0 0 0-16 0",
|
|
912
972
|
key: "rfgkzh"
|
|
913
973
|
}]]),
|
|
914
|
-
IconUsers:
|
|
974
|
+
IconUsers: J([
|
|
915
975
|
["path", {
|
|
916
976
|
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
917
977
|
key: "1yyitq"
|
|
@@ -931,7 +991,7 @@ var M = {
|
|
|
931
991
|
key: "nufk8"
|
|
932
992
|
}]
|
|
933
993
|
]),
|
|
934
|
-
IconUserX:
|
|
994
|
+
IconUserX: J([
|
|
935
995
|
["path", {
|
|
936
996
|
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
937
997
|
key: "1yyitq"
|
|
@@ -957,7 +1017,7 @@ var M = {
|
|
|
957
1017
|
key: "1swrse"
|
|
958
1018
|
}]
|
|
959
1019
|
]),
|
|
960
|
-
IconVideo:
|
|
1020
|
+
IconVideo: J([["path", {
|
|
961
1021
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
962
1022
|
key: "ftymec"
|
|
963
1023
|
}], ["rect", {
|
|
@@ -968,7 +1028,7 @@ var M = {
|
|
|
968
1028
|
rx: "2",
|
|
969
1029
|
key: "158x01"
|
|
970
1030
|
}]]),
|
|
971
|
-
IconVideoOff:
|
|
1031
|
+
IconVideoOff: J([
|
|
972
1032
|
["path", {
|
|
973
1033
|
d: "M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196",
|
|
974
1034
|
key: "w8jjjt"
|
|
@@ -982,7 +1042,7 @@ var M = {
|
|
|
982
1042
|
key: "1ooewy"
|
|
983
1043
|
}]
|
|
984
1044
|
]),
|
|
985
|
-
IconVolume2:
|
|
1045
|
+
IconVolume2: J([
|
|
986
1046
|
["path", {
|
|
987
1047
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
988
1048
|
key: "uqj9uw"
|
|
@@ -996,7 +1056,7 @@ var M = {
|
|
|
996
1056
|
key: "ijwkga"
|
|
997
1057
|
}]
|
|
998
1058
|
]),
|
|
999
|
-
IconX:
|
|
1059
|
+
IconX: J([["path", {
|
|
1000
1060
|
d: "M18 6 6 18",
|
|
1001
1061
|
key: "1bl5f8"
|
|
1002
1062
|
}], ["path", {
|
|
@@ -1014,46 +1074,50 @@ var M = {
|
|
|
1014
1074
|
IconInfo: re,
|
|
1015
1075
|
IconInfoCircle: ie,
|
|
1016
1076
|
IconMinus: oe,
|
|
1077
|
+
IconMoreVertical: Oe,
|
|
1017
1078
|
IconList: se,
|
|
1018
1079
|
IconPanelsTopLeft: ce,
|
|
1019
|
-
IconPause:
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1080
|
+
IconPause: G,
|
|
1081
|
+
IconPaperclip: Ee,
|
|
1082
|
+
IconPlus: le,
|
|
1083
|
+
IconPlug: ue,
|
|
1084
|
+
IconPictureInPicture: de,
|
|
1085
|
+
IconPlay: K,
|
|
1086
|
+
IconReplay: fe,
|
|
1087
|
+
IconSettings: pe,
|
|
1088
|
+
IconSend: q,
|
|
1089
|
+
IconSmile: De,
|
|
1090
|
+
IconFullscreen: me,
|
|
1091
|
+
IconFullscreenExit: he,
|
|
1092
|
+
IconCaptions: ge,
|
|
1093
|
+
IconVolume: _e,
|
|
1094
|
+
IconVolumeMuted: ve,
|
|
1095
|
+
IconSort: ye,
|
|
1096
|
+
IconSortAscending: be,
|
|
1097
|
+
IconSortDescending: xe,
|
|
1098
|
+
IconSuccessCircle: Se,
|
|
1099
|
+
IconUpload: Ce,
|
|
1100
|
+
IconWarning: we,
|
|
1101
|
+
IconTrash2: Te
|
|
1102
|
+
}, je = Object.freeze(Object.keys(Ae)), Y = ({ name: e, ...n }) => {
|
|
1103
|
+
let r = Ae[e];
|
|
1040
1104
|
return /* @__PURE__ */ t(r, { ...n });
|
|
1041
|
-
},
|
|
1105
|
+
}, Me = {
|
|
1042
1106
|
wrapper: "_wrapper_1seon_1",
|
|
1043
1107
|
label: "_label_1seon_13",
|
|
1044
1108
|
input: "_input_1seon_35",
|
|
1045
1109
|
control: "_control_1seon_49",
|
|
1046
1110
|
disabled: "_disabled_1seon_95",
|
|
1047
1111
|
controlError: "_controlError_1seon_121"
|
|
1048
|
-
},
|
|
1112
|
+
}, Ne = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, readOnly: c = !1, className: l = "", name: u, id: p, indeterminate: m = !1, ariaLabel: g, ..._ }) => {
|
|
1049
1113
|
let v = f(), y = p ?? `ds-checkbox-${u ?? v}`, b = h(null), x = a ? `${y}-hint` : void 0, S = o ? `${y}-error` : void 0;
|
|
1050
1114
|
return d(() => {
|
|
1051
1115
|
b.current && (b.current.indeterminate = m && !e);
|
|
1052
1116
|
}, [e, m]), /* @__PURE__ */ n("div", {
|
|
1053
|
-
className: `${
|
|
1117
|
+
className: `${Me.wrapper} ${l}`,
|
|
1054
1118
|
children: [
|
|
1055
1119
|
/* @__PURE__ */ n("label", {
|
|
1056
|
-
className: `${
|
|
1120
|
+
className: `${Me.label} ${s ? Me.disabled : ""}`,
|
|
1057
1121
|
htmlFor: y,
|
|
1058
1122
|
children: [
|
|
1059
1123
|
/* @__PURE__ */ t("input", {
|
|
@@ -1067,20 +1131,20 @@ var M = {
|
|
|
1067
1131
|
"aria-invalid": !!o,
|
|
1068
1132
|
"aria-describedby": [x, S].filter(Boolean).join(" ") || void 0,
|
|
1069
1133
|
"aria-label": g,
|
|
1070
|
-
className:
|
|
1134
|
+
className: Me.input,
|
|
1071
1135
|
onChange: (e) => {
|
|
1072
1136
|
c || r?.(e.target.checked, e);
|
|
1073
1137
|
},
|
|
1074
1138
|
..._
|
|
1075
1139
|
}),
|
|
1076
1140
|
/* @__PURE__ */ n("span", {
|
|
1077
|
-
className: `${
|
|
1141
|
+
className: `${Me.control} ${o ? Me.controlError : ""}`,
|
|
1078
1142
|
"aria-hidden": "true",
|
|
1079
|
-
children: [m && !e && /* @__PURE__ */ t(
|
|
1143
|
+
children: [m && !e && /* @__PURE__ */ t(Y, {
|
|
1080
1144
|
name: "IconMinus",
|
|
1081
1145
|
width: 16,
|
|
1082
1146
|
height: 16
|
|
1083
|
-
}), e && /* @__PURE__ */ t(
|
|
1147
|
+
}), e && /* @__PURE__ */ t(Y, {
|
|
1084
1148
|
name: "IconCheck",
|
|
1085
1149
|
width: 16,
|
|
1086
1150
|
height: 16
|
|
@@ -1100,7 +1164,7 @@ var M = {
|
|
|
1100
1164
|
})
|
|
1101
1165
|
]
|
|
1102
1166
|
});
|
|
1103
|
-
},
|
|
1167
|
+
}, X = {
|
|
1104
1168
|
wrapper: "_wrapper_su17c_1",
|
|
1105
1169
|
trigger: "_trigger_su17c_17",
|
|
1106
1170
|
sm: "_sm_su17c_53",
|
|
@@ -1131,7 +1195,7 @@ var M = {
|
|
|
1131
1195
|
timeLabel: "_timeLabel_su17c_533",
|
|
1132
1196
|
previousMonth: "_previousMonth_su17c_593",
|
|
1133
1197
|
nextMonth: "_nextMonth_su17c_601"
|
|
1134
|
-
},
|
|
1198
|
+
}, Pe = [
|
|
1135
1199
|
"Пн",
|
|
1136
1200
|
"Вт",
|
|
1137
1201
|
"Ср",
|
|
@@ -1139,7 +1203,7 @@ var M = {
|
|
|
1139
1203
|
"Пт",
|
|
1140
1204
|
"Сб",
|
|
1141
1205
|
"Вс"
|
|
1142
|
-
],
|
|
1206
|
+
], Fe = [
|
|
1143
1207
|
"Январь",
|
|
1144
1208
|
"Февраль",
|
|
1145
1209
|
"Март",
|
|
@@ -1152,33 +1216,33 @@ var M = {
|
|
|
1152
1216
|
"Октябрь",
|
|
1153
1217
|
"Ноябрь",
|
|
1154
1218
|
"Декабрь"
|
|
1155
|
-
],
|
|
1156
|
-
let t = e.replace(/\D/g, "").slice(0,
|
|
1219
|
+
], Ie = (e) => String(e).padStart(2, "0"), Le = 8, Re = "Некорректная дата", ze = (e) => e ? `${Ie(e.getDate())}.${Ie(e.getMonth() + 1)}.${e.getFullYear()}` : "", Be = (e) => {
|
|
1220
|
+
let t = e.replace(/\D/g, "").slice(0, Le);
|
|
1157
1221
|
return [
|
|
1158
1222
|
t.slice(0, 2),
|
|
1159
1223
|
t.slice(2, 4),
|
|
1160
1224
|
t.slice(4, 8)
|
|
1161
1225
|
].filter(Boolean).join(".");
|
|
1162
|
-
},
|
|
1226
|
+
}, Ve = (e) => {
|
|
1163
1227
|
if (!e) return !0;
|
|
1164
1228
|
let t = Number(e.padEnd(4, "0"));
|
|
1165
1229
|
return Number(e.padEnd(4, "9")) >= 1800 && t <= 2500;
|
|
1166
|
-
},
|
|
1230
|
+
}, He = (e) => {
|
|
1167
1231
|
if (!/^\d{0,8}$/.test(e)) return !1;
|
|
1168
1232
|
let t = e.slice(0, 2), n = e.slice(2, 4), r = e.slice(4, 8);
|
|
1169
|
-
return t.length === 1 && Number(t) > 3 || t.length === 2 && (Number(t) < 1 || Number(t) > 31) || n.length === 1 && Number(n) > 1 || n.length === 2 && (Number(n) < 1 || Number(n) > 12) ? !1 :
|
|
1170
|
-
},
|
|
1233
|
+
return t.length === 1 && Number(t) > 3 || t.length === 2 && (Number(t) < 1 || Number(t) > 31) || n.length === 1 && Number(n) > 1 || n.length === 2 && (Number(n) < 1 || Number(n) > 12) ? !1 : Ve(r);
|
|
1234
|
+
}, Ue = (e) => {
|
|
1171
1235
|
let t = /^(\d{2})\.(\d{2})\.(\d{4})$/.exec(e);
|
|
1172
1236
|
if (!t) return null;
|
|
1173
1237
|
let n = Number(t[1]), r = Number(t[2]) - 1, i = Number(t[3]);
|
|
1174
1238
|
if (i < 1800 || i > 2500) return null;
|
|
1175
1239
|
let a = new Date(i, r, n, 12);
|
|
1176
1240
|
return a.getFullYear() !== i || a.getMonth() !== r || a.getDate() !== n ? null : a;
|
|
1177
|
-
},
|
|
1241
|
+
}, We = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Ge = (e, t) => {
|
|
1178
1242
|
if (!e) return "";
|
|
1179
|
-
let n = `${e.getFullYear()}-${
|
|
1243
|
+
let n = `${e.getFullYear()}-${Ie(e.getMonth() + 1)}-${Ie(e.getDate())}`, r = `${Ie(e.getHours())}:${Ie(e.getMinutes())}`;
|
|
1180
1244
|
return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
|
|
1181
|
-
},
|
|
1245
|
+
}, Ke = (e, t) => {
|
|
1182
1246
|
if (!e) return null;
|
|
1183
1247
|
if (t === "time") {
|
|
1184
1248
|
let t = /^(\d{2}):(\d{2})$/.exec(e);
|
|
@@ -1196,33 +1260,33 @@ var M = {
|
|
|
1196
1260
|
}
|
|
1197
1261
|
let n = new Date(e);
|
|
1198
1262
|
return Number.isNaN(n.getTime()) ? null : n;
|
|
1199
|
-
},
|
|
1263
|
+
}, qe = (e, t) => {
|
|
1200
1264
|
if (!e) return "";
|
|
1201
|
-
let n = `${
|
|
1265
|
+
let n = `${Ie(e.getDate())}.${Ie(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${Ie(e.getHours())}:${Ie(e.getMinutes())}`;
|
|
1202
1266
|
return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
|
|
1203
|
-
},
|
|
1267
|
+
}, Je = (e) => {
|
|
1204
1268
|
let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
|
|
1205
1269
|
return r.setDate(t.getDate() - n), Array.from({ length: 42 }, (e, t) => {
|
|
1206
1270
|
let n = new Date(r);
|
|
1207
1271
|
return n.setDate(r.getDate() + t), n;
|
|
1208
1272
|
});
|
|
1209
|
-
},
|
|
1210
|
-
let r =
|
|
1211
|
-
return !!(t && r <
|
|
1212
|
-
},
|
|
1213
|
-
let D = f(), O = w ?? `ds-date-time-${T ?? D}`, k = c ? `${O}-hint` : void 0, A = u ? `${O}-error` : void 0, j = h(null), M = h(null), P = h(null), F = h(null), [I, L] = g(!1), [R, z] = g(r ?? /* @__PURE__ */ new Date()), [B, V] = g(
|
|
1273
|
+
}, Ye = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), Xe = (e, t, n) => {
|
|
1274
|
+
let r = We(e).getTime();
|
|
1275
|
+
return !!(t && r < We(t).getTime() || n && r > We(n).getTime());
|
|
1276
|
+
}, Ze = 8, Qe = 6, $e = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: s, hint: c, error: u, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: w, name: T, className: E = "" }) => {
|
|
1277
|
+
let D = f(), O = w ?? `ds-date-time-${T ?? D}`, k = c ? `${O}-hint` : void 0, A = u ? `${O}-error` : void 0, j = h(null), M = h(null), P = h(null), F = h(null), [I, L] = g(!1), [R, z] = g(r ?? /* @__PURE__ */ new Date()), [B, V] = g(Ge(r, "time")), [H, U] = g(ze(r)), [W, te] = g(""), [ne, re] = g(0), [ie, ae] = g(null), oe = m(() => Je(R), [R]), se = a !== "time", ce = a !== "date";
|
|
1214
1278
|
d(() => {
|
|
1215
|
-
r && z(r), V(
|
|
1279
|
+
r && z(r), V(Ge(r, "time")), U(ze(r));
|
|
1216
1280
|
}, [r]), d(() => () => {
|
|
1217
1281
|
F.current && clearTimeout(F.current);
|
|
1218
1282
|
}, []);
|
|
1219
|
-
let
|
|
1283
|
+
let G = l(() => {
|
|
1220
1284
|
let e = M.current, t = P.current;
|
|
1221
1285
|
if (!e || !t) return;
|
|
1222
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom -
|
|
1286
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - Ze, o = n.top - Ze, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(Ze, n.top - r.height - Qe) : n.bottom + Qe, u = n.left, d = i - r.width - Ze;
|
|
1223
1287
|
ae({
|
|
1224
1288
|
top: l,
|
|
1225
|
-
left: Math.max(
|
|
1289
|
+
left: Math.max(Ze, Math.min(u, d)),
|
|
1226
1290
|
maxHeight: c
|
|
1227
1291
|
});
|
|
1228
1292
|
}, []);
|
|
@@ -1231,12 +1295,12 @@ var M = {
|
|
|
1231
1295
|
ae(null);
|
|
1232
1296
|
return;
|
|
1233
1297
|
}
|
|
1234
|
-
return
|
|
1235
|
-
window.removeEventListener("resize",
|
|
1298
|
+
return G(), window.addEventListener("resize", G), window.addEventListener("scroll", G, !0), () => {
|
|
1299
|
+
window.removeEventListener("resize", G), window.removeEventListener("scroll", G, !0);
|
|
1236
1300
|
};
|
|
1237
1301
|
}, [
|
|
1238
1302
|
I,
|
|
1239
|
-
|
|
1303
|
+
G,
|
|
1240
1304
|
R,
|
|
1241
1305
|
B
|
|
1242
1306
|
]), d(() => {
|
|
@@ -1251,50 +1315,50 @@ var M = {
|
|
|
1251
1315
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1252
1316
|
};
|
|
1253
1317
|
}, [I]);
|
|
1254
|
-
let
|
|
1255
|
-
if (
|
|
1256
|
-
let t = a === "date" ?
|
|
1257
|
-
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), U(
|
|
1258
|
-
},
|
|
1259
|
-
te(
|
|
1318
|
+
let le = (e) => {
|
|
1319
|
+
if (Xe(e, x, S)) return;
|
|
1320
|
+
let t = a === "date" ? Ke(Ge(e, "date"), "date") : new Date(e);
|
|
1321
|
+
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), U(ze(t)), a === "date" && L(!1));
|
|
1322
|
+
}, ue = () => {
|
|
1323
|
+
te(Re), re((e) => e + 1), F.current && clearTimeout(F.current), F.current = setTimeout(() => {
|
|
1260
1324
|
te(""), F.current = null;
|
|
1261
1325
|
}, 3e3);
|
|
1262
|
-
},
|
|
1263
|
-
let t = e.replace(/\D/g, "").slice(0,
|
|
1264
|
-
if (!
|
|
1265
|
-
|
|
1326
|
+
}, de = (e) => {
|
|
1327
|
+
let t = e.replace(/\D/g, "").slice(0, Le);
|
|
1328
|
+
if (!He(t)) {
|
|
1329
|
+
ue();
|
|
1266
1330
|
return;
|
|
1267
1331
|
}
|
|
1268
|
-
let n =
|
|
1332
|
+
let n = Be(t);
|
|
1269
1333
|
if (U(n), !t) {
|
|
1270
1334
|
i?.(null);
|
|
1271
1335
|
return;
|
|
1272
1336
|
}
|
|
1273
|
-
if (t.length <
|
|
1274
|
-
let o =
|
|
1275
|
-
if (!o ||
|
|
1276
|
-
|
|
1337
|
+
if (t.length < Le) return;
|
|
1338
|
+
let o = Ue(n);
|
|
1339
|
+
if (!o || Xe(o, x, S)) {
|
|
1340
|
+
ue();
|
|
1277
1341
|
return;
|
|
1278
1342
|
}
|
|
1279
1343
|
a === "datetime" && o.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(o), z(o), L(!1), requestAnimationFrame(() => M.current?.blur());
|
|
1280
|
-
},
|
|
1344
|
+
}, K = (e) => {
|
|
1281
1345
|
if (V(e), !e) {
|
|
1282
1346
|
i?.(null);
|
|
1283
1347
|
return;
|
|
1284
1348
|
}
|
|
1285
|
-
let t =
|
|
1349
|
+
let t = Ke(e, "time");
|
|
1286
1350
|
if (!t) return;
|
|
1287
1351
|
let n = new Date(a === "datetime" ? r ?? R : /* @__PURE__ */ new Date());
|
|
1288
1352
|
n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
|
|
1289
|
-
},
|
|
1353
|
+
}, fe = s ?? (a === "date" ? "ДД.ММ.ГГГГ" : a === "time" ? "ЧЧ:ММ" : "ДД.ММ.ГГГГ ЧЧ:ММ"), pe = W ? `${O}-validation` : void 0, me = [
|
|
1290
1354
|
k,
|
|
1291
1355
|
A,
|
|
1292
|
-
|
|
1293
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1356
|
+
pe
|
|
1357
|
+
].filter(Boolean).join(" ") || void 0, he = I && !y ? /* @__PURE__ */ n("div", {
|
|
1294
1358
|
ref: P,
|
|
1295
|
-
className:
|
|
1359
|
+
className: X.panel,
|
|
1296
1360
|
role: "dialog",
|
|
1297
|
-
"aria-label": o ??
|
|
1361
|
+
"aria-label": o ?? fe,
|
|
1298
1362
|
style: ie ? {
|
|
1299
1363
|
top: ie.top,
|
|
1300
1364
|
left: ie.left,
|
|
@@ -1306,32 +1370,32 @@ var M = {
|
|
|
1306
1370
|
},
|
|
1307
1371
|
children: [se && /* @__PURE__ */ n(e, { children: [
|
|
1308
1372
|
/* @__PURE__ */ n("div", {
|
|
1309
|
-
className:
|
|
1373
|
+
className: X.calendarHeader,
|
|
1310
1374
|
children: [
|
|
1311
1375
|
/* @__PURE__ */ t("button", {
|
|
1312
1376
|
type: "button",
|
|
1313
|
-
className:
|
|
1377
|
+
className: X.nav,
|
|
1314
1378
|
"aria-label": "Предыдущий месяц",
|
|
1315
1379
|
onClick: () => z(new Date(R.getFullYear(), R.getMonth() - 1, 1)),
|
|
1316
|
-
children: /* @__PURE__ */ t(
|
|
1380
|
+
children: /* @__PURE__ */ t(Y, {
|
|
1317
1381
|
name: "IconChevron",
|
|
1318
1382
|
width: 20,
|
|
1319
1383
|
height: 20,
|
|
1320
|
-
className:
|
|
1384
|
+
className: X.previousMonth
|
|
1321
1385
|
})
|
|
1322
1386
|
}),
|
|
1323
1387
|
/* @__PURE__ */ t("select", {
|
|
1324
|
-
className:
|
|
1388
|
+
className: X.monthSelect,
|
|
1325
1389
|
"aria-label": "Месяц",
|
|
1326
1390
|
value: R.getMonth(),
|
|
1327
1391
|
onChange: (e) => z(new Date(R.getFullYear(), Number(e.target.value), 1)),
|
|
1328
|
-
children:
|
|
1392
|
+
children: Fe.map((e, n) => /* @__PURE__ */ t("option", {
|
|
1329
1393
|
value: n,
|
|
1330
1394
|
children: e
|
|
1331
1395
|
}, e))
|
|
1332
1396
|
}),
|
|
1333
1397
|
/* @__PURE__ */ t("input", {
|
|
1334
|
-
className:
|
|
1398
|
+
className: X.yearInput,
|
|
1335
1399
|
type: "number",
|
|
1336
1400
|
"aria-label": "Год",
|
|
1337
1401
|
value: R.getFullYear(),
|
|
@@ -1339,49 +1403,49 @@ var M = {
|
|
|
1339
1403
|
}),
|
|
1340
1404
|
/* @__PURE__ */ t("button", {
|
|
1341
1405
|
type: "button",
|
|
1342
|
-
className:
|
|
1406
|
+
className: X.nav,
|
|
1343
1407
|
"aria-label": "Следующий месяц",
|
|
1344
1408
|
onClick: () => z(new Date(R.getFullYear(), R.getMonth() + 1, 1)),
|
|
1345
|
-
children: /* @__PURE__ */ t(
|
|
1409
|
+
children: /* @__PURE__ */ t(Y, {
|
|
1346
1410
|
name: "IconChevron",
|
|
1347
1411
|
width: 20,
|
|
1348
1412
|
height: 20,
|
|
1349
|
-
className:
|
|
1413
|
+
className: X.nextMonth
|
|
1350
1414
|
})
|
|
1351
1415
|
})
|
|
1352
1416
|
]
|
|
1353
1417
|
}),
|
|
1354
1418
|
/* @__PURE__ */ t("div", {
|
|
1355
|
-
className:
|
|
1356
|
-
children:
|
|
1419
|
+
className: X.weekdays,
|
|
1420
|
+
children: Pe.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
|
|
1357
1421
|
}),
|
|
1358
1422
|
/* @__PURE__ */ t("div", {
|
|
1359
|
-
className:
|
|
1423
|
+
className: X.days,
|
|
1360
1424
|
children: oe.map((e) => {
|
|
1361
|
-
let n =
|
|
1425
|
+
let n = Ye(r, e);
|
|
1362
1426
|
return /* @__PURE__ */ t("button", {
|
|
1363
1427
|
type: "button",
|
|
1364
|
-
className: `${
|
|
1365
|
-
disabled:
|
|
1428
|
+
className: `${X.day} ${e.getMonth() === R.getMonth() ? "" : X.outside} ${n ? X.selected : ""}`,
|
|
1429
|
+
disabled: Xe(e, x, S),
|
|
1366
1430
|
"aria-pressed": n,
|
|
1367
|
-
onClick: () =>
|
|
1431
|
+
onClick: () => le(e),
|
|
1368
1432
|
children: e.getDate()
|
|
1369
1433
|
}, e.toISOString());
|
|
1370
1434
|
})
|
|
1371
1435
|
})
|
|
1372
1436
|
] }), ce && /* @__PURE__ */ n("label", {
|
|
1373
|
-
className:
|
|
1437
|
+
className: X.timeLabel,
|
|
1374
1438
|
children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
|
|
1375
|
-
className:
|
|
1439
|
+
className: X.timeInput,
|
|
1376
1440
|
type: "time",
|
|
1377
1441
|
value: B,
|
|
1378
|
-
onChange: (e) =>
|
|
1442
|
+
onChange: (e) => K(e.target.value)
|
|
1379
1443
|
})]
|
|
1380
1444
|
})]
|
|
1381
1445
|
}) : null;
|
|
1382
1446
|
return /* @__PURE__ */ n("div", {
|
|
1383
1447
|
ref: j,
|
|
1384
|
-
className: `${
|
|
1448
|
+
className: `${X.wrapper} ${E}`,
|
|
1385
1449
|
children: [
|
|
1386
1450
|
o && /* @__PURE__ */ t(ee, {
|
|
1387
1451
|
htmlFor: O,
|
|
@@ -1390,15 +1454,15 @@ var M = {
|
|
|
1390
1454
|
children: o
|
|
1391
1455
|
}),
|
|
1392
1456
|
se ? /* @__PURE__ */ n("div", {
|
|
1393
|
-
className: `${
|
|
1457
|
+
className: `${X.trigger} ${X[C]} ${u ? X.error : ""} ${v ? X.disabled : ""}`,
|
|
1394
1458
|
children: [
|
|
1395
1459
|
/* @__PURE__ */ t("input", {
|
|
1396
1460
|
ref: M,
|
|
1397
1461
|
id: O,
|
|
1398
1462
|
name: T,
|
|
1399
|
-
className:
|
|
1463
|
+
className: X.dateInput,
|
|
1400
1464
|
value: H,
|
|
1401
|
-
placeholder:
|
|
1465
|
+
placeholder: fe.split(" ")[0],
|
|
1402
1466
|
inputMode: "numeric",
|
|
1403
1467
|
autoComplete: "off",
|
|
1404
1468
|
maxLength: 10,
|
|
@@ -1406,7 +1470,7 @@ var M = {
|
|
|
1406
1470
|
readOnly: y,
|
|
1407
1471
|
"aria-expanded": I,
|
|
1408
1472
|
"aria-haspopup": "dialog",
|
|
1409
|
-
"aria-describedby":
|
|
1473
|
+
"aria-describedby": me,
|
|
1410
1474
|
"aria-invalid": !!(u || W) || void 0,
|
|
1411
1475
|
onFocus: () => {
|
|
1412
1476
|
y || L(!0);
|
|
@@ -1414,15 +1478,15 @@ var M = {
|
|
|
1414
1478
|
onClick: () => {
|
|
1415
1479
|
y || L(!0);
|
|
1416
1480
|
},
|
|
1417
|
-
onChange: (e) =>
|
|
1481
|
+
onChange: (e) => de(e.target.value)
|
|
1418
1482
|
}),
|
|
1419
1483
|
a === "datetime" && B && /* @__PURE__ */ t("span", {
|
|
1420
|
-
className:
|
|
1484
|
+
className: X.timeValue,
|
|
1421
1485
|
children: B
|
|
1422
1486
|
}),
|
|
1423
1487
|
/* @__PURE__ */ t("button", {
|
|
1424
1488
|
type: "button",
|
|
1425
|
-
className:
|
|
1489
|
+
className: X.chevronButton,
|
|
1426
1490
|
disabled: v || y,
|
|
1427
1491
|
"aria-label": I ? "Закрыть календарь" : "Открыть календарь",
|
|
1428
1492
|
tabIndex: -1,
|
|
@@ -1431,9 +1495,9 @@ var M = {
|
|
|
1431
1495
|
L((e) => !e), M.current?.focus();
|
|
1432
1496
|
},
|
|
1433
1497
|
children: /* @__PURE__ */ t("span", {
|
|
1434
|
-
className: `${
|
|
1498
|
+
className: `${X.chevron} ${he ? X.chevronOpen : ""}`,
|
|
1435
1499
|
"aria-hidden": "true",
|
|
1436
|
-
children: /* @__PURE__ */ t(
|
|
1500
|
+
children: /* @__PURE__ */ t(Y, {
|
|
1437
1501
|
name: "IconChevron",
|
|
1438
1502
|
width: 20,
|
|
1439
1503
|
height: 20
|
|
@@ -1446,22 +1510,22 @@ var M = {
|
|
|
1446
1510
|
id: O,
|
|
1447
1511
|
name: T,
|
|
1448
1512
|
type: "button",
|
|
1449
|
-
className: `${
|
|
1513
|
+
className: `${X.trigger} ${X[C]} ${u ? X.error : ""}`,
|
|
1450
1514
|
disabled: v,
|
|
1451
1515
|
"aria-readonly": y || void 0,
|
|
1452
1516
|
"aria-expanded": I,
|
|
1453
1517
|
"aria-haspopup": "dialog",
|
|
1454
|
-
"aria-describedby":
|
|
1518
|
+
"aria-describedby": me,
|
|
1455
1519
|
onClick: () => {
|
|
1456
1520
|
y || L((e) => !e);
|
|
1457
1521
|
},
|
|
1458
1522
|
children: [/* @__PURE__ */ t("span", {
|
|
1459
|
-
className: r ?
|
|
1460
|
-
children:
|
|
1523
|
+
className: r ? X.value : X.placeholder,
|
|
1524
|
+
children: qe(r, a) || fe
|
|
1461
1525
|
}), /* @__PURE__ */ t("span", {
|
|
1462
|
-
className: `${
|
|
1526
|
+
className: `${X.chevron} ${he ? X.chevronOpen : ""}`,
|
|
1463
1527
|
"aria-hidden": "true",
|
|
1464
|
-
children: /* @__PURE__ */ t(
|
|
1528
|
+
children: /* @__PURE__ */ t(Y, {
|
|
1465
1529
|
name: "IconChevron",
|
|
1466
1530
|
width: 20,
|
|
1467
1531
|
height: 20
|
|
@@ -1469,13 +1533,13 @@ var M = {
|
|
|
1469
1533
|
})]
|
|
1470
1534
|
}),
|
|
1471
1535
|
W && /* @__PURE__ */ t("span", {
|
|
1472
|
-
id:
|
|
1473
|
-
className:
|
|
1536
|
+
id: pe,
|
|
1537
|
+
className: X.validationTooltip,
|
|
1474
1538
|
role: "status",
|
|
1475
1539
|
"aria-live": "polite",
|
|
1476
1540
|
children: W
|
|
1477
1541
|
}, ne),
|
|
1478
|
-
|
|
1542
|
+
he && _(he, document.body),
|
|
1479
1543
|
c && !u && /* @__PURE__ */ t(N, {
|
|
1480
1544
|
id: k,
|
|
1481
1545
|
children: c
|
|
@@ -1487,19 +1551,19 @@ var M = {
|
|
|
1487
1551
|
})
|
|
1488
1552
|
]
|
|
1489
1553
|
});
|
|
1490
|
-
},
|
|
1554
|
+
}, et = {
|
|
1491
1555
|
root: "_root_19vq2_1",
|
|
1492
1556
|
range: "_range_19vq2_21"
|
|
1493
|
-
},
|
|
1557
|
+
}, tt = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), nt = ({ 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 = "" }) => {
|
|
1494
1558
|
let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
|
|
1495
|
-
i?.(e),
|
|
1559
|
+
i?.(e), tt(e) && r?.(e);
|
|
1496
1560
|
};
|
|
1497
1561
|
return /* @__PURE__ */ n("fieldset", {
|
|
1498
|
-
className: `${
|
|
1562
|
+
className: `${et.root} ${h}`,
|
|
1499
1563
|
disabled: f,
|
|
1500
1564
|
children: [/* @__PURE__ */ n("div", {
|
|
1501
|
-
className:
|
|
1502
|
-
children: [/* @__PURE__ */ t(
|
|
1565
|
+
className: et.range,
|
|
1566
|
+
children: [/* @__PURE__ */ t($e, {
|
|
1503
1567
|
value: e.from,
|
|
1504
1568
|
mode: a === "datetime" ? "datetime" : a,
|
|
1505
1569
|
label: o,
|
|
@@ -1513,7 +1577,7 @@ var M = {
|
|
|
1513
1577
|
...e,
|
|
1514
1578
|
from: t
|
|
1515
1579
|
})
|
|
1516
|
-
}), /* @__PURE__ */ t(
|
|
1580
|
+
}), /* @__PURE__ */ t($e, {
|
|
1517
1581
|
value: e.to,
|
|
1518
1582
|
mode: a === "datetime" ? "datetime" : a,
|
|
1519
1583
|
label: s,
|
|
@@ -1530,7 +1594,7 @@ var M = {
|
|
|
1530
1594
|
})]
|
|
1531
1595
|
}), c && !g && /* @__PURE__ */ t(N, { children: c })]
|
|
1532
1596
|
});
|
|
1533
|
-
},
|
|
1597
|
+
}, rt = {
|
|
1534
1598
|
group: "_group_ey6uk_1",
|
|
1535
1599
|
skeleton: "_skeleton_ey6uk_15",
|
|
1536
1600
|
text: "_text_ey6uk_27",
|
|
@@ -1538,17 +1602,17 @@ var M = {
|
|
|
1538
1602
|
circular: "_circular_ey6uk_47",
|
|
1539
1603
|
animated: "_animated_ey6uk_59",
|
|
1540
1604
|
"ds-skeleton": "_ds-skeleton_ey6uk_1"
|
|
1541
|
-
},
|
|
1542
|
-
className: `${
|
|
1605
|
+
}, it = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
|
|
1606
|
+
className: `${rt.group} ${o}`,
|
|
1543
1607
|
"aria-hidden": "true",
|
|
1544
1608
|
children: Array.from({ length: Math.max(1, i) }, (i, o) => /* @__PURE__ */ t("span", {
|
|
1545
|
-
className: `${
|
|
1609
|
+
className: `${rt.skeleton} ${rt[e]} ${a ? rt.animated : ""}`,
|
|
1546
1610
|
style: {
|
|
1547
1611
|
width: n,
|
|
1548
1612
|
height: r
|
|
1549
1613
|
}
|
|
1550
1614
|
}, o))
|
|
1551
|
-
}),
|
|
1615
|
+
}), Z = {
|
|
1552
1616
|
wrapper: "_wrapper_1l9o2_1",
|
|
1553
1617
|
container: "_container_1l9o2_17",
|
|
1554
1618
|
trigger: "_trigger_1l9o2_25",
|
|
@@ -1567,25 +1631,25 @@ var M = {
|
|
|
1567
1631
|
message: "_message_1l9o2_391",
|
|
1568
1632
|
error: "_error_1l9o2_393",
|
|
1569
1633
|
errorState: "_errorState_1l9o2_419"
|
|
1570
|
-
},
|
|
1634
|
+
}, at = 8, ot = 6, st = 120, ct = (e, t, n) => {
|
|
1571
1635
|
if (!e.length) return -1;
|
|
1572
1636
|
for (let r = 0; r < e.length; r += 1) {
|
|
1573
1637
|
let i = (t + r * n + e.length) % e.length;
|
|
1574
1638
|
if (!e[i]?.disabled) return i;
|
|
1575
1639
|
}
|
|
1576
1640
|
return -1;
|
|
1577
|
-
},
|
|
1641
|
+
}, lt = (e) => {
|
|
1578
1642
|
if (typeof e == "number") return e;
|
|
1579
1643
|
if (typeof e == "string") {
|
|
1580
1644
|
let t = Number.parseFloat(e);
|
|
1581
1645
|
if (Number.isFinite(t)) return t;
|
|
1582
1646
|
}
|
|
1583
1647
|
return Infinity;
|
|
1584
|
-
},
|
|
1648
|
+
}, ut = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: w = !0, maxMenuHeight: T }) => {
|
|
1585
1649
|
let E = f(), D = C ?? `ds-dropdown-${S ?? E}`, O = `${D}-listbox`, [k, A] = g(!1), [j, M] = g(null), N = h(null), P = h(null), F = h(null), I = h([]), L = m(() => e.find((e) => e.value === r), [e, r]), R = y ? `${D}-hint` : void 0, z = u ? `${D}-error` : void 0, B = [R, z].filter(Boolean).join(" ") || void 0, V = o && s, H = l(() => {
|
|
1586
1650
|
let e = P.current, t = F.current;
|
|
1587
1651
|
if (!e || !t) return;
|
|
1588
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom -
|
|
1652
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - at, o = n.top - at, s = a < r.height && o > a, c = Math.max(st, s ? o : a), l = lt(T), u = Math.min(c, l), d = n.left, f = i - n.width - at, p = Math.max(at, Math.min(d, f)), m = s ? Math.max(at, n.top - r.height - ot) : n.bottom + ot;
|
|
1589
1653
|
M({
|
|
1590
1654
|
top: m,
|
|
1591
1655
|
left: p,
|
|
@@ -1618,7 +1682,7 @@ var M = {
|
|
|
1618
1682
|
};
|
|
1619
1683
|
}, [k]);
|
|
1620
1684
|
let U = (t, n) => {
|
|
1621
|
-
let r =
|
|
1685
|
+
let r = ct(e, t, n);
|
|
1622
1686
|
if (r === -1) return;
|
|
1623
1687
|
let i = I.current[r];
|
|
1624
1688
|
i?.focus(), i?.scrollIntoView({ block: "nearest" });
|
|
@@ -1627,7 +1691,7 @@ var M = {
|
|
|
1627
1691
|
}, te = k ? /* @__PURE__ */ t("ul", {
|
|
1628
1692
|
ref: F,
|
|
1629
1693
|
id: O,
|
|
1630
|
-
className:
|
|
1694
|
+
className: Z.menu,
|
|
1631
1695
|
role: "listbox",
|
|
1632
1696
|
"aria-label": c,
|
|
1633
1697
|
style: j ? {
|
|
@@ -1657,10 +1721,10 @@ var M = {
|
|
|
1657
1721
|
disabled: i.disabled,
|
|
1658
1722
|
"data-option-variant": i.variant ?? "default",
|
|
1659
1723
|
className: [
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
i.variant === "action" ?
|
|
1663
|
-
o ?
|
|
1724
|
+
Z[v],
|
|
1725
|
+
Z.option,
|
|
1726
|
+
i.variant === "action" ? Z.actionOption : "",
|
|
1727
|
+
o ? Z.selected : ""
|
|
1664
1728
|
].filter(Boolean).join(" "),
|
|
1665
1729
|
onClick: () => W(i),
|
|
1666
1730
|
onKeyDown: (t) => {
|
|
@@ -1676,7 +1740,7 @@ var M = {
|
|
|
1676
1740
|
}
|
|
1677
1741
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), W(i));
|
|
1678
1742
|
},
|
|
1679
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(
|
|
1743
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(Y, {
|
|
1680
1744
|
name: "IconCheck",
|
|
1681
1745
|
width: 16,
|
|
1682
1746
|
height: 16
|
|
@@ -1688,8 +1752,8 @@ var M = {
|
|
|
1688
1752
|
return /* @__PURE__ */ n("div", {
|
|
1689
1753
|
ref: N,
|
|
1690
1754
|
className: [
|
|
1691
|
-
|
|
1692
|
-
u ?
|
|
1755
|
+
Z.wrapper,
|
|
1756
|
+
u ? Z.errorState : "",
|
|
1693
1757
|
b
|
|
1694
1758
|
].filter(Boolean).join(" "),
|
|
1695
1759
|
children: [
|
|
@@ -1700,10 +1764,10 @@ var M = {
|
|
|
1700
1764
|
children: c
|
|
1701
1765
|
}),
|
|
1702
1766
|
/* @__PURE__ */ t("div", {
|
|
1703
|
-
className:
|
|
1767
|
+
className: Z.container,
|
|
1704
1768
|
children: V ? /* @__PURE__ */ t("div", {
|
|
1705
1769
|
id: D,
|
|
1706
|
-
className:
|
|
1770
|
+
className: Z.disabledText,
|
|
1707
1771
|
"aria-describedby": B,
|
|
1708
1772
|
children: L?.label ?? a
|
|
1709
1773
|
}) : /* @__PURE__ */ n("button", {
|
|
@@ -1711,7 +1775,7 @@ var M = {
|
|
|
1711
1775
|
id: D,
|
|
1712
1776
|
type: "button",
|
|
1713
1777
|
name: S,
|
|
1714
|
-
className: `${
|
|
1778
|
+
className: `${Z.trigger} ${Z[v]}`,
|
|
1715
1779
|
disabled: o,
|
|
1716
1780
|
"aria-haspopup": "listbox",
|
|
1717
1781
|
"aria-expanded": k,
|
|
@@ -1734,13 +1798,13 @@ var M = {
|
|
|
1734
1798
|
}
|
|
1735
1799
|
},
|
|
1736
1800
|
children: [/* @__PURE__ */ t("span", {
|
|
1737
|
-
className: `${L ?
|
|
1738
|
-
${
|
|
1801
|
+
className: `${L ? Z.value : Z.placeholder}
|
|
1802
|
+
${Z[v]}`,
|
|
1739
1803
|
children: L?.label ?? a
|
|
1740
1804
|
}), /* @__PURE__ */ t("span", {
|
|
1741
|
-
className: [
|
|
1805
|
+
className: [Z.chevron, k ? Z.chevronOpen : ""].filter(Boolean).join(" "),
|
|
1742
1806
|
"aria-hidden": "true",
|
|
1743
|
-
children: /* @__PURE__ */ t(
|
|
1807
|
+
children: /* @__PURE__ */ t(Y, {
|
|
1744
1808
|
name: "IconChevron",
|
|
1745
1809
|
width: 20,
|
|
1746
1810
|
height: 20
|
|
@@ -1751,35 +1815,35 @@ var M = {
|
|
|
1751
1815
|
k && _(te, document.body),
|
|
1752
1816
|
y && !u && /* @__PURE__ */ t("span", {
|
|
1753
1817
|
id: R,
|
|
1754
|
-
className:
|
|
1818
|
+
className: Z.message,
|
|
1755
1819
|
children: y
|
|
1756
1820
|
}),
|
|
1757
1821
|
u && /* @__PURE__ */ t("span", {
|
|
1758
1822
|
id: z,
|
|
1759
|
-
className:
|
|
1823
|
+
className: Z.error,
|
|
1760
1824
|
children: u
|
|
1761
1825
|
})
|
|
1762
1826
|
]
|
|
1763
1827
|
});
|
|
1764
|
-
},
|
|
1828
|
+
}, dt = (e) => `${e.id}:${e.direction}`, ft = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
|
|
1765
1829
|
let c = e.flatMap((e) => [{
|
|
1766
|
-
value:
|
|
1830
|
+
value: dt({
|
|
1767
1831
|
id: e.id,
|
|
1768
1832
|
direction: "asc"
|
|
1769
1833
|
}),
|
|
1770
1834
|
label: e.ascLabel ?? `${e.label} · по возрастанию`,
|
|
1771
1835
|
disabled: e.disabled
|
|
1772
1836
|
}, {
|
|
1773
|
-
value:
|
|
1837
|
+
value: dt({
|
|
1774
1838
|
id: e.id,
|
|
1775
1839
|
direction: "desc"
|
|
1776
1840
|
}),
|
|
1777
1841
|
label: e.descLabel ?? `${e.label} · по убыванию`,
|
|
1778
1842
|
disabled: e.disabled
|
|
1779
1843
|
}]);
|
|
1780
|
-
return /* @__PURE__ */ t(
|
|
1844
|
+
return /* @__PURE__ */ t(ut, {
|
|
1781
1845
|
options: c,
|
|
1782
|
-
value: n ?
|
|
1846
|
+
value: n ? dt(n) : "",
|
|
1783
1847
|
label: i,
|
|
1784
1848
|
placeholder: a,
|
|
1785
1849
|
disabled: o,
|
|
@@ -1792,7 +1856,7 @@ var M = {
|
|
|
1792
1856
|
});
|
|
1793
1857
|
}
|
|
1794
1858
|
});
|
|
1795
|
-
},
|
|
1859
|
+
}, pt = {
|
|
1796
1860
|
wrapper: "_wrapper_1khfq_1",
|
|
1797
1861
|
control: "_control_1khfq_15",
|
|
1798
1862
|
input: "_input_1khfq_25",
|
|
@@ -1802,12 +1866,12 @@ var M = {
|
|
|
1802
1866
|
lg: "_lg_1khfq_139",
|
|
1803
1867
|
inputError: "_inputError_1khfq_155",
|
|
1804
1868
|
trailingAction: "_trailingAction_1khfq_163"
|
|
1805
|
-
},
|
|
1869
|
+
}, mt = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: s = !1, stringWhileDisabled: c = !1, label: l, error: u, hint: p, className: m = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: w = "Скрыть пароль", passwordHiddenLabel: T = "Показать пароль", onFocus: E, ...D }) => {
|
|
1806
1870
|
let O = f(), k = v ?? `ds-input-${_ ?? O}`, A = h(null), [j, M] = g(!1), P = p ? `${k}-hint` : void 0, F = u ? `${k}-error` : void 0, I = String(e ?? ""), L = [P, F].filter(Boolean).join(" ") || void 0, R = C ? j ? "text" : "password" : i;
|
|
1807
1871
|
return d(() => {
|
|
1808
1872
|
C || M(!1);
|
|
1809
1873
|
}, [C]), /* @__PURE__ */ n("div", {
|
|
1810
|
-
className: `${
|
|
1874
|
+
className: `${pt.wrapper} ${m}`,
|
|
1811
1875
|
children: [
|
|
1812
1876
|
l && /* @__PURE__ */ t(ee, {
|
|
1813
1877
|
htmlFor: k,
|
|
@@ -1817,11 +1881,11 @@ var M = {
|
|
|
1817
1881
|
}),
|
|
1818
1882
|
o && c ? /* @__PURE__ */ t("div", {
|
|
1819
1883
|
id: k,
|
|
1820
|
-
className:
|
|
1884
|
+
className: pt.disabledText,
|
|
1821
1885
|
"aria-describedby": L,
|
|
1822
1886
|
children: I || a
|
|
1823
1887
|
}) : /* @__PURE__ */ n("div", {
|
|
1824
|
-
className:
|
|
1888
|
+
className: pt.control,
|
|
1825
1889
|
children: [
|
|
1826
1890
|
/* @__PURE__ */ t("input", {
|
|
1827
1891
|
ref: A,
|
|
@@ -1835,7 +1899,7 @@ var M = {
|
|
|
1835
1899
|
required: x,
|
|
1836
1900
|
"aria-invalid": !!u,
|
|
1837
1901
|
"aria-describedby": L,
|
|
1838
|
-
className: `${
|
|
1902
|
+
className: `${pt.input} ${pt[y]} ${u ? pt.inputError : ""}`,
|
|
1839
1903
|
onChange: (e) => {
|
|
1840
1904
|
if (i === "number" && !C) {
|
|
1841
1905
|
let t = e.target.value === "" ? "" : Number(e.target.value);
|
|
@@ -1851,12 +1915,12 @@ var M = {
|
|
|
1851
1915
|
}),
|
|
1852
1916
|
C && /* @__PURE__ */ t("button", {
|
|
1853
1917
|
type: "button",
|
|
1854
|
-
className:
|
|
1918
|
+
className: pt.trailingAction,
|
|
1855
1919
|
disabled: o,
|
|
1856
1920
|
"aria-label": j ? w : T,
|
|
1857
1921
|
"aria-pressed": j,
|
|
1858
1922
|
onClick: () => M((e) => !e),
|
|
1859
|
-
children: /* @__PURE__ */ t(
|
|
1923
|
+
children: /* @__PURE__ */ t(Y, {
|
|
1860
1924
|
name: j ? "IconEyeOff" : "IconEye",
|
|
1861
1925
|
width: 20,
|
|
1862
1926
|
height: 20
|
|
@@ -1864,13 +1928,13 @@ var M = {
|
|
|
1864
1928
|
}),
|
|
1865
1929
|
!C && b && I && !o && !s && /* @__PURE__ */ t("button", {
|
|
1866
1930
|
type: "button",
|
|
1867
|
-
className:
|
|
1931
|
+
className: pt.trailingAction,
|
|
1868
1932
|
"aria-label": "Очистить поле",
|
|
1869
1933
|
onClick: () => {
|
|
1870
1934
|
let e = A.current;
|
|
1871
1935
|
e && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
|
|
1872
1936
|
},
|
|
1873
|
-
children: /* @__PURE__ */ t(
|
|
1937
|
+
children: /* @__PURE__ */ t(Y, {
|
|
1874
1938
|
name: "IconCross",
|
|
1875
1939
|
width: 20,
|
|
1876
1940
|
height: 20
|
|
@@ -1889,23 +1953,23 @@ var M = {
|
|
|
1889
1953
|
})
|
|
1890
1954
|
]
|
|
1891
1955
|
});
|
|
1892
|
-
},
|
|
1956
|
+
}, ht = 8, gt = 6, _t = 120, vt = (e) => {
|
|
1893
1957
|
if (typeof e == "number") return e;
|
|
1894
1958
|
if (typeof e == "string") {
|
|
1895
1959
|
let t = Number.parseFloat(e);
|
|
1896
1960
|
if (Number.isFinite(t)) return t;
|
|
1897
1961
|
}
|
|
1898
1962
|
return Infinity;
|
|
1899
|
-
},
|
|
1963
|
+
}, yt = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: w = !1, needMark: T = !0, maxMenuHeight: E }) => {
|
|
1900
1964
|
let D = f(), O = C ?? `ds-dropdown-multiple-${S ?? D}`, k = `${O}-listbox`, [A, j] = g(!1), [M, N] = g(null), P = h(null), F = h(null), I = h(null), L = h([]), R = m(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${O}-hint` : void 0, B = u ? `${O}-error` : void 0, V = [z, B].filter(Boolean).join(" ") || void 0, H = o && s, U = l(() => {
|
|
1901
1965
|
let e = F.current, t = I.current;
|
|
1902
1966
|
if (!e || !t) return;
|
|
1903
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom -
|
|
1967
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - ht, a = n.top - ht, o = i < r.height && a > i, s = Math.max(_t, o ? a : i), c = window.innerWidth - n.width - ht;
|
|
1904
1968
|
N({
|
|
1905
|
-
top: o ? Math.max(
|
|
1906
|
-
left: Math.max(
|
|
1969
|
+
top: o ? Math.max(ht, n.top - r.height - gt) : n.bottom + gt,
|
|
1970
|
+
left: Math.max(ht, Math.min(n.left, c)),
|
|
1907
1971
|
width: n.width,
|
|
1908
|
-
maxHeight: Math.min(s,
|
|
1972
|
+
maxHeight: Math.min(s, vt(E))
|
|
1909
1973
|
});
|
|
1910
1974
|
}, [E]);
|
|
1911
1975
|
p(() => {
|
|
@@ -1933,7 +1997,7 @@ var M = {
|
|
|
1933
1997
|
};
|
|
1934
1998
|
}, [A]);
|
|
1935
1999
|
let W = (t, n) => {
|
|
1936
|
-
let r =
|
|
2000
|
+
let r = ct(e, t, n);
|
|
1937
2001
|
r !== -1 && (L.current[r]?.focus(), L.current[r]?.scrollIntoView({ block: "nearest" }));
|
|
1938
2002
|
}, te = (t) => {
|
|
1939
2003
|
if (t.disabled) return;
|
|
@@ -1942,7 +2006,7 @@ var M = {
|
|
|
1942
2006
|
}, ne = A ? /* @__PURE__ */ t("ul", {
|
|
1943
2007
|
ref: I,
|
|
1944
2008
|
id: k,
|
|
1945
|
-
className:
|
|
2009
|
+
className: Z.menu,
|
|
1946
2010
|
role: "listbox",
|
|
1947
2011
|
"aria-label": c,
|
|
1948
2012
|
"aria-multiselectable": "true",
|
|
@@ -1973,10 +2037,10 @@ var M = {
|
|
|
1973
2037
|
disabled: i.disabled,
|
|
1974
2038
|
"data-option-variant": i.variant ?? "default",
|
|
1975
2039
|
className: [
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
i.variant === "action" ?
|
|
1979
|
-
o ?
|
|
2040
|
+
Z[v],
|
|
2041
|
+
Z.option,
|
|
2042
|
+
i.variant === "action" ? Z.actionOption : "",
|
|
2043
|
+
o ? Z.selected : ""
|
|
1980
2044
|
].filter(Boolean).join(" "),
|
|
1981
2045
|
onClick: () => te(i),
|
|
1982
2046
|
onKeyDown: (t) => {
|
|
@@ -1992,7 +2056,7 @@ var M = {
|
|
|
1992
2056
|
}
|
|
1993
2057
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), te(i)), t.key === "Tab" && j(!1);
|
|
1994
2058
|
},
|
|
1995
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t(
|
|
2059
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t(Y, {
|
|
1996
2060
|
name: "IconCheck",
|
|
1997
2061
|
width: 16,
|
|
1998
2062
|
height: 16
|
|
@@ -2004,8 +2068,8 @@ var M = {
|
|
|
2004
2068
|
return /* @__PURE__ */ n("div", {
|
|
2005
2069
|
ref: P,
|
|
2006
2070
|
className: [
|
|
2007
|
-
|
|
2008
|
-
u ?
|
|
2071
|
+
Z.wrapper,
|
|
2072
|
+
u ? Z.errorState : "",
|
|
2009
2073
|
x
|
|
2010
2074
|
].filter(Boolean).join(" "),
|
|
2011
2075
|
children: [
|
|
@@ -2016,10 +2080,10 @@ var M = {
|
|
|
2016
2080
|
children: c
|
|
2017
2081
|
}),
|
|
2018
2082
|
/* @__PURE__ */ t("div", {
|
|
2019
|
-
className:
|
|
2083
|
+
className: Z.container,
|
|
2020
2084
|
children: H ? /* @__PURE__ */ t("div", {
|
|
2021
2085
|
id: O,
|
|
2022
|
-
className: `${
|
|
2086
|
+
className: `${Z.disabledText} ${Z[v]}`,
|
|
2023
2087
|
"aria-describedby": V,
|
|
2024
2088
|
children: R || a
|
|
2025
2089
|
}) : /* @__PURE__ */ n("button", {
|
|
@@ -2027,7 +2091,7 @@ var M = {
|
|
|
2027
2091
|
id: O,
|
|
2028
2092
|
type: "button",
|
|
2029
2093
|
name: S,
|
|
2030
|
-
className: `${
|
|
2094
|
+
className: `${Z.trigger} ${Z[v]}`,
|
|
2031
2095
|
disabled: o,
|
|
2032
2096
|
"aria-haspopup": "listbox",
|
|
2033
2097
|
"aria-expanded": A,
|
|
@@ -2043,12 +2107,12 @@ var M = {
|
|
|
2043
2107
|
}
|
|
2044
2108
|
},
|
|
2045
2109
|
children: [/* @__PURE__ */ t("span", {
|
|
2046
|
-
className: `${R ?
|
|
2110
|
+
className: `${R ? Z.value : Z.placeholder} ${Z[v]}`,
|
|
2047
2111
|
children: R || a
|
|
2048
2112
|
}), /* @__PURE__ */ t("span", {
|
|
2049
|
-
className: [
|
|
2113
|
+
className: [Z.chevron, A ? Z.chevronOpen : ""].filter(Boolean).join(" "),
|
|
2050
2114
|
"aria-hidden": "true",
|
|
2051
|
-
children: /* @__PURE__ */ t(
|
|
2115
|
+
children: /* @__PURE__ */ t(Y, {
|
|
2052
2116
|
name: "IconChevron",
|
|
2053
2117
|
width: 20,
|
|
2054
2118
|
height: 20
|
|
@@ -2059,32 +2123,32 @@ var M = {
|
|
|
2059
2123
|
A && _(ne, document.body),
|
|
2060
2124
|
b && !u && /* @__PURE__ */ t("span", {
|
|
2061
2125
|
id: z,
|
|
2062
|
-
className:
|
|
2126
|
+
className: Z.message,
|
|
2063
2127
|
children: b
|
|
2064
2128
|
}),
|
|
2065
2129
|
u && /* @__PURE__ */ t("span", {
|
|
2066
2130
|
id: B,
|
|
2067
|
-
className:
|
|
2131
|
+
className: Z.error,
|
|
2068
2132
|
children: u
|
|
2069
2133
|
})
|
|
2070
2134
|
]
|
|
2071
2135
|
});
|
|
2072
|
-
},
|
|
2136
|
+
}, bt = {
|
|
2073
2137
|
wrapper: "_wrapper_1jspu_1",
|
|
2074
2138
|
input: "_input_1jspu_21",
|
|
2075
2139
|
switch: "_switch_1jspu_35",
|
|
2076
2140
|
thumb: "_thumb_1jspu_67",
|
|
2077
2141
|
label: "_label_1jspu_113",
|
|
2078
2142
|
disabled: "_disabled_1jspu_125"
|
|
2079
|
-
},
|
|
2143
|
+
}, xt = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: c, id: l, value: u }) => {
|
|
2080
2144
|
let d = f(), p = l ?? `ds-radio-button-${c ?? d}`;
|
|
2081
2145
|
return /* @__PURE__ */ n("label", {
|
|
2082
2146
|
htmlFor: p,
|
|
2083
|
-
className: `${
|
|
2147
|
+
className: `${bt.wrapper} ${a ? bt.disabled : ""} ${s}`,
|
|
2084
2148
|
children: [
|
|
2085
2149
|
/* @__PURE__ */ t("input", {
|
|
2086
2150
|
id: p,
|
|
2087
|
-
className:
|
|
2151
|
+
className: bt.input,
|
|
2088
2152
|
type: "checkbox",
|
|
2089
2153
|
role: "switch",
|
|
2090
2154
|
name: c,
|
|
@@ -2097,17 +2161,17 @@ var M = {
|
|
|
2097
2161
|
}
|
|
2098
2162
|
}),
|
|
2099
2163
|
/* @__PURE__ */ t("span", {
|
|
2100
|
-
className:
|
|
2164
|
+
className: bt.switch,
|
|
2101
2165
|
"aria-hidden": "true",
|
|
2102
|
-
children: /* @__PURE__ */ t("span", { className:
|
|
2166
|
+
children: /* @__PURE__ */ t("span", { className: bt.thumb })
|
|
2103
2167
|
}),
|
|
2104
2168
|
i && /* @__PURE__ */ t("span", {
|
|
2105
|
-
className:
|
|
2169
|
+
className: bt.label,
|
|
2106
2170
|
children: i
|
|
2107
2171
|
})
|
|
2108
2172
|
]
|
|
2109
2173
|
});
|
|
2110
|
-
},
|
|
2174
|
+
}, Q = {
|
|
2111
2175
|
root: "_root_y4bhr_1",
|
|
2112
2176
|
toolbar: "_toolbar_y4bhr_15",
|
|
2113
2177
|
totalWidget: "_totalWidget_y4bhr_31",
|
|
@@ -2166,10 +2230,10 @@ var M = {
|
|
|
2166
2230
|
default: "_default_y4bhr_1011",
|
|
2167
2231
|
tableOnMobile: "_tableOnMobile_y4bhr_1011",
|
|
2168
2232
|
wide: "_wide_y4bhr_1041"
|
|
2169
|
-
},
|
|
2233
|
+
}, St = b({
|
|
2170
2234
|
rowSortingFeature: y,
|
|
2171
2235
|
sortedRowModel: v()
|
|
2172
|
-
}),
|
|
2236
|
+
}), Ct = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
2173
2237
|
let o = e.type === "multi-select" ? e.options : void 0, [s, c] = g(Array.isArray(o) ? o : []), [l, u] = g(!1);
|
|
2174
2238
|
return d(() => {
|
|
2175
2239
|
if (o === void 0) return;
|
|
@@ -2185,7 +2249,7 @@ var M = {
|
|
|
2185
2249
|
}), () => {
|
|
2186
2250
|
e = !1;
|
|
2187
2251
|
};
|
|
2188
|
-
}, [o]), e.type === "multi-select" ? /* @__PURE__ */ t(
|
|
2252
|
+
}, [o]), e.type === "multi-select" ? /* @__PURE__ */ t(yt, {
|
|
2189
2253
|
label: e.label,
|
|
2190
2254
|
options: s,
|
|
2191
2255
|
value: Array.isArray(n) ? n.map(String) : [],
|
|
@@ -2193,7 +2257,7 @@ var M = {
|
|
|
2193
2257
|
placeholder: l ? "Загрузка…" : e.placeholder,
|
|
2194
2258
|
error: a,
|
|
2195
2259
|
onChange: (e) => r(e)
|
|
2196
|
-
}) : e.type === "switch" ? /* @__PURE__ */ t(
|
|
2260
|
+
}) : e.type === "switch" ? /* @__PURE__ */ t(xt, {
|
|
2197
2261
|
label: e.label,
|
|
2198
2262
|
checked: !!n,
|
|
2199
2263
|
disabled: i,
|
|
@@ -2203,7 +2267,7 @@ var M = {
|
|
|
2203
2267
|
setValue: r,
|
|
2204
2268
|
disabled: i,
|
|
2205
2269
|
error: a
|
|
2206
|
-
}) : /* @__PURE__ */ t(
|
|
2270
|
+
}) : /* @__PURE__ */ t(mt, {
|
|
2207
2271
|
label: e.label,
|
|
2208
2272
|
type: e.type === "search" ? "search" : "text",
|
|
2209
2273
|
value: String(n ?? ""),
|
|
@@ -2212,20 +2276,20 @@ var M = {
|
|
|
2212
2276
|
error: a,
|
|
2213
2277
|
onChange: (e) => r(e)
|
|
2214
2278
|
});
|
|
2215
|
-
},
|
|
2279
|
+
}, wt = (e, t, n) => {
|
|
2216
2280
|
let r = new Set(e);
|
|
2217
2281
|
return t.forEach((e) => {
|
|
2218
2282
|
n ? r.add(e) : r.delete(e);
|
|
2219
2283
|
}), Array.from(r);
|
|
2220
|
-
},
|
|
2284
|
+
}, Tt = (e) => {
|
|
2221
2285
|
if (!(!e || e.width === void 0 && e.minWidth === void 0 && e.maxWidth === void 0)) return {
|
|
2222
2286
|
width: e.width,
|
|
2223
2287
|
minWidth: e.minWidth,
|
|
2224
2288
|
maxWidth: e.maxWidth
|
|
2225
2289
|
};
|
|
2226
|
-
},
|
|
2290
|
+
}, Et = (e) => {
|
|
2227
2291
|
if (e?.sticky) return e.sticky === "start" ? { insetInlineStart: e.stickyOffset ?? 0 } : { insetInlineEnd: e.stickyOffset ?? 0 };
|
|
2228
|
-
},
|
|
2292
|
+
}, Dt = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
|
|
2229
2293
|
0,
|
|
2230
2294
|
1,
|
|
2231
2295
|
2,
|
|
@@ -2249,7 +2313,7 @@ var M = {
|
|
|
2249
2313
|
e + 1,
|
|
2250
2314
|
"ellipsis-end",
|
|
2251
2315
|
t - 1
|
|
2252
|
-
],
|
|
2316
|
+
], Ot = (e, t) => {
|
|
2253
2317
|
let n = /* @__PURE__ */ new Set();
|
|
2254
2318
|
for (let t of e) {
|
|
2255
2319
|
if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
|
|
@@ -2261,36 +2325,36 @@ var M = {
|
|
|
2261
2325
|
for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
|
|
2262
2326
|
}
|
|
2263
2327
|
return null;
|
|
2264
|
-
},
|
|
2328
|
+
}, kt = (e, t) => typeof e == "function" ? e(t) : t[e], At = (e) => {
|
|
2265
2329
|
if (e == null || e === "") return null;
|
|
2266
2330
|
let t = Date.parse(String(e));
|
|
2267
2331
|
return Number.isNaN(t) ? null : t;
|
|
2268
|
-
},
|
|
2269
|
-
let r =
|
|
2332
|
+
}, jt = (e, t, n) => {
|
|
2333
|
+
let r = At(e.getValue(n)), i = At(t.getValue(n));
|
|
2270
2334
|
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
2271
|
-
},
|
|
2335
|
+
}, Mt = (e, t, n) => {
|
|
2272
2336
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2273
2337
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
2274
|
-
},
|
|
2338
|
+
}, Nt = (e, t, n) => {
|
|
2275
2339
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2276
2340
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
2277
|
-
},
|
|
2341
|
+
}, Pt = (e, t, n) => {
|
|
2278
2342
|
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
2279
2343
|
return r.localeCompare(i, void 0, {
|
|
2280
2344
|
numeric: !0,
|
|
2281
2345
|
sensitivity: "base"
|
|
2282
2346
|
});
|
|
2283
|
-
},
|
|
2347
|
+
}, Ft = (e) => {
|
|
2284
2348
|
switch (e) {
|
|
2285
|
-
case "date": return
|
|
2286
|
-
case "number": return
|
|
2287
|
-
case "boolean": return
|
|
2349
|
+
case "date": return jt;
|
|
2350
|
+
case "number": return Mt;
|
|
2351
|
+
case "boolean": return Nt;
|
|
2288
2352
|
case "text":
|
|
2289
|
-
case void 0: return
|
|
2353
|
+
case void 0: return Pt;
|
|
2290
2354
|
case "custom": return;
|
|
2291
2355
|
}
|
|
2292
|
-
},
|
|
2293
|
-
let t = (t) =>
|
|
2356
|
+
}, It = (e) => {
|
|
2357
|
+
let t = (t) => kt(e.accessor, t), n = e.sortFn ?? Ft(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
|
|
2294
2358
|
id: e.id,
|
|
2295
2359
|
accessorFn: t,
|
|
2296
2360
|
header: () => e.header,
|
|
@@ -2302,290 +2366,290 @@ var M = {
|
|
|
2302
2366
|
sortDescFirst: e.sortDescFirst
|
|
2303
2367
|
};
|
|
2304
2368
|
return n !== void 0 && (i.sortFn = n), i;
|
|
2305
|
-
},
|
|
2369
|
+
}, Lt = ({ columns: e, data: i, tableOnMobile: a = !1, mobileView: o, breakpoint: s = "default", sorting: c, onSortingChange: l, renderMobileCard: u, getRowId: f, getRowClassName: p, getRowStyle: h, toolbarContent: _, totalCountVariant: v = "default", totalCountLabel: y = "Всего", caption: b, ariaLabel: S, loading: C = !1, error: w, emptyState: T = "Нет данных", stickyHeader: E = !1, maxHeight: D, className: O = "", onRowClick: k, selectable: A = !1, selectedRowIds: M, onSelectedRowIdsChange: ee, onRowDoubleClick: N, getRowSelectionLabel: P, selectAllRowsLabel: F = "Выбрать все строки на этой странице", resetSelectionLabel: I = "Сбросить выбор", openRowLabel: L = "Открыть строку", pagination: R = !1, paginationMode: z = "client", page: B = 1, pageSize: V = 30, onPageSizeChange: H, pageSizeOptions: U = [
|
|
2306
2370
|
10,
|
|
2307
2371
|
30,
|
|
2308
2372
|
50,
|
|
2309
2373
|
-1
|
|
2310
|
-
], pageSizeDraft: W, onPageSizeDraftChange: te, pageSizeApplyMode: ne = "table", totalCount: re, onPageChange: ie, visibleColumnIds: ae, density: oe = "comfortable", renderBulkActions: se, renderExpandedRow: ce, expandedRowIds:
|
|
2311
|
-
let [
|
|
2374
|
+
], pageSizeDraft: W, onPageSizeDraftChange: te, pageSizeApplyMode: ne = "table", totalCount: re, onPageChange: ie, visibleColumnIds: ae, density: oe = "comfortable", renderBulkActions: se, renderExpandedRow: ce, expandedRowIds: G, onExpandedRowIdsChange: le, getRowExpansionLabel: ue, resultsAnnouncement: de, filterBar: K }) => {
|
|
2375
|
+
let [fe, pe] = g([]), [me, he] = g([]), [ge, _e] = g([]), [ve, ye] = g(0), [be, xe] = g(V === -1 ? -1 : [
|
|
2312
2376
|
10,
|
|
2313
2377
|
30,
|
|
2314
2378
|
50
|
|
2315
|
-
].includes(V) ? V : 30),
|
|
2379
|
+
].includes(V) ? V : 30), Se = c ?? fe, Ce = Se.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), we = V === -1, Te = we ? Math.max(1, (z === "server" ? Number(re) : i.length) || i.length || 1) : Number.isFinite(V) && V > 0 ? Math.floor(V) : 30, Ee = R && z === "server", q = m(() => {
|
|
2316
2380
|
if (ae === void 0) return e;
|
|
2317
2381
|
let t = new Set(ae);
|
|
2318
2382
|
return e.filter((e) => t.has(e.id));
|
|
2319
|
-
}, [e, ae]), De = m(() => q.length === 0 ? "Должна быть видима хотя бы одна колонка" :
|
|
2320
|
-
features:
|
|
2321
|
-
columns:
|
|
2383
|
+
}, [e, ae]), De = m(() => q.length === 0 ? "Должна быть видима хотя бы одна колонка" : Ot(q, i), [i, q]), Oe = m(() => q.map(It), [q]), ke = q.some((e) => Tt(e) !== void 0), J = x({
|
|
2384
|
+
features: St,
|
|
2385
|
+
columns: Oe,
|
|
2322
2386
|
data: i,
|
|
2323
|
-
state: { sorting:
|
|
2387
|
+
state: { sorting: Se },
|
|
2324
2388
|
onSortingChange: (e) => {
|
|
2325
|
-
let t = typeof e == "function" ? e(
|
|
2326
|
-
c === void 0 &&
|
|
2389
|
+
let t = typeof e == "function" ? e(Se) : e;
|
|
2390
|
+
c === void 0 && pe(t), ye(0), l?.(t);
|
|
2327
2391
|
},
|
|
2328
2392
|
getRowId: f
|
|
2329
|
-
}),
|
|
2330
|
-
K,
|
|
2393
|
+
}), Ae = J.getRowModel().rows, je = Ee && Number.isFinite(re) && Number(re) >= 0 ? Math.floor(Number(re)) : Ae.length, Me = R ? Math.max(1, Math.ceil(je / Te)) : 1, X = Number.isFinite(B) && B > 0 ? Math.floor(B) - 1 : 0, Pe = Math.min(Ee ? X : ve, Me - 1), Fe = m(() => R && !Ee ? Ae.slice(Pe * Te, (Pe + 1) * Te) : Ae, [
|
|
2331
2394
|
Ee,
|
|
2395
|
+
Te,
|
|
2332
2396
|
R,
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
]),
|
|
2397
|
+
Pe,
|
|
2398
|
+
Ae
|
|
2399
|
+
]), Ie = M ?? me, Le = m(() => new Set(Ie), [Ie]), Re = G ?? ge, ze = m(() => new Set(Re), [Re]), Be = m(() => Fe.map((e) => e.id), [Fe]), Ve = Be.filter((e) => Le.has(e)).length, He = Be.length > 0 && Ve === Be.length, Ue = Ve > 0 && !He, We = m(() => q.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
2336
2400
|
id: e.id,
|
|
2337
2401
|
label: typeof e.header == "string" ? e.header : e.id
|
|
2338
|
-
})), [q]),
|
|
2339
|
-
|
|
2340
|
-
s === "wide" ?
|
|
2341
|
-
|
|
2342
|
-
oe === "compact" ?
|
|
2402
|
+
})), [q]), Ge = m(() => Dt(Pe, Me), [Me, Pe]), Ke = o === void 0 ? a : o === "table", qe = [
|
|
2403
|
+
Q.root,
|
|
2404
|
+
s === "wide" ? Q.wide : Q.default,
|
|
2405
|
+
Ke ? Q.tableOnMobile : "",
|
|
2406
|
+
oe === "compact" ? Q.compact : "",
|
|
2343
2407
|
O
|
|
2344
|
-
].filter(Boolean).join(" "),
|
|
2345
|
-
|
|
2346
|
-
},
|
|
2347
|
-
let i =
|
|
2408
|
+
].filter(Boolean).join(" "), Je = De ?? w, Ye = R && !we && !Je && je > Te && (!C || Ee), Xe = R && !!(H || te || K), Ze = W ?? be, Qe = K ? (typeof K.validation == "function" ? K.validation(K.draftValues) : K.validation) ?? {} : {}, $e = K ? JSON.stringify(K.draftValues) !== JSON.stringify(K.appliedValues) || Ze !== V : !1, et = Object.values(Qe).some(Boolean), tt = je === 0 ? 0 : Pe * Te + 1, nt = Math.min((Pe + 1) * Te, je), rt = () => {
|
|
2409
|
+
Ze !== V && (ye(0), ie?.(1), H?.(Ze));
|
|
2410
|
+
}, Z = (e, r = !1) => {
|
|
2411
|
+
let i = Ze !== V, a = `ds-data-table-page-size-warning-${e}`;
|
|
2348
2412
|
return /* @__PURE__ */ n("div", {
|
|
2349
|
-
className: `${
|
|
2413
|
+
className: `${Q.pageSizePanel} ${Q[e]} ${r ? Q.embedded : ""}`,
|
|
2350
2414
|
children: [
|
|
2351
2415
|
/* @__PURE__ */ n("div", {
|
|
2352
|
-
className:
|
|
2416
|
+
className: Q.pageSizeMain,
|
|
2353
2417
|
children: [/* @__PURE__ */ n("fieldset", {
|
|
2354
|
-
className:
|
|
2355
|
-
disabled: C ||
|
|
2418
|
+
className: Q.pageSizeFieldset,
|
|
2419
|
+
disabled: C || K?.applying,
|
|
2356
2420
|
children: [/* @__PURE__ */ t("legend", { children: "На странице" }), /* @__PURE__ */ t("div", {
|
|
2357
|
-
className:
|
|
2421
|
+
className: Q.pageSizeOptions,
|
|
2358
2422
|
children: U.map((e) => /* @__PURE__ */ t("button", {
|
|
2359
2423
|
type: "button",
|
|
2360
|
-
className: `${
|
|
2361
|
-
"aria-pressed":
|
|
2424
|
+
className: `${Q.pageSizeOption} ${Ze === e ? Q.pageSizeOptionActive : ""}`,
|
|
2425
|
+
"aria-pressed": Ze === e,
|
|
2362
2426
|
onClick: () => {
|
|
2363
|
-
W === void 0 &&
|
|
2427
|
+
W === void 0 && xe(e), te?.(e);
|
|
2364
2428
|
},
|
|
2365
2429
|
children: e === -1 ? "Все" : e
|
|
2366
2430
|
}, e))
|
|
2367
2431
|
})]
|
|
2368
|
-
}), ne === "table" && !
|
|
2432
|
+
}), ne === "table" && !K && /* @__PURE__ */ t(j, {
|
|
2369
2433
|
size: "sm",
|
|
2370
2434
|
disabled: C || !i,
|
|
2371
|
-
"aria-describedby":
|
|
2372
|
-
onClick:
|
|
2435
|
+
"aria-describedby": Ze === -1 && i && e === "top" ? a : void 0,
|
|
2436
|
+
onClick: rt,
|
|
2373
2437
|
children: "Применить"
|
|
2374
2438
|
})]
|
|
2375
2439
|
}),
|
|
2376
2440
|
/* @__PURE__ */ n("span", {
|
|
2377
|
-
className:
|
|
2441
|
+
className: Q.paginationRange,
|
|
2378
2442
|
children: [
|
|
2379
2443
|
"Показано ",
|
|
2380
|
-
|
|
2444
|
+
tt,
|
|
2381
2445
|
"–",
|
|
2382
|
-
|
|
2446
|
+
nt,
|
|
2383
2447
|
" из ",
|
|
2384
|
-
|
|
2448
|
+
je
|
|
2385
2449
|
]
|
|
2386
2450
|
}),
|
|
2387
|
-
|
|
2388
|
-
className:
|
|
2451
|
+
$e && e === "top" && /* @__PURE__ */ t("span", {
|
|
2452
|
+
className: Q.pendingChanges,
|
|
2389
2453
|
role: "status",
|
|
2390
2454
|
children: "Есть неприменённые изменения"
|
|
2391
2455
|
}),
|
|
2392
|
-
|
|
2456
|
+
Ee && Ze === -1 && i && /* @__PURE__ */ n("span", {
|
|
2393
2457
|
id: a,
|
|
2394
|
-
className:
|
|
2458
|
+
className: Q.pageSizeWarning,
|
|
2395
2459
|
"aria-hidden": e === "bottom" || void 0,
|
|
2396
2460
|
children: [
|
|
2397
2461
|
"Будут загружены все ",
|
|
2398
|
-
|
|
2462
|
+
je,
|
|
2399
2463
|
" записей"
|
|
2400
2464
|
]
|
|
2401
2465
|
})
|
|
2402
2466
|
]
|
|
2403
2467
|
});
|
|
2404
|
-
},
|
|
2405
|
-
let t = Math.max(0, Math.min(
|
|
2406
|
-
if (
|
|
2407
|
-
t !==
|
|
2468
|
+
}, at = (e) => {
|
|
2469
|
+
let t = Math.max(0, Math.min(Me - 1, e));
|
|
2470
|
+
if (Ee) {
|
|
2471
|
+
t !== Pe && ie?.(t + 1);
|
|
2408
2472
|
return;
|
|
2409
2473
|
}
|
|
2410
|
-
|
|
2411
|
-
},
|
|
2474
|
+
ye(t);
|
|
2475
|
+
}, ot = (e) => {
|
|
2412
2476
|
let t = Array.from(e);
|
|
2413
|
-
M === void 0 &&
|
|
2414
|
-
},
|
|
2415
|
-
let t = new Set(
|
|
2416
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
2417
|
-
},
|
|
2418
|
-
let e =
|
|
2419
|
-
M === void 0 &&
|
|
2420
|
-
},
|
|
2421
|
-
let t = new Set(
|
|
2477
|
+
M === void 0 && he(t), ee?.(t);
|
|
2478
|
+
}, st = (e) => {
|
|
2479
|
+
let t = new Set(Le);
|
|
2480
|
+
t.has(e) ? t.delete(e) : t.add(e), ot(t);
|
|
2481
|
+
}, ct = () => {
|
|
2482
|
+
let e = wt(Le, Be, !He);
|
|
2483
|
+
M === void 0 && he(e), ee?.(e);
|
|
2484
|
+
}, lt = () => ot(/* @__PURE__ */ new Set()), ut = (e) => {
|
|
2485
|
+
let t = new Set(ze);
|
|
2422
2486
|
t.has(e) ? t.delete(e) : t.add(e);
|
|
2423
2487
|
let n = Array.from(t);
|
|
2424
|
-
|
|
2425
|
-
},
|
|
2426
|
-
visibleCount:
|
|
2427
|
-
totalCount:
|
|
2428
|
-
selectedCount:
|
|
2429
|
-
}) ?? `Показано строк: ${
|
|
2488
|
+
G === void 0 && _e(n), le?.(n);
|
|
2489
|
+
}, dt = i.filter((e, t) => Le.has(f?.(e, t) ?? String(t))), pt = de?.({
|
|
2490
|
+
visibleCount: Fe.length,
|
|
2491
|
+
totalCount: je,
|
|
2492
|
+
selectedCount: Le.size
|
|
2493
|
+
}) ?? `Показано строк: ${Fe.length} из ${je}. Выбрано: ${Le.size}.`;
|
|
2430
2494
|
return d(() => {
|
|
2431
|
-
|
|
2495
|
+
Ee || ye(0);
|
|
2432
2496
|
}, [
|
|
2433
2497
|
i,
|
|
2434
|
-
K,
|
|
2435
2498
|
Ee,
|
|
2499
|
+
Te,
|
|
2436
2500
|
R,
|
|
2437
|
-
|
|
2501
|
+
Ce
|
|
2438
2502
|
]), d(() => {
|
|
2439
|
-
!
|
|
2503
|
+
!Ee && ve >= Me && ye(Me - 1);
|
|
2440
2504
|
}, [
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2505
|
+
Ee,
|
|
2506
|
+
Me,
|
|
2507
|
+
ve
|
|
2444
2508
|
]), d(() => {
|
|
2445
|
-
|
|
2509
|
+
xe(V === -1 ? -1 : [
|
|
2446
2510
|
10,
|
|
2447
2511
|
30,
|
|
2448
2512
|
50
|
|
2449
2513
|
].includes(V) ? V : 30);
|
|
2450
2514
|
}, [V]), /* @__PURE__ */ n("section", {
|
|
2451
|
-
className:
|
|
2515
|
+
className: qe,
|
|
2452
2516
|
"aria-busy": C,
|
|
2453
2517
|
children: [
|
|
2454
2518
|
/* @__PURE__ */ t("div", {
|
|
2455
|
-
className:
|
|
2519
|
+
className: Q.srOnly,
|
|
2456
2520
|
"aria-live": "polite",
|
|
2457
2521
|
"aria-atomic": "true",
|
|
2458
|
-
children:
|
|
2522
|
+
children: pt
|
|
2459
2523
|
}),
|
|
2460
|
-
se &&
|
|
2461
|
-
className:
|
|
2524
|
+
se && Le.size > 0 && /* @__PURE__ */ t("div", {
|
|
2525
|
+
className: Q.bulkActions,
|
|
2462
2526
|
role: "region",
|
|
2463
2527
|
"aria-label": "Действия с выбранными строками",
|
|
2464
2528
|
children: se({
|
|
2465
|
-
selectedRowIds: Array.from(
|
|
2466
|
-
selectedRows:
|
|
2467
|
-
clearSelection:
|
|
2529
|
+
selectedRowIds: Array.from(Le),
|
|
2530
|
+
selectedRows: dt,
|
|
2531
|
+
clearSelection: lt
|
|
2468
2532
|
})
|
|
2469
2533
|
}),
|
|
2470
|
-
|
|
2471
|
-
className:
|
|
2534
|
+
K && /* @__PURE__ */ n("form", {
|
|
2535
|
+
className: Q.filterBar,
|
|
2472
2536
|
role: "search",
|
|
2473
2537
|
"aria-label": "Фильтры таблицы",
|
|
2474
2538
|
onSubmit: (e) => {
|
|
2475
|
-
e.preventDefault(), !(
|
|
2476
|
-
filters:
|
|
2477
|
-
pageSize:
|
|
2539
|
+
e.preventDefault(), !(!$e || et || K.applying || C) && (ye(0), ie?.(1), K.onApply({
|
|
2540
|
+
filters: K.draftValues,
|
|
2541
|
+
pageSize: Ze
|
|
2478
2542
|
}));
|
|
2479
2543
|
},
|
|
2480
2544
|
children: [
|
|
2481
2545
|
/* @__PURE__ */ t("div", {
|
|
2482
|
-
className:
|
|
2483
|
-
children:
|
|
2546
|
+
className: Q.filterFields,
|
|
2547
|
+
children: K.fields.map((e) => /* @__PURE__ */ t(Ct, {
|
|
2484
2548
|
field: e,
|
|
2485
|
-
value:
|
|
2486
|
-
disabled: !!(e.disabled ||
|
|
2487
|
-
error:
|
|
2488
|
-
setValue: (t) =>
|
|
2489
|
-
...
|
|
2549
|
+
value: K.draftValues[e.key],
|
|
2550
|
+
disabled: !!(e.disabled || K.applying || C),
|
|
2551
|
+
error: Qe[e.key],
|
|
2552
|
+
setValue: (t) => K.onDraftValuesChange({
|
|
2553
|
+
...K.draftValues,
|
|
2490
2554
|
[e.key]: t
|
|
2491
2555
|
})
|
|
2492
2556
|
}, e.key))
|
|
2493
2557
|
}),
|
|
2494
|
-
|
|
2558
|
+
Xe && Z("top", !0),
|
|
2495
2559
|
/* @__PURE__ */ n("div", {
|
|
2496
|
-
className:
|
|
2560
|
+
className: Q.filterActions,
|
|
2497
2561
|
children: [/* @__PURE__ */ t(j, {
|
|
2498
2562
|
variant: "empty",
|
|
2499
|
-
disabled:
|
|
2563
|
+
disabled: K.applying || C,
|
|
2500
2564
|
onClick: () => {
|
|
2501
|
-
let e =
|
|
2502
|
-
|
|
2503
|
-
let t =
|
|
2504
|
-
W === void 0 &&
|
|
2565
|
+
let e = K.resetValues ?? K.appliedValues;
|
|
2566
|
+
K.onDraftValuesChange(e);
|
|
2567
|
+
let t = K.resetPageSize ?? U[0] ?? 30;
|
|
2568
|
+
W === void 0 && xe(t), te?.(t), K.onReset?.({
|
|
2505
2569
|
filters: e,
|
|
2506
2570
|
pageSize: t
|
|
2507
2571
|
});
|
|
2508
2572
|
},
|
|
2509
|
-
children:
|
|
2573
|
+
children: K.resetLabel ?? "Сбросить"
|
|
2510
2574
|
}), /* @__PURE__ */ t(j, {
|
|
2511
2575
|
type: "submit",
|
|
2512
|
-
isLoading:
|
|
2513
|
-
disabled:
|
|
2514
|
-
children:
|
|
2576
|
+
isLoading: K.applying,
|
|
2577
|
+
disabled: !$e || et || C,
|
|
2578
|
+
children: K.applyLabel ?? "Применить"
|
|
2515
2579
|
})]
|
|
2516
2580
|
})
|
|
2517
2581
|
]
|
|
2518
2582
|
}),
|
|
2519
|
-
|
|
2583
|
+
Xe && !K && Z("top"),
|
|
2520
2584
|
(v === "highlighted" || _ != null) && /* @__PURE__ */ n("div", {
|
|
2521
|
-
className:
|
|
2585
|
+
className: Q.toolbar,
|
|
2522
2586
|
children: [v === "highlighted" && /* @__PURE__ */ n("div", {
|
|
2523
|
-
className:
|
|
2524
|
-
"aria-label": `${y}: ${
|
|
2587
|
+
className: Q.totalWidget,
|
|
2588
|
+
"aria-label": `${y}: ${je}`,
|
|
2525
2589
|
children: [/* @__PURE__ */ t("span", {
|
|
2526
|
-
className:
|
|
2590
|
+
className: Q.totalLabel,
|
|
2527
2591
|
children: y
|
|
2528
2592
|
}), /* @__PURE__ */ t("strong", {
|
|
2529
|
-
className:
|
|
2530
|
-
children:
|
|
2593
|
+
className: Q.totalValue,
|
|
2594
|
+
children: je
|
|
2531
2595
|
})]
|
|
2532
2596
|
}), _]
|
|
2533
2597
|
}),
|
|
2534
|
-
!
|
|
2535
|
-
className:
|
|
2536
|
-
options:
|
|
2537
|
-
value:
|
|
2538
|
-
id:
|
|
2539
|
-
direction:
|
|
2598
|
+
!Ke && !C && !Je && Fe.length > 0 && We.length > 0 && /* @__PURE__ */ t(ft, {
|
|
2599
|
+
className: Q.mobileSort,
|
|
2600
|
+
options: We,
|
|
2601
|
+
value: Se[0] ? {
|
|
2602
|
+
id: Se[0].id,
|
|
2603
|
+
direction: Se[0].desc ? "desc" : "asc"
|
|
2540
2604
|
} : null,
|
|
2541
|
-
onChange: (e) =>
|
|
2605
|
+
onChange: (e) => J.setSorting([{
|
|
2542
2606
|
id: e.id,
|
|
2543
2607
|
desc: e.direction === "desc"
|
|
2544
2608
|
}])
|
|
2545
2609
|
}),
|
|
2546
2610
|
/* @__PURE__ */ t("div", {
|
|
2547
|
-
className:
|
|
2611
|
+
className: Q.tableWrap,
|
|
2548
2612
|
style: { maxHeight: D },
|
|
2549
2613
|
children: /* @__PURE__ */ n("table", {
|
|
2550
|
-
className:
|
|
2614
|
+
className: Q.table,
|
|
2551
2615
|
"aria-label": S,
|
|
2552
2616
|
children: [
|
|
2553
2617
|
b && /* @__PURE__ */ t("caption", { children: b }),
|
|
2554
2618
|
(ke || A || !!ce) && /* @__PURE__ */ n("colgroup", { children: [
|
|
2555
|
-
ce && /* @__PURE__ */ t("col", { className:
|
|
2556
|
-
A && /* @__PURE__ */ t("col", { className:
|
|
2557
|
-
q.map((e) => /* @__PURE__ */ t("col", { style:
|
|
2619
|
+
ce && /* @__PURE__ */ t("col", { className: Q.expansionColumn }),
|
|
2620
|
+
A && /* @__PURE__ */ t("col", { className: Q.selectionColumn }),
|
|
2621
|
+
q.map((e) => /* @__PURE__ */ t("col", { style: Tt(e) }, e.id))
|
|
2558
2622
|
] }),
|
|
2559
2623
|
/* @__PURE__ */ t("thead", {
|
|
2560
|
-
className: E ?
|
|
2561
|
-
children:
|
|
2624
|
+
className: E ? Q.sticky : "",
|
|
2625
|
+
children: J.getHeaderGroups().map((e) => /* @__PURE__ */ n("tr", { children: [
|
|
2562
2626
|
ce && /* @__PURE__ */ t("th", {
|
|
2563
|
-
className:
|
|
2627
|
+
className: Q.expansionCell,
|
|
2564
2628
|
scope: "col",
|
|
2565
2629
|
children: /* @__PURE__ */ t("span", {
|
|
2566
|
-
className:
|
|
2630
|
+
className: Q.srOnly,
|
|
2567
2631
|
children: "Подробности"
|
|
2568
2632
|
})
|
|
2569
2633
|
}),
|
|
2570
2634
|
A && /* @__PURE__ */ t("th", {
|
|
2571
|
-
className:
|
|
2635
|
+
className: Q.selectionHeaderCell,
|
|
2572
2636
|
scope: "col",
|
|
2573
2637
|
children: /* @__PURE__ */ n("div", {
|
|
2574
|
-
className:
|
|
2575
|
-
children: [/* @__PURE__ */ t(
|
|
2576
|
-
checked:
|
|
2577
|
-
indeterminate:
|
|
2578
|
-
disabled: C ||
|
|
2638
|
+
className: Q.selectionHeaderControls,
|
|
2639
|
+
children: [/* @__PURE__ */ t(Ne, {
|
|
2640
|
+
checked: He,
|
|
2641
|
+
indeterminate: Ue,
|
|
2642
|
+
disabled: C || Be.length === 0,
|
|
2579
2643
|
ariaLabel: F,
|
|
2580
|
-
onChange:
|
|
2644
|
+
onChange: ct
|
|
2581
2645
|
}), /* @__PURE__ */ t(j, {
|
|
2582
2646
|
size: "sm",
|
|
2583
2647
|
variant: "empty",
|
|
2584
|
-
disabled:
|
|
2648
|
+
disabled: Le.size === 0,
|
|
2585
2649
|
"aria-label": I,
|
|
2586
2650
|
title: I,
|
|
2587
|
-
onClick:
|
|
2588
|
-
children: /* @__PURE__ */ t(
|
|
2651
|
+
onClick: lt,
|
|
2652
|
+
children: /* @__PURE__ */ t(Y, {
|
|
2589
2653
|
name: "IconX",
|
|
2590
2654
|
width: 16,
|
|
2591
2655
|
height: 16
|
|
@@ -2598,17 +2662,17 @@ var M = {
|
|
|
2598
2662
|
return /* @__PURE__ */ t("th", {
|
|
2599
2663
|
scope: "col",
|
|
2600
2664
|
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
2601
|
-
className: q.find((t) => t.id === e.column.id)?.sticky ?
|
|
2665
|
+
className: q.find((t) => t.id === e.column.id)?.sticky ? Q.stickyColumn : void 0,
|
|
2602
2666
|
style: {
|
|
2603
|
-
...
|
|
2604
|
-
...
|
|
2667
|
+
...Tt(q.find((t) => t.id === e.column.id)),
|
|
2668
|
+
...Et(q.find((t) => t.id === e.column.id))
|
|
2605
2669
|
},
|
|
2606
2670
|
children: /* @__PURE__ */ n("button", {
|
|
2607
2671
|
type: "button",
|
|
2608
|
-
className:
|
|
2672
|
+
className: Q.sortButton,
|
|
2609
2673
|
disabled: !i,
|
|
2610
2674
|
onClick: a,
|
|
2611
|
-
children: [/* @__PURE__ */ t(
|
|
2675
|
+
children: [/* @__PURE__ */ t(J.FlexRender, { header: e }), /* @__PURE__ */ t(Y, {
|
|
2612
2676
|
name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
|
|
2613
2677
|
width: 16,
|
|
2614
2678
|
height: 16
|
|
@@ -2620,85 +2684,85 @@ var M = {
|
|
|
2620
2684
|
}),
|
|
2621
2685
|
/* @__PURE__ */ t("tbody", { children: C ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2622
2686
|
colSpan: q.length + +!!A + +!!ce,
|
|
2623
|
-
children: /* @__PURE__ */ t(
|
|
2687
|
+
children: /* @__PURE__ */ t(it, {
|
|
2624
2688
|
lines: 3,
|
|
2625
2689
|
height: 65
|
|
2626
2690
|
})
|
|
2627
|
-
}) }) :
|
|
2628
|
-
className:
|
|
2691
|
+
}) }) : Je ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2692
|
+
className: Q.state,
|
|
2629
2693
|
colSpan: q.length + +!!A + +!!ce,
|
|
2630
|
-
children:
|
|
2631
|
-
}) }) :
|
|
2632
|
-
className:
|
|
2694
|
+
children: Je
|
|
2695
|
+
}) }) : Fe.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2696
|
+
className: Q.state,
|
|
2633
2697
|
colSpan: q.length + +!!A + +!!ce,
|
|
2634
2698
|
children: T
|
|
2635
|
-
}) }) :
|
|
2636
|
-
let i =
|
|
2699
|
+
}) }) : Fe.map((e) => {
|
|
2700
|
+
let i = Le.has(e.id), a = P?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = ze.has(e.id);
|
|
2637
2701
|
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ n("tr", {
|
|
2638
2702
|
className: [
|
|
2639
|
-
k || A ?
|
|
2640
|
-
i ?
|
|
2703
|
+
k || A ? Q.clickableRow : "",
|
|
2704
|
+
i ? Q.selectedRow : "",
|
|
2641
2705
|
p?.(e.original)
|
|
2642
2706
|
].filter(Boolean).join(" "),
|
|
2643
2707
|
style: h?.(e.original),
|
|
2644
2708
|
"aria-selected": A ? i : void 0,
|
|
2645
2709
|
onClick: () => {
|
|
2646
|
-
A ?
|
|
2710
|
+
A ? st(e.id) : k?.(e.original);
|
|
2647
2711
|
},
|
|
2648
2712
|
onDoubleClick: () => {
|
|
2649
2713
|
A && N?.(e.original);
|
|
2650
2714
|
},
|
|
2651
2715
|
onKeyDown: (t) => {
|
|
2652
|
-
t.key === "Enter" ? (t.preventDefault(), A ? N?.(e.original) : k?.(e.original)) : t.key === " " && A && (t.preventDefault(),
|
|
2716
|
+
t.key === "Enter" ? (t.preventDefault(), A ? N?.(e.original) : k?.(e.original)) : t.key === " " && A && (t.preventDefault(), st(e.id));
|
|
2653
2717
|
},
|
|
2654
2718
|
tabIndex: k || A || N ? 0 : void 0,
|
|
2655
2719
|
role: !A && k ? "button" : void 0,
|
|
2656
2720
|
children: [
|
|
2657
2721
|
ce && /* @__PURE__ */ t("td", {
|
|
2658
|
-
className:
|
|
2722
|
+
className: Q.expansionCell,
|
|
2659
2723
|
onClick: (e) => e.stopPropagation(),
|
|
2660
2724
|
children: /* @__PURE__ */ t(j, {
|
|
2661
2725
|
size: "sm",
|
|
2662
2726
|
variant: "empty",
|
|
2663
2727
|
"aria-expanded": o,
|
|
2664
|
-
"aria-label":
|
|
2665
|
-
onClick: () =>
|
|
2666
|
-
children: /* @__PURE__ */ t(
|
|
2728
|
+
"aria-label": ue?.(e.original, o) ?? (o ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2729
|
+
onClick: () => ut(e.id),
|
|
2730
|
+
children: /* @__PURE__ */ t(Y, {
|
|
2667
2731
|
name: "IconChevron",
|
|
2668
2732
|
width: 16,
|
|
2669
2733
|
height: 16,
|
|
2670
|
-
className: o ?
|
|
2734
|
+
className: o ? Q.expansionIconOpen : Q.expansionIcon
|
|
2671
2735
|
})
|
|
2672
2736
|
})
|
|
2673
2737
|
}),
|
|
2674
2738
|
A && /* @__PURE__ */ t("td", {
|
|
2675
|
-
className:
|
|
2739
|
+
className: Q.selectionCell,
|
|
2676
2740
|
children: /* @__PURE__ */ t("div", {
|
|
2677
2741
|
onClick: (e) => e.stopPropagation(),
|
|
2678
|
-
children: /* @__PURE__ */ t(
|
|
2742
|
+
children: /* @__PURE__ */ t(Ne, {
|
|
2679
2743
|
checked: i,
|
|
2680
2744
|
ariaLabel: a,
|
|
2681
|
-
onChange: () =>
|
|
2745
|
+
onChange: () => st(e.id)
|
|
2682
2746
|
})
|
|
2683
2747
|
})
|
|
2684
2748
|
}),
|
|
2685
2749
|
e.getAllCells().map((e) => /* @__PURE__ */ t("td", {
|
|
2686
|
-
className: q.find((t) => t.id === e.column.id)?.sticky ?
|
|
2750
|
+
className: q.find((t) => t.id === e.column.id)?.sticky ? Q.stickyColumn : void 0,
|
|
2687
2751
|
style: {
|
|
2688
|
-
...
|
|
2689
|
-
...
|
|
2752
|
+
...Tt(q.find((t) => t.id === e.column.id)),
|
|
2753
|
+
...Et(q.find((t) => t.id === e.column.id))
|
|
2690
2754
|
},
|
|
2691
|
-
children: /* @__PURE__ */ t(
|
|
2755
|
+
children: /* @__PURE__ */ t(J.FlexRender, { cell: e })
|
|
2692
2756
|
}, e.id))
|
|
2693
2757
|
]
|
|
2694
2758
|
}), o && ce && /* @__PURE__ */ t("tr", {
|
|
2695
|
-
className:
|
|
2759
|
+
className: Q.detailRow,
|
|
2696
2760
|
children: /* @__PURE__ */ t("td", {
|
|
2697
2761
|
colSpan: q.length + +!!A + 1,
|
|
2698
2762
|
children: ce({
|
|
2699
2763
|
row: e.original,
|
|
2700
2764
|
rowId: e.id,
|
|
2701
|
-
collapse: () =>
|
|
2765
|
+
collapse: () => ut(e.id)
|
|
2702
2766
|
})
|
|
2703
2767
|
})
|
|
2704
2768
|
})] }, e.id);
|
|
@@ -2706,42 +2770,42 @@ var M = {
|
|
|
2706
2770
|
]
|
|
2707
2771
|
})
|
|
2708
2772
|
}),
|
|
2709
|
-
!
|
|
2710
|
-
className:
|
|
2773
|
+
!Ke && /* @__PURE__ */ n("div", {
|
|
2774
|
+
className: Q.cards,
|
|
2711
2775
|
role: "list",
|
|
2712
2776
|
"aria-label": S ?? b,
|
|
2713
|
-
children: [A && !C && !
|
|
2714
|
-
className:
|
|
2715
|
-
children: [/* @__PURE__ */ t(
|
|
2716
|
-
checked:
|
|
2717
|
-
indeterminate:
|
|
2777
|
+
children: [A && !C && !Je && Fe.length > 0 && /* @__PURE__ */ n("div", {
|
|
2778
|
+
className: Q.mobileSelectionControls,
|
|
2779
|
+
children: [/* @__PURE__ */ t(Ne, {
|
|
2780
|
+
checked: He,
|
|
2781
|
+
indeterminate: Ue,
|
|
2718
2782
|
ariaLabel: F,
|
|
2719
2783
|
label: F,
|
|
2720
|
-
onChange:
|
|
2784
|
+
onChange: ct
|
|
2721
2785
|
}), /* @__PURE__ */ t(j, {
|
|
2722
2786
|
size: "sm",
|
|
2723
2787
|
variant: "empty",
|
|
2724
|
-
disabled:
|
|
2725
|
-
onClick:
|
|
2788
|
+
disabled: Le.size === 0,
|
|
2789
|
+
onClick: lt,
|
|
2726
2790
|
children: I
|
|
2727
2791
|
})]
|
|
2728
|
-
}), C ? /* @__PURE__ */ t(
|
|
2792
|
+
}), C ? /* @__PURE__ */ t(it, {
|
|
2729
2793
|
lines: 4,
|
|
2730
2794
|
height: 65
|
|
2731
|
-
}) :
|
|
2732
|
-
className:
|
|
2733
|
-
children:
|
|
2734
|
-
}) :
|
|
2735
|
-
className:
|
|
2795
|
+
}) : Je ? /* @__PURE__ */ t("div", {
|
|
2796
|
+
className: Q.state,
|
|
2797
|
+
children: Je
|
|
2798
|
+
}) : Fe.length === 0 ? /* @__PURE__ */ t("div", {
|
|
2799
|
+
className: Q.state,
|
|
2736
2800
|
children: T
|
|
2737
|
-
}) :
|
|
2738
|
-
let r =
|
|
2739
|
-
className:
|
|
2801
|
+
}) : Fe.map((e) => {
|
|
2802
|
+
let r = Le.has(e.id), i = ze.has(e.id), a = P?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = A && /* @__PURE__ */ n("div", {
|
|
2803
|
+
className: Q.cardSelectionControls,
|
|
2740
2804
|
onClick: (e) => e.stopPropagation(),
|
|
2741
|
-
children: [/* @__PURE__ */ t(
|
|
2805
|
+
children: [/* @__PURE__ */ t(Ne, {
|
|
2742
2806
|
checked: r,
|
|
2743
2807
|
ariaLabel: a,
|
|
2744
|
-
onChange: () =>
|
|
2808
|
+
onChange: () => st(e.id)
|
|
2745
2809
|
}), N && /* @__PURE__ */ t(j, {
|
|
2746
2810
|
size: "sm",
|
|
2747
2811
|
variant: "empty",
|
|
@@ -2752,28 +2816,28 @@ var M = {
|
|
|
2752
2816
|
size: "sm",
|
|
2753
2817
|
variant: "empty",
|
|
2754
2818
|
"aria-expanded": i,
|
|
2755
|
-
"aria-label":
|
|
2819
|
+
"aria-label": ue?.(e.original, i) ?? (i ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2756
2820
|
onClick: (t) => {
|
|
2757
|
-
t.stopPropagation(),
|
|
2821
|
+
t.stopPropagation(), ut(e.id);
|
|
2758
2822
|
},
|
|
2759
|
-
children: /* @__PURE__ */ t(
|
|
2823
|
+
children: /* @__PURE__ */ t(Y, {
|
|
2760
2824
|
name: "IconChevron",
|
|
2761
2825
|
width: 16,
|
|
2762
2826
|
height: 16,
|
|
2763
|
-
className: i ?
|
|
2827
|
+
className: i ? Q.expansionIconOpen : Q.expansionIcon
|
|
2764
2828
|
})
|
|
2765
2829
|
});
|
|
2766
2830
|
if (u) return /* @__PURE__ */ n("div", {
|
|
2767
2831
|
role: "listitem",
|
|
2768
2832
|
className: [
|
|
2769
|
-
|
|
2770
|
-
r ?
|
|
2833
|
+
Q.customCardShell,
|
|
2834
|
+
r ? Q.selectedCard : "",
|
|
2771
2835
|
p?.(e.original)
|
|
2772
2836
|
].filter(Boolean).join(" "),
|
|
2773
2837
|
style: h?.(e.original),
|
|
2774
2838
|
"aria-selected": A ? r : void 0,
|
|
2775
2839
|
onClick: () => {
|
|
2776
|
-
A &&
|
|
2840
|
+
A && st(e.id);
|
|
2777
2841
|
},
|
|
2778
2842
|
children: [
|
|
2779
2843
|
o,
|
|
@@ -2783,98 +2847,98 @@ var M = {
|
|
|
2783
2847
|
}),
|
|
2784
2848
|
s,
|
|
2785
2849
|
i && /* @__PURE__ */ t("div", {
|
|
2786
|
-
className:
|
|
2850
|
+
className: Q.cardDetail,
|
|
2787
2851
|
children: ce?.({
|
|
2788
2852
|
row: e.original,
|
|
2789
2853
|
rowId: e.id,
|
|
2790
|
-
collapse: () =>
|
|
2854
|
+
collapse: () => ut(e.id)
|
|
2791
2855
|
})
|
|
2792
2856
|
})
|
|
2793
2857
|
]
|
|
2794
2858
|
}, e.id);
|
|
2795
|
-
let c = q.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), l = c.find((e) => e.mobile?.primary) ?? c.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) =>
|
|
2859
|
+
let c = q.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), l = c.find((e) => e.mobile?.primary) ?? c.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => kt(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
|
|
2796
2860
|
return /* @__PURE__ */ n("article", {
|
|
2797
2861
|
role: "listitem",
|
|
2798
2862
|
className: [
|
|
2799
|
-
|
|
2800
|
-
r ?
|
|
2863
|
+
Q.card,
|
|
2864
|
+
r ? Q.selectedCard : "",
|
|
2801
2865
|
p?.(e.original)
|
|
2802
2866
|
].filter(Boolean).join(" "),
|
|
2803
2867
|
style: h?.(e.original),
|
|
2804
2868
|
"aria-selected": A ? r : void 0,
|
|
2805
2869
|
onClick: () => {
|
|
2806
|
-
A &&
|
|
2870
|
+
A && st(e.id);
|
|
2807
2871
|
},
|
|
2808
2872
|
children: [
|
|
2809
2873
|
o,
|
|
2810
2874
|
s,
|
|
2811
2875
|
/* @__PURE__ */ t("h3", { children: l ? f(l) : `Строка ${e.index + 1}` }),
|
|
2812
2876
|
/* @__PURE__ */ t("dl", { children: c.filter((e) => e !== l && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
|
|
2813
|
-
className: e.mobile?.mobileSpan === 2 ?
|
|
2877
|
+
className: e.mobile?.mobileSpan === 2 ? Q.spanTwo : "",
|
|
2814
2878
|
children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: f(e) })]
|
|
2815
2879
|
}, e.id)) }),
|
|
2816
2880
|
c.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: f(e) }, e.id)),
|
|
2817
2881
|
i && /* @__PURE__ */ t("div", {
|
|
2818
|
-
className:
|
|
2882
|
+
className: Q.cardDetail,
|
|
2819
2883
|
children: ce?.({
|
|
2820
2884
|
row: e.original,
|
|
2821
2885
|
rowId: e.id,
|
|
2822
|
-
collapse: () =>
|
|
2886
|
+
collapse: () => ut(e.id)
|
|
2823
2887
|
})
|
|
2824
2888
|
})
|
|
2825
2889
|
]
|
|
2826
2890
|
}, e.id);
|
|
2827
2891
|
})]
|
|
2828
2892
|
}),
|
|
2829
|
-
(
|
|
2830
|
-
className:
|
|
2893
|
+
(Ye || Xe && !C && !Je && Fe.length > 0) && /* @__PURE__ */ n("nav", {
|
|
2894
|
+
className: Q.pagination,
|
|
2831
2895
|
"aria-label": "Пагинация таблицы",
|
|
2832
|
-
children: [
|
|
2833
|
-
className:
|
|
2896
|
+
children: [Xe ? Z("bottom") : /* @__PURE__ */ n("span", {
|
|
2897
|
+
className: Q.paginationRange,
|
|
2834
2898
|
"aria-live": "polite",
|
|
2835
2899
|
children: [
|
|
2836
|
-
|
|
2900
|
+
tt,
|
|
2837
2901
|
"–",
|
|
2838
|
-
|
|
2902
|
+
nt,
|
|
2839
2903
|
" из ",
|
|
2840
|
-
|
|
2904
|
+
je
|
|
2841
2905
|
]
|
|
2842
|
-
}),
|
|
2843
|
-
className:
|
|
2906
|
+
}), Ye && /* @__PURE__ */ n("div", {
|
|
2907
|
+
className: Q.paginationControls,
|
|
2844
2908
|
children: [
|
|
2845
2909
|
/* @__PURE__ */ n(j, {
|
|
2846
2910
|
variant: "empty",
|
|
2847
2911
|
size: "md",
|
|
2848
|
-
disabled: C ||
|
|
2912
|
+
disabled: C || Pe === 0,
|
|
2849
2913
|
"aria-label": "Предыдущая страница",
|
|
2850
2914
|
onClick: () => {
|
|
2851
|
-
|
|
2915
|
+
at(Pe - 1);
|
|
2852
2916
|
},
|
|
2853
|
-
children: [/* @__PURE__ */ t(
|
|
2917
|
+
children: [/* @__PURE__ */ t(Y, {
|
|
2854
2918
|
name: "IconChevron",
|
|
2855
2919
|
width: 18,
|
|
2856
2920
|
height: 18,
|
|
2857
|
-
className:
|
|
2921
|
+
className: Q.previousIcon
|
|
2858
2922
|
}), /* @__PURE__ */ t("span", {
|
|
2859
|
-
className:
|
|
2923
|
+
className: Q.paginationButtonLabel,
|
|
2860
2924
|
children: "Назад"
|
|
2861
2925
|
})]
|
|
2862
2926
|
}),
|
|
2863
2927
|
/* @__PURE__ */ t("div", {
|
|
2864
|
-
className:
|
|
2865
|
-
children:
|
|
2866
|
-
variant: e ===
|
|
2928
|
+
className: Q.pageNumbers,
|
|
2929
|
+
children: Ge.map((e) => typeof e == "number" ? /* @__PURE__ */ t(j, {
|
|
2930
|
+
variant: e === Pe ? "secondary" : "empty",
|
|
2867
2931
|
size: "md",
|
|
2868
|
-
className:
|
|
2932
|
+
className: Q.pageButton,
|
|
2869
2933
|
"aria-label": `Перейти на страницу ${e + 1}`,
|
|
2870
|
-
"aria-current": e ===
|
|
2934
|
+
"aria-current": e === Pe ? "page" : void 0,
|
|
2871
2935
|
disabled: C,
|
|
2872
2936
|
onClick: () => {
|
|
2873
|
-
|
|
2937
|
+
at(e);
|
|
2874
2938
|
},
|
|
2875
2939
|
children: e + 1
|
|
2876
2940
|
}, e) : /* @__PURE__ */ t("span", {
|
|
2877
|
-
className:
|
|
2941
|
+
className: Q.ellipsis,
|
|
2878
2942
|
"aria-hidden": "true",
|
|
2879
2943
|
children: "…"
|
|
2880
2944
|
}, e))
|
|
@@ -2882,19 +2946,19 @@ var M = {
|
|
|
2882
2946
|
/* @__PURE__ */ n(j, {
|
|
2883
2947
|
variant: "empty",
|
|
2884
2948
|
size: "md",
|
|
2885
|
-
disabled: C ||
|
|
2949
|
+
disabled: C || Pe === Me - 1,
|
|
2886
2950
|
"aria-label": "Следующая страница",
|
|
2887
2951
|
onClick: () => {
|
|
2888
|
-
|
|
2952
|
+
at(Pe + 1);
|
|
2889
2953
|
},
|
|
2890
2954
|
children: [/* @__PURE__ */ t("span", {
|
|
2891
|
-
className:
|
|
2955
|
+
className: Q.paginationButtonLabel,
|
|
2892
2956
|
children: "Вперёд"
|
|
2893
|
-
}), /* @__PURE__ */ t(
|
|
2957
|
+
}), /* @__PURE__ */ t(Y, {
|
|
2894
2958
|
name: "IconChevron",
|
|
2895
2959
|
width: 18,
|
|
2896
2960
|
height: 18,
|
|
2897
|
-
className:
|
|
2961
|
+
className: Q.nextIcon
|
|
2898
2962
|
})]
|
|
2899
2963
|
})
|
|
2900
2964
|
]
|
|
@@ -2902,17 +2966,17 @@ var M = {
|
|
|
2902
2966
|
})
|
|
2903
2967
|
]
|
|
2904
2968
|
});
|
|
2905
|
-
},
|
|
2969
|
+
}, Rt = (e, t) => {
|
|
2906
2970
|
let n = t.trim().toLocaleLowerCase();
|
|
2907
2971
|
return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
|
|
2908
|
-
},
|
|
2972
|
+
}, zt = (e, t, n) => {
|
|
2909
2973
|
if (!e.length) return -1;
|
|
2910
2974
|
for (let r = 0; r < e.length; r += 1) {
|
|
2911
2975
|
let i = (t + r * n + e.length) % e.length;
|
|
2912
2976
|
if (!e[i]?.disabled) return i;
|
|
2913
2977
|
}
|
|
2914
2978
|
return -1;
|
|
2915
|
-
},
|
|
2979
|
+
}, Bt = {
|
|
2916
2980
|
wrapper: "_wrapper_1os84_1",
|
|
2917
2981
|
control: "_control_1os84_17",
|
|
2918
2982
|
inputHost: "_inputHost_1os84_25",
|
|
@@ -2931,23 +2995,23 @@ var M = {
|
|
|
2931
2995
|
active: "_active_1os84_321",
|
|
2932
2996
|
actionOption: "_actionOption_1os84_341",
|
|
2933
2997
|
visuallyHidden: "_visuallyHidden_1os84_375"
|
|
2934
|
-
},
|
|
2998
|
+
}, Vt = 8, Ht = 6, Ut = 5, Wt = 10, Gt = {
|
|
2935
2999
|
sm: 30,
|
|
2936
3000
|
md: 40,
|
|
2937
3001
|
lg: 50
|
|
2938
|
-
},
|
|
3002
|
+
}, Kt = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: o = "Ничего не найдено", disabled: s = !1, readOnly: c = !1, stringWhileDisabled: u = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: w, id: T, needMark: E = !0 }) => {
|
|
2939
3003
|
let D = f(), O = T ?? `ds-search-dropdown-${w ?? D}`, k = `${O}-listbox`, A = `${O}-status`, j = b ? `${O}-hint` : void 0, M = y ? `${O}-error` : void 0, P = [
|
|
2940
3004
|
A,
|
|
2941
3005
|
j,
|
|
2942
3006
|
M
|
|
2943
|
-
].filter(Boolean).join(" "), F = h(null), I = h(null), L = h([]), [R, z] = g(!1), [B, V] = g(""), [H, U] = g(-1), [W, te] = g(null), ne = m(() => e.find((e) => e.value === r), [e, r]), re = m(() =>
|
|
3007
|
+
].filter(Boolean).join(" "), F = h(null), I = h(null), L = h([]), [R, z] = g(!1), [B, V] = g(""), [H, U] = g(-1), [W, te] = g(null), ne = m(() => e.find((e) => e.value === r), [e, r]), re = m(() => Rt(e, B), [e, B]), ie = s && u, ae = H >= 0 ? re[H] : void 0;
|
|
2944
3008
|
d(() => V(ne?.label ?? ""), [ne?.label, r]);
|
|
2945
|
-
let oe = l(() => F.current?.querySelector("input") ?? null, []), se = l((e, t) =>
|
|
3009
|
+
let oe = l(() => F.current?.querySelector("input") ?? null, []), se = l((e, t) => zt(re, e, t), [re]), ce = l((e) => {
|
|
2946
3010
|
U(e), !(e < 0) && requestAnimationFrame(() => L.current[e]?.scrollIntoView({ block: "nearest" }));
|
|
2947
|
-
}, []),
|
|
3011
|
+
}, []), G = l(() => {
|
|
2948
3012
|
let e = oe();
|
|
2949
3013
|
if (!e) return;
|
|
2950
|
-
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(re.length,
|
|
3014
|
+
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(re.length, Ut)) * Gt[x] + Wt, r = window.innerHeight - t.bottom - Vt, i = t.top - Vt, a = r < n && i > r, o = a ? i : r, s = Math.max(Gt[x] + Wt, Math.min(n, o)), c = window.innerWidth - t.width - Vt, l = Math.max(Vt, Math.min(t.left, c)), u = a ? Math.max(Vt, t.top - s - Ht) : t.bottom + Ht;
|
|
2951
3015
|
te({
|
|
2952
3016
|
top: u,
|
|
2953
3017
|
left: l,
|
|
@@ -2964,10 +3028,10 @@ var M = {
|
|
|
2964
3028
|
te(null);
|
|
2965
3029
|
return;
|
|
2966
3030
|
}
|
|
2967
|
-
return
|
|
2968
|
-
window.removeEventListener("resize",
|
|
3031
|
+
return G(), window.addEventListener("resize", G), window.addEventListener("scroll", G, !0), () => {
|
|
3032
|
+
window.removeEventListener("resize", G), window.removeEventListener("scroll", G, !0);
|
|
2969
3033
|
};
|
|
2970
|
-
}, [R,
|
|
3034
|
+
}, [R, G]), d(() => {
|
|
2971
3035
|
if (!R) return;
|
|
2972
3036
|
let e = (e) => {
|
|
2973
3037
|
let t = e.target;
|
|
@@ -2975,14 +3039,14 @@ var M = {
|
|
|
2975
3039
|
};
|
|
2976
3040
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
2977
3041
|
}, [R]);
|
|
2978
|
-
let
|
|
3042
|
+
let le = () => {
|
|
2979
3043
|
s || c || (z(!0), U(se(0, 1)));
|
|
2980
|
-
},
|
|
3044
|
+
}, ue = (e) => {
|
|
2981
3045
|
e.disabled || (V(e.label), z(!1), U(-1), i?.(e.value, e), oe()?.focus());
|
|
2982
|
-
},
|
|
3046
|
+
}, de = R ? /* @__PURE__ */ t("ul", {
|
|
2983
3047
|
ref: I,
|
|
2984
3048
|
id: k,
|
|
2985
|
-
className: `${
|
|
3049
|
+
className: `${Bt.menu} ${re.length === 0 ? Bt.menuEmpty : ""}`,
|
|
2986
3050
|
role: "listbox",
|
|
2987
3051
|
"aria-label": v,
|
|
2988
3052
|
style: W ? {
|
|
@@ -2997,7 +3061,7 @@ var M = {
|
|
|
2997
3061
|
maxHeight: 0
|
|
2998
3062
|
},
|
|
2999
3063
|
children: re.length === 0 ? /* @__PURE__ */ t("li", {
|
|
3000
|
-
className: `${
|
|
3064
|
+
className: `${Bt.empty} ${Bt[x]}`,
|
|
3001
3065
|
children: o
|
|
3002
3066
|
}) : re.map((e, i) => {
|
|
3003
3067
|
let a = e.value === r, o = i === H;
|
|
@@ -3016,17 +3080,17 @@ var M = {
|
|
|
3016
3080
|
"aria-selected": a,
|
|
3017
3081
|
"data-option-variant": e.variant ?? "default",
|
|
3018
3082
|
className: [
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
e.variant === "action" ?
|
|
3022
|
-
a ?
|
|
3023
|
-
o ?
|
|
3083
|
+
Bt.option,
|
|
3084
|
+
Bt[x],
|
|
3085
|
+
e.variant === "action" ? Bt.actionOption : "",
|
|
3086
|
+
a ? Bt.selected : "",
|
|
3087
|
+
o ? Bt.active : ""
|
|
3024
3088
|
].filter(Boolean).join(" "),
|
|
3025
3089
|
onPointerMove: () => {
|
|
3026
3090
|
e.disabled || U(i);
|
|
3027
3091
|
},
|
|
3028
|
-
onClick: () =>
|
|
3029
|
-
children: [/* @__PURE__ */ t("span", { children: e.label }), a && E && /* @__PURE__ */ t(
|
|
3092
|
+
onClick: () => ue(e),
|
|
3093
|
+
children: [/* @__PURE__ */ t("span", { children: e.label }), a && E && /* @__PURE__ */ t(Y, {
|
|
3030
3094
|
name: "IconCheck",
|
|
3031
3095
|
width: 16,
|
|
3032
3096
|
height: 16
|
|
@@ -3038,8 +3102,8 @@ var M = {
|
|
|
3038
3102
|
return /* @__PURE__ */ n("div", {
|
|
3039
3103
|
ref: F,
|
|
3040
3104
|
className: [
|
|
3041
|
-
|
|
3042
|
-
y ?
|
|
3105
|
+
Bt.wrapper,
|
|
3106
|
+
y ? Bt.errorState : "",
|
|
3043
3107
|
C
|
|
3044
3108
|
].filter(Boolean).join(" "),
|
|
3045
3109
|
children: [
|
|
@@ -3050,11 +3114,11 @@ var M = {
|
|
|
3050
3114
|
children: v
|
|
3051
3115
|
}),
|
|
3052
3116
|
ie ? /* @__PURE__ */ t("div", {
|
|
3053
|
-
className: `${
|
|
3117
|
+
className: `${Bt.disabledText} ${Bt[x]}`,
|
|
3054
3118
|
children: ne?.label ?? a
|
|
3055
3119
|
}) : /* @__PURE__ */ n("div", {
|
|
3056
|
-
className:
|
|
3057
|
-
children: [/* @__PURE__ */ t(
|
|
3120
|
+
className: Bt.control,
|
|
3121
|
+
children: [/* @__PURE__ */ t(mt, {
|
|
3058
3122
|
id: O,
|
|
3059
3123
|
name: w,
|
|
3060
3124
|
value: B,
|
|
@@ -3065,11 +3129,11 @@ var M = {
|
|
|
3065
3129
|
size: x,
|
|
3066
3130
|
clearable: !1,
|
|
3067
3131
|
autoComplete: "off",
|
|
3068
|
-
className: `${
|
|
3069
|
-
onFocus:
|
|
3132
|
+
className: `${Bt.inputHost} ${Bt[x]}`,
|
|
3133
|
+
onFocus: le,
|
|
3070
3134
|
onChange: (t) => {
|
|
3071
|
-
let n = String(t), r =
|
|
3072
|
-
V(n), z(!0), U(
|
|
3135
|
+
let n = String(t), r = Rt(e, n);
|
|
3136
|
+
V(n), z(!0), U(zt(r, 0, 1));
|
|
3073
3137
|
},
|
|
3074
3138
|
role: "combobox",
|
|
3075
3139
|
"aria-autocomplete": "list",
|
|
@@ -3078,7 +3142,7 @@ var M = {
|
|
|
3078
3142
|
"aria-activedescendant": ae ? `${O}-option-${H}` : void 0,
|
|
3079
3143
|
"aria-invalid": !!y,
|
|
3080
3144
|
"aria-describedby": P,
|
|
3081
|
-
onClick:
|
|
3145
|
+
onClick: le,
|
|
3082
3146
|
onKeyDown: (e) => {
|
|
3083
3147
|
if (!(s || c)) {
|
|
3084
3148
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
@@ -3090,23 +3154,23 @@ var M = {
|
|
|
3090
3154
|
e.preventDefault();
|
|
3091
3155
|
let t = e.key === "Home" ? 1 : -1;
|
|
3092
3156
|
ce(se(e.key === "Home" ? 0 : re.length - 1, t));
|
|
3093
|
-
} else e.key === "Enter" && R && ae ? (e.preventDefault(),
|
|
3157
|
+
} else e.key === "Enter" && R && ae ? (e.preventDefault(), ue(ae)) : e.key === "Escape" && R ? (e.preventDefault(), z(!1), U(-1)) : e.key === "Tab" && (z(!1), U(-1));
|
|
3094
3158
|
}
|
|
3095
3159
|
}
|
|
3096
3160
|
}), /* @__PURE__ */ t("span", {
|
|
3097
|
-
className: `${
|
|
3161
|
+
className: `${Bt.chevron} ${R ? Bt.chevronOpen : ""}`,
|
|
3098
3162
|
"aria-hidden": "true",
|
|
3099
|
-
children: /* @__PURE__ */ t(
|
|
3163
|
+
children: /* @__PURE__ */ t(Y, {
|
|
3100
3164
|
name: "IconChevron",
|
|
3101
3165
|
width: 20,
|
|
3102
3166
|
height: 20
|
|
3103
3167
|
})
|
|
3104
3168
|
})]
|
|
3105
3169
|
}),
|
|
3106
|
-
R && typeof document < "u" && _(
|
|
3170
|
+
R && typeof document < "u" && _(de, document.body),
|
|
3107
3171
|
/* @__PURE__ */ n("span", {
|
|
3108
3172
|
id: A,
|
|
3109
|
-
className:
|
|
3173
|
+
className: Bt.visuallyHidden,
|
|
3110
3174
|
"aria-live": "polite",
|
|
3111
3175
|
children: ["Найдено вариантов: ", re.length]
|
|
3112
3176
|
}),
|
|
@@ -3121,44 +3185,44 @@ var M = {
|
|
|
3121
3185
|
})
|
|
3122
3186
|
]
|
|
3123
3187
|
});
|
|
3124
|
-
},
|
|
3188
|
+
}, qt = {
|
|
3125
3189
|
root: "_root_11adi_1",
|
|
3126
3190
|
header: "_header_11adi_21",
|
|
3127
3191
|
title: "_title_11adi_41",
|
|
3128
3192
|
dismiss: "_dismiss_11adi_55",
|
|
3129
3193
|
content: "_content_11adi_65"
|
|
3130
|
-
},
|
|
3194
|
+
}, Jt = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: c = "" }) => {
|
|
3131
3195
|
let l = `ds-info-block-${f()}`;
|
|
3132
3196
|
return /* @__PURE__ */ n("section", {
|
|
3133
|
-
className: `${
|
|
3197
|
+
className: `${qt.root} ${c}`,
|
|
3134
3198
|
"aria-labelledby": l,
|
|
3135
3199
|
children: [/* @__PURE__ */ n("header", {
|
|
3136
|
-
className:
|
|
3200
|
+
className: qt.header,
|
|
3137
3201
|
children: [/* @__PURE__ */ t(s, {
|
|
3138
3202
|
id: l,
|
|
3139
|
-
className:
|
|
3203
|
+
className: qt.title,
|
|
3140
3204
|
children: e
|
|
3141
3205
|
}), i && /* @__PURE__ */ t(j, {
|
|
3142
|
-
className:
|
|
3206
|
+
className: qt.dismiss,
|
|
3143
3207
|
variant: "empty",
|
|
3144
3208
|
onClick: a,
|
|
3145
3209
|
"aria-label": o,
|
|
3146
|
-
children: /* @__PURE__ */ t(
|
|
3210
|
+
children: /* @__PURE__ */ t(Y, {
|
|
3147
3211
|
name: "IconCross",
|
|
3148
3212
|
width: 20,
|
|
3149
3213
|
height: 20
|
|
3150
3214
|
})
|
|
3151
3215
|
})]
|
|
3152
3216
|
}), /* @__PURE__ */ t("div", {
|
|
3153
|
-
className:
|
|
3217
|
+
className: qt.content,
|
|
3154
3218
|
children: r
|
|
3155
3219
|
})]
|
|
3156
3220
|
});
|
|
3157
|
-
},
|
|
3221
|
+
}, Yt = {
|
|
3158
3222
|
root: "_root_1ecm3_1",
|
|
3159
3223
|
grid: "_grid_1ecm3_13",
|
|
3160
3224
|
actions: "_actions_1ecm3_27"
|
|
3161
|
-
},
|
|
3225
|
+
}, Xt = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
|
|
3162
3226
|
let d = (e, t) => {
|
|
3163
3227
|
let n = {
|
|
3164
3228
|
...r,
|
|
@@ -3167,11 +3231,11 @@ var M = {
|
|
|
3167
3231
|
i?.(n, e), s === "instant" && a?.(n);
|
|
3168
3232
|
};
|
|
3169
3233
|
return /* @__PURE__ */ n("section", {
|
|
3170
|
-
className: `${
|
|
3234
|
+
className: `${Yt.root} ${u}`,
|
|
3171
3235
|
"aria-label": "Фильтры",
|
|
3172
3236
|
"aria-busy": c,
|
|
3173
3237
|
children: [/* @__PURE__ */ t("div", {
|
|
3174
|
-
className:
|
|
3238
|
+
className: Yt.grid,
|
|
3175
3239
|
children: e.filter((e) => !e.hidden).map((e) => {
|
|
3176
3240
|
let n = l || c || e.disabled, i = r[e.id];
|
|
3177
3241
|
if (e.type === "input") {
|
|
@@ -3181,19 +3245,19 @@ var M = {
|
|
|
3181
3245
|
placeholder: e.placeholder,
|
|
3182
3246
|
disabled: n
|
|
3183
3247
|
};
|
|
3184
|
-
return e.inputType === "number" ? /* @__PURE__ */ t(
|
|
3248
|
+
return e.inputType === "number" ? /* @__PURE__ */ t(mt, {
|
|
3185
3249
|
...r,
|
|
3186
3250
|
type: "number",
|
|
3187
3251
|
value: i ?? "",
|
|
3188
3252
|
onChange: (t) => d(e.id, t)
|
|
3189
|
-
}, e.id) : /* @__PURE__ */ t(
|
|
3253
|
+
}, e.id) : /* @__PURE__ */ t(mt, {
|
|
3190
3254
|
...r,
|
|
3191
3255
|
type: "text",
|
|
3192
3256
|
value: String(i ?? ""),
|
|
3193
3257
|
onChange: (t) => d(e.id, t)
|
|
3194
3258
|
}, e.id);
|
|
3195
3259
|
}
|
|
3196
|
-
if (e.type === "dropdown") return /* @__PURE__ */ t(
|
|
3260
|
+
if (e.type === "dropdown") return /* @__PURE__ */ t(ut, {
|
|
3197
3261
|
label: e.label,
|
|
3198
3262
|
hint: e.hint,
|
|
3199
3263
|
placeholder: e.placeholder,
|
|
@@ -3202,7 +3266,7 @@ var M = {
|
|
|
3202
3266
|
disabled: n,
|
|
3203
3267
|
onChange: (t) => d(e.id, t)
|
|
3204
3268
|
}, e.id);
|
|
3205
|
-
if (e.type === "multiple") return /* @__PURE__ */ t(
|
|
3269
|
+
if (e.type === "multiple") return /* @__PURE__ */ t(yt, {
|
|
3206
3270
|
label: e.label,
|
|
3207
3271
|
hint: e.hint,
|
|
3208
3272
|
placeholder: e.placeholder,
|
|
@@ -3211,14 +3275,14 @@ var M = {
|
|
|
3211
3275
|
disabled: n,
|
|
3212
3276
|
onChange: (t) => d(e.id, t)
|
|
3213
3277
|
}, e.id);
|
|
3214
|
-
if (e.type === "checkbox") return /* @__PURE__ */ t(
|
|
3278
|
+
if (e.type === "checkbox") return /* @__PURE__ */ t(Ne, {
|
|
3215
3279
|
label: e.label,
|
|
3216
3280
|
hint: e.hint,
|
|
3217
3281
|
checked: !!i,
|
|
3218
3282
|
disabled: n,
|
|
3219
3283
|
onChange: (t) => d(e.id, t)
|
|
3220
3284
|
}, e.id);
|
|
3221
|
-
if (e.type === "radio") return /* @__PURE__ */ t(
|
|
3285
|
+
if (e.type === "radio") return /* @__PURE__ */ t(xt, {
|
|
3222
3286
|
label: e.label,
|
|
3223
3287
|
checked: !!i,
|
|
3224
3288
|
disabled: n,
|
|
@@ -3228,7 +3292,7 @@ var M = {
|
|
|
3228
3292
|
from: null,
|
|
3229
3293
|
to: null
|
|
3230
3294
|
};
|
|
3231
|
-
return /* @__PURE__ */ t(
|
|
3295
|
+
return /* @__PURE__ */ t(nt, {
|
|
3232
3296
|
hint: e.hint,
|
|
3233
3297
|
mode: e.mode,
|
|
3234
3298
|
min: e.min,
|
|
@@ -3239,7 +3303,7 @@ var M = {
|
|
|
3239
3303
|
}, e.id);
|
|
3240
3304
|
})
|
|
3241
3305
|
}), (o || s === "manual") && /* @__PURE__ */ n("div", {
|
|
3242
|
-
className:
|
|
3306
|
+
className: Yt.actions,
|
|
3243
3307
|
children: [o && /* @__PURE__ */ t(j, {
|
|
3244
3308
|
variant: "destructiveOutline",
|
|
3245
3309
|
disabled: l || c,
|
|
@@ -3253,7 +3317,7 @@ var M = {
|
|
|
3253
3317
|
})]
|
|
3254
3318
|
})]
|
|
3255
3319
|
});
|
|
3256
|
-
},
|
|
3320
|
+
}, Zt = {
|
|
3257
3321
|
grid: "_grid_1q540_1",
|
|
3258
3322
|
comfortable: "_comfortable_1q540_11",
|
|
3259
3323
|
compact: "_compact_1q540_19",
|
|
@@ -3270,23 +3334,23 @@ var M = {
|
|
|
3270
3334
|
summary: "_summary_1q540_101",
|
|
3271
3335
|
summaryTitle: "_summaryTitle_1q540_137",
|
|
3272
3336
|
summaryList: "_summaryList_1q540_145"
|
|
3273
|
-
},
|
|
3337
|
+
}, Qt = ({ columns: e = 2, density: n = "comfortable", className: r = "", ...i }) => /* @__PURE__ */ t("div", {
|
|
3274
3338
|
...i,
|
|
3275
|
-
className: `${
|
|
3276
|
-
}),
|
|
3339
|
+
className: `${Zt.grid} ${Zt[`columns${e}`]} ${Zt[n]} ${r}`
|
|
3340
|
+
}), $t = ({ span: e = 1, className: n = "", ...r }) => /* @__PURE__ */ t("div", {
|
|
3277
3341
|
...r,
|
|
3278
|
-
className: `${
|
|
3279
|
-
}),
|
|
3342
|
+
className: `${Zt.item} ${Zt[`span${e}`]} ${n}`
|
|
3343
|
+
}), en = ({ title: e = "Проверьте заполнение формы", items: r, focusField: i, className: a = "", ...o }) => r.length === 0 ? null : /* @__PURE__ */ n("div", {
|
|
3280
3344
|
...o,
|
|
3281
|
-
className: `${
|
|
3345
|
+
className: `${Zt.summary} ${a}`,
|
|
3282
3346
|
role: "alert",
|
|
3283
3347
|
"aria-atomic": "true",
|
|
3284
3348
|
tabIndex: -1,
|
|
3285
3349
|
children: [/* @__PURE__ */ t("strong", {
|
|
3286
|
-
className:
|
|
3350
|
+
className: Zt.summaryTitle,
|
|
3287
3351
|
children: e
|
|
3288
3352
|
}), /* @__PURE__ */ t("ul", {
|
|
3289
|
-
className:
|
|
3353
|
+
className: Zt.summaryList,
|
|
3290
3354
|
children: r.map((e) => /* @__PURE__ */ t("li", { children: e.fieldId ? /* @__PURE__ */ t("a", {
|
|
3291
3355
|
href: `#${e.fieldId}`,
|
|
3292
3356
|
onClick: (t) => {
|
|
@@ -3295,7 +3359,7 @@ var M = {
|
|
|
3295
3359
|
children: e.message
|
|
3296
3360
|
}) : e.message }, e.id))
|
|
3297
3361
|
})]
|
|
3298
|
-
}),
|
|
3362
|
+
}), tn = {
|
|
3299
3363
|
wrapper: "_wrapper_i20hz_1",
|
|
3300
3364
|
dropzone: "_dropzone_i20hz_15",
|
|
3301
3365
|
dragActive: "_dragActive_i20hz_45",
|
|
@@ -3308,12 +3372,12 @@ var M = {
|
|
|
3308
3372
|
file: "_file_i20hz_133",
|
|
3309
3373
|
fileName: "_fileName_i20hz_175",
|
|
3310
3374
|
fileSize: "_fileSize_i20hz_187"
|
|
3311
|
-
},
|
|
3375
|
+
}, nn = (e) => `${e.name}:${e.size}:${e.lastModified}`, rn = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, an = (e, t) => !t || t.split(",").map((e) => e.trim().toLowerCase()).some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t), on = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: c, label: l, hint: u, error: d, required: p = !1, disabled: m = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: w }) => {
|
|
3312
3376
|
let T = f(), E = y ?? `ds-file-input-${v ?? T}`, D = h(null), O = h(0), [k, A] = g(!1), M = u ? `${E}-hint` : void 0, P = d ? `${E}-error` : void 0, F = [M, P].filter(Boolean).join(" ") || void 0, I = !m && !_, L = (e) => {
|
|
3313
|
-
let t = [], n = new Set(r.map(
|
|
3377
|
+
let t = [], n = new Set(r.map(nn)), l = e.filter((e) => an(e, o) ? s !== void 0 && e.size > s ? (t.push({
|
|
3314
3378
|
file: e,
|
|
3315
3379
|
reason: "maxSize"
|
|
3316
|
-
}), !1) : !n.has(
|
|
3380
|
+
}), !1) : !n.has(nn(e)) && (n.add(nn(e)), !0) : (t.push({
|
|
3317
3381
|
file: e,
|
|
3318
3382
|
reason: "accept"
|
|
3319
3383
|
}), !1)), u = a ? c : 1, d = a ? [...r, ...l] : l.slice(-1);
|
|
@@ -3323,7 +3387,7 @@ var M = {
|
|
|
3323
3387
|
})), d = d.slice(0, u)), t.length && w?.(t), l.length && i?.(d), D.current && (D.current.value = "");
|
|
3324
3388
|
};
|
|
3325
3389
|
return /* @__PURE__ */ n("div", {
|
|
3326
|
-
className: `${
|
|
3390
|
+
className: `${tn.wrapper} ${b}`,
|
|
3327
3391
|
children: [
|
|
3328
3392
|
l && /* @__PURE__ */ t(ee, {
|
|
3329
3393
|
htmlFor: E,
|
|
@@ -3332,7 +3396,7 @@ var M = {
|
|
|
3332
3396
|
children: l
|
|
3333
3397
|
}),
|
|
3334
3398
|
/* @__PURE__ */ n("div", {
|
|
3335
|
-
className: `${
|
|
3399
|
+
className: `${tn.dropzone} ${k ? tn.dragActive : ""} ${m ? tn.disabled : ""} ${d ? tn.error : ""}`,
|
|
3336
3400
|
onDragEnter: (e) => {
|
|
3337
3401
|
e.preventDefault(), I && ++O.current === 1 && A(!0);
|
|
3338
3402
|
},
|
|
@@ -3347,7 +3411,7 @@ var M = {
|
|
|
3347
3411
|
ref: D,
|
|
3348
3412
|
id: E,
|
|
3349
3413
|
name: v,
|
|
3350
|
-
className:
|
|
3414
|
+
className: tn.nativeInput,
|
|
3351
3415
|
type: "file",
|
|
3352
3416
|
multiple: a,
|
|
3353
3417
|
accept: o,
|
|
@@ -3358,53 +3422,53 @@ var M = {
|
|
|
3358
3422
|
onChange: (e) => L(Array.from(e.target.files ?? []))
|
|
3359
3423
|
}), r.length ? /* @__PURE__ */ n(e, { children: [
|
|
3360
3424
|
/* @__PURE__ */ t("ul", {
|
|
3361
|
-
className:
|
|
3425
|
+
className: tn.files,
|
|
3362
3426
|
"aria-live": "polite",
|
|
3363
3427
|
children: r.map((e, a) => /* @__PURE__ */ n("li", {
|
|
3364
|
-
className:
|
|
3428
|
+
className: tn.file,
|
|
3365
3429
|
children: [
|
|
3366
3430
|
/* @__PURE__ */ t("span", {
|
|
3367
|
-
className:
|
|
3431
|
+
className: tn.fileName,
|
|
3368
3432
|
title: e.name,
|
|
3369
3433
|
children: e.name
|
|
3370
3434
|
}),
|
|
3371
3435
|
/* @__PURE__ */ t("span", {
|
|
3372
|
-
className:
|
|
3373
|
-
children:
|
|
3436
|
+
className: tn.fileSize,
|
|
3437
|
+
children: rn(e.size)
|
|
3374
3438
|
}),
|
|
3375
3439
|
I && /* @__PURE__ */ t(j, {
|
|
3376
3440
|
variant: "empty",
|
|
3377
3441
|
size: "sm",
|
|
3378
3442
|
"aria-label": `Удалить файл ${e.name}`,
|
|
3379
3443
|
onClick: () => i?.(r.filter((e, t) => t !== a)),
|
|
3380
|
-
children: /* @__PURE__ */ t(
|
|
3444
|
+
children: /* @__PURE__ */ t(Y, {
|
|
3381
3445
|
name: "IconCross",
|
|
3382
3446
|
width: 16,
|
|
3383
3447
|
height: 16
|
|
3384
3448
|
})
|
|
3385
3449
|
})
|
|
3386
3450
|
]
|
|
3387
|
-
},
|
|
3451
|
+
}, nn(e)))
|
|
3388
3452
|
}),
|
|
3389
3453
|
I && (a || r.length === 0) && /* @__PURE__ */ t(j, {
|
|
3390
|
-
className:
|
|
3454
|
+
className: tn.browseButton,
|
|
3391
3455
|
size: "sm",
|
|
3392
3456
|
onClick: () => D.current?.click(),
|
|
3393
3457
|
children: C
|
|
3394
3458
|
}),
|
|
3395
3459
|
I && !a && /* @__PURE__ */ t(j, {
|
|
3396
|
-
className:
|
|
3460
|
+
className: tn.browseButton,
|
|
3397
3461
|
size: "sm",
|
|
3398
3462
|
onClick: () => D.current?.click(),
|
|
3399
3463
|
children: S
|
|
3400
3464
|
})
|
|
3401
3465
|
] }) : /* @__PURE__ */ n("div", {
|
|
3402
|
-
className:
|
|
3466
|
+
className: tn.empty,
|
|
3403
3467
|
children: [
|
|
3404
3468
|
/* @__PURE__ */ t("span", {
|
|
3405
|
-
className:
|
|
3469
|
+
className: tn.uploadIcon,
|
|
3406
3470
|
"aria-hidden": "true",
|
|
3407
|
-
children: /* @__PURE__ */ t(
|
|
3471
|
+
children: /* @__PURE__ */ t(Y, {
|
|
3408
3472
|
name: "IconUpload",
|
|
3409
3473
|
width: 24,
|
|
3410
3474
|
height: 24
|
|
@@ -3430,7 +3494,7 @@ var M = {
|
|
|
3430
3494
|
})
|
|
3431
3495
|
]
|
|
3432
3496
|
});
|
|
3433
|
-
},
|
|
3497
|
+
}, sn = ({ children: e, containerId: t = "overlay-root" }) => {
|
|
3434
3498
|
let [n, r] = g(null);
|
|
3435
3499
|
return d(() => {
|
|
3436
3500
|
let e = document.getElementById(t);
|
|
@@ -3443,7 +3507,7 @@ var M = {
|
|
|
3443
3507
|
n.childElementCount === 0 && n.parentElement && n.remove();
|
|
3444
3508
|
};
|
|
3445
3509
|
}, [t]), n ? _(e, n) : null;
|
|
3446
|
-
},
|
|
3510
|
+
}, cn = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
|
|
3447
3511
|
let o = h(null), [s, c] = g({
|
|
3448
3512
|
position: "fixed",
|
|
3449
3513
|
visibility: "hidden",
|
|
@@ -3467,13 +3531,13 @@ var M = {
|
|
|
3467
3531
|
]);
|
|
3468
3532
|
return p(() => (u(), window.addEventListener("resize", u), window.addEventListener("scroll", u, !0), () => {
|
|
3469
3533
|
window.removeEventListener("resize", u), window.removeEventListener("scroll", u, !0);
|
|
3470
|
-
}), [u]), /* @__PURE__ */ t(
|
|
3534
|
+
}), [u]), /* @__PURE__ */ t(sn, { children: /* @__PURE__ */ t("div", {
|
|
3471
3535
|
ref: o,
|
|
3472
3536
|
className: a,
|
|
3473
3537
|
style: s,
|
|
3474
3538
|
children: n
|
|
3475
3539
|
}) });
|
|
3476
|
-
},
|
|
3540
|
+
}, ln = {
|
|
3477
3541
|
wrapper: "_wrapper_x2gki_1",
|
|
3478
3542
|
control: "_control_x2gki_15",
|
|
3479
3543
|
textarea: "_textarea_x2gki_25",
|
|
@@ -3487,12 +3551,12 @@ var M = {
|
|
|
3487
3551
|
clearAction: "_clearAction_x2gki_171",
|
|
3488
3552
|
messages: "_messages_x2gki_251",
|
|
3489
3553
|
counter: "_counter_x2gki_265"
|
|
3490
|
-
},
|
|
3491
|
-
function
|
|
3554
|
+
}, un = 2;
|
|
3555
|
+
function dn(e) {
|
|
3492
3556
|
let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
|
|
3493
3557
|
return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
|
|
3494
3558
|
}
|
|
3495
|
-
function
|
|
3559
|
+
function fn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: s = !1, label: c, error: u, hint: p, className: m = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = un, maxRows: w, autoResize: T = !0, ...E }) {
|
|
3496
3560
|
let D = f(), O = _ ?? `ds-textarea-${g ?? D}`, k = h(null), A = p ? `${O}-hint` : void 0, j = u ? `${O}-error` : void 0, M = S && x ? `${O}-count` : void 0, P = [
|
|
3497
3561
|
A,
|
|
3498
3562
|
j,
|
|
@@ -3500,7 +3564,7 @@ function on({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3500
3564
|
].filter(Boolean).join(" ") || void 0, F = Math.max(1, C), I = w === void 0 ? void 0 : Math.max(F, w), L = l(() => {
|
|
3501
3565
|
let e = k.current;
|
|
3502
3566
|
if (!e || !T) return;
|
|
3503
|
-
let t = window.getComputedStyle(e), n =
|
|
3567
|
+
let t = window.getComputedStyle(e), n = dn(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * F + r, a = I === void 0 ? Infinity : n * I + r;
|
|
3504
3568
|
e.style.height = "auto";
|
|
3505
3569
|
let o = Math.min(Math.max(e.scrollHeight, i), a);
|
|
3506
3570
|
e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
|
|
@@ -3532,7 +3596,7 @@ function on({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3532
3596
|
e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), L());
|
|
3533
3597
|
}, B = { "--ds-textarea-min-rows": F };
|
|
3534
3598
|
return /* @__PURE__ */ n("div", {
|
|
3535
|
-
className: `${
|
|
3599
|
+
className: `${ln.wrapper} ${m}`,
|
|
3536
3600
|
children: [
|
|
3537
3601
|
c && /* @__PURE__ */ t(ee, {
|
|
3538
3602
|
htmlFor: O,
|
|
@@ -3542,12 +3606,12 @@ function on({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3542
3606
|
}),
|
|
3543
3607
|
a && s ? /* @__PURE__ */ t("div", {
|
|
3544
3608
|
id: O,
|
|
3545
|
-
className: `${
|
|
3609
|
+
className: `${ln.disabledText} ${ln[v]}`,
|
|
3546
3610
|
style: B,
|
|
3547
3611
|
"aria-describedby": P,
|
|
3548
3612
|
children: e || i
|
|
3549
3613
|
}) : /* @__PURE__ */ n("div", {
|
|
3550
|
-
className:
|
|
3614
|
+
className: ln.control,
|
|
3551
3615
|
children: [/* @__PURE__ */ t("textarea", {
|
|
3552
3616
|
ref: k,
|
|
3553
3617
|
id: O,
|
|
@@ -3562,15 +3626,15 @@ function on({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3562
3626
|
style: B,
|
|
3563
3627
|
"aria-invalid": !!u,
|
|
3564
3628
|
"aria-describedby": P,
|
|
3565
|
-
className: `${
|
|
3629
|
+
className: `${ln.textarea} ${ln[v]} ${T ? ln.autoResize : ln.manualResize} ${u ? ln.textareaError : ""}`,
|
|
3566
3630
|
onChange: R,
|
|
3567
3631
|
...E
|
|
3568
3632
|
}), y && e && !a && !o && /* @__PURE__ */ t("button", {
|
|
3569
3633
|
type: "button",
|
|
3570
|
-
className:
|
|
3634
|
+
className: ln.clearAction,
|
|
3571
3635
|
"aria-label": "Очистить поле",
|
|
3572
3636
|
onClick: z,
|
|
3573
|
-
children: /* @__PURE__ */ t(
|
|
3637
|
+
children: /* @__PURE__ */ t(Y, {
|
|
3574
3638
|
name: "IconCross",
|
|
3575
3639
|
width: 20,
|
|
3576
3640
|
height: 20
|
|
@@ -3578,7 +3642,7 @@ function on({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3578
3642
|
})]
|
|
3579
3643
|
}),
|
|
3580
3644
|
(p || u || M) && /* @__PURE__ */ n("div", {
|
|
3581
|
-
className:
|
|
3645
|
+
className: ln.messages,
|
|
3582
3646
|
children: [
|
|
3583
3647
|
p && !u && /* @__PURE__ */ t(N, {
|
|
3584
3648
|
id: A,
|
|
@@ -3591,7 +3655,7 @@ function on({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3591
3655
|
}),
|
|
3592
3656
|
M && /* @__PURE__ */ n("span", {
|
|
3593
3657
|
id: M,
|
|
3594
|
-
className:
|
|
3658
|
+
className: ln.counter,
|
|
3595
3659
|
children: [
|
|
3596
3660
|
e.length,
|
|
3597
3661
|
" / ",
|
|
@@ -3605,11 +3669,11 @@ function on({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3605
3669
|
}
|
|
3606
3670
|
//#endregion
|
|
3607
3671
|
//#region src/components/DSModal/modal.store.ts
|
|
3608
|
-
var
|
|
3672
|
+
var pn = 0, mn = S((e, t) => ({
|
|
3609
3673
|
modals: [],
|
|
3610
3674
|
openModal: (t, n = {}, r = {}) => {
|
|
3611
|
-
|
|
3612
|
-
let i = `ds-modal-${
|
|
3675
|
+
pn += 1;
|
|
3676
|
+
let i = `ds-modal-${pn}`;
|
|
3613
3677
|
return e((e) => ({ modals: [...e.modals, {
|
|
3614
3678
|
id: i,
|
|
3615
3679
|
name: t,
|
|
@@ -3633,10 +3697,10 @@ var sn = 0, cn = S((e, t) => ({
|
|
|
3633
3697
|
let n = t().modals;
|
|
3634
3698
|
n.length && (e({ modals: [] }), n.forEach((e) => e.onClose?.()));
|
|
3635
3699
|
}
|
|
3636
|
-
})),
|
|
3637
|
-
|
|
3638
|
-
},
|
|
3639
|
-
function
|
|
3700
|
+
})), hn = () => {
|
|
3701
|
+
mn.getState().closeAllModals(), pn = 0;
|
|
3702
|
+
}, gn = 8, _n = 96, vn = .55;
|
|
3703
|
+
function yn(e, t, n) {
|
|
3640
3704
|
return {
|
|
3641
3705
|
startX: e,
|
|
3642
3706
|
startY: t,
|
|
@@ -3644,16 +3708,16 @@ function pn(e, t, n) {
|
|
|
3644
3708
|
intent: "pending"
|
|
3645
3709
|
};
|
|
3646
3710
|
}
|
|
3647
|
-
function
|
|
3711
|
+
function bn(e, t, n) {
|
|
3648
3712
|
let r = t - e.startX, i = n - e.startY;
|
|
3649
|
-
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >=
|
|
3713
|
+
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >= gn && (e.intent = Math.abs(i) > Math.abs(r) ? "vertical" : "horizontal"), e.intent === "vertical" ? Math.max(0, i) : 0;
|
|
3650
3714
|
}
|
|
3651
|
-
function
|
|
3715
|
+
function xn(e, t, n) {
|
|
3652
3716
|
if (e.intent !== "vertical") return !1;
|
|
3653
3717
|
let r = Math.max(0, t - e.startY), i = Math.max(1, n - e.startTime);
|
|
3654
|
-
return r >=
|
|
3718
|
+
return r >= _n || r >= 32 && r / i >= vn;
|
|
3655
3719
|
}
|
|
3656
|
-
var
|
|
3720
|
+
var Sn = {
|
|
3657
3721
|
layer: "_layer_w9isk_1",
|
|
3658
3722
|
backdrop: "_backdrop_w9isk_15",
|
|
3659
3723
|
"backdrop-enter": "_backdrop-enter_w9isk_1",
|
|
@@ -3666,10 +3730,10 @@ var gn = {
|
|
|
3666
3730
|
close: "_close_w9isk_141",
|
|
3667
3731
|
dragHandle: "_dragHandle_w9isk_149",
|
|
3668
3732
|
"sheet-enter": "_sheet-enter_w9isk_1"
|
|
3669
|
-
},
|
|
3670
|
-
function
|
|
3733
|
+
}, Cn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", wn = a({});
|
|
3734
|
+
function Tn(e) {
|
|
3671
3735
|
if (e.key !== "Tab") return;
|
|
3672
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
3736
|
+
let t = Array.from(e.currentTarget.querySelectorAll(Cn));
|
|
3673
3737
|
if (!t.length) {
|
|
3674
3738
|
e.preventDefault();
|
|
3675
3739
|
return;
|
|
@@ -3677,18 +3741,18 @@ function yn(e) {
|
|
|
3677
3741
|
let n = t[0], r = t.at(-1);
|
|
3678
3742
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
|
|
3679
3743
|
}
|
|
3680
|
-
var
|
|
3681
|
-
let l = u(
|
|
3744
|
+
var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
|
|
3745
|
+
let l = u(wn), p = r ?? l.title, m = i ?? l.description, _ = f(), v = f(), y = h(null), b = h(null), x = h(null), [S, C] = g(0), [w, T] = g(!1), E = mn((e) => e.closeModal), D = l.requestClose ?? (() => E(a)), O = p != null, k = m != null;
|
|
3682
3746
|
d(() => {
|
|
3683
3747
|
let e = document.activeElement, t = y.current;
|
|
3684
|
-
return (t?.querySelector(
|
|
3748
|
+
return (t?.querySelector(Cn) ?? t)?.focus(), () => e?.focus();
|
|
3685
3749
|
}, []);
|
|
3686
3750
|
let A = (e) => {
|
|
3687
3751
|
e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, T(!1), C(0);
|
|
3688
3752
|
};
|
|
3689
3753
|
return /* @__PURE__ */ n("div", {
|
|
3690
3754
|
ref: y,
|
|
3691
|
-
className: `${
|
|
3755
|
+
className: `${Sn.panel} ${s}`,
|
|
3692
3756
|
"data-closing": l.closing || void 0,
|
|
3693
3757
|
"data-dragging": w || void 0,
|
|
3694
3758
|
style: { "--ds-modal-drag-offset": `${S}px` },
|
|
@@ -3697,41 +3761,41 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3697
3761
|
"aria-labelledby": O ? _ : void 0,
|
|
3698
3762
|
"aria-describedby": k ? v : void 0,
|
|
3699
3763
|
tabIndex: -1,
|
|
3700
|
-
onKeyDown:
|
|
3764
|
+
onKeyDown: Tn,
|
|
3701
3765
|
children: [
|
|
3702
3766
|
/* @__PURE__ */ t("button", {
|
|
3703
3767
|
type: "button",
|
|
3704
|
-
className:
|
|
3768
|
+
className: Sn.dragHandle,
|
|
3705
3769
|
"aria-label": "Потяните вниз, чтобы закрыть модальное окно",
|
|
3706
3770
|
onPointerDown: (e) => {
|
|
3707
|
-
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current =
|
|
3771
|
+
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current = yn(e.clientX, e.clientY, e.timeStamp), e.currentTarget.setPointerCapture(e.pointerId));
|
|
3708
3772
|
},
|
|
3709
3773
|
onPointerMove: (e) => {
|
|
3710
3774
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3711
|
-
let t =
|
|
3775
|
+
let t = bn(b.current, e.clientX, e.clientY);
|
|
3712
3776
|
b.current.intent === "vertical" && (e.preventDefault(), T(!0), C(t));
|
|
3713
3777
|
},
|
|
3714
3778
|
onPointerUp: (e) => {
|
|
3715
3779
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3716
|
-
let t =
|
|
3780
|
+
let t = xn(b.current, e.clientY, e.timeStamp);
|
|
3717
3781
|
A(e.currentTarget), t && D();
|
|
3718
3782
|
},
|
|
3719
3783
|
onPointerCancel: (e) => A(e.currentTarget),
|
|
3720
3784
|
children: /* @__PURE__ */ t("span", {})
|
|
3721
3785
|
}),
|
|
3722
3786
|
(O || o) && /* @__PURE__ */ n("header", {
|
|
3723
|
-
className:
|
|
3787
|
+
className: Sn.header,
|
|
3724
3788
|
children: [O && /* @__PURE__ */ t("h2", {
|
|
3725
3789
|
id: _,
|
|
3726
|
-
className:
|
|
3790
|
+
className: Sn.title,
|
|
3727
3791
|
children: p
|
|
3728
3792
|
}), /* @__PURE__ */ t(j, {
|
|
3729
|
-
className:
|
|
3793
|
+
className: Sn.close,
|
|
3730
3794
|
variant: "empty",
|
|
3731
3795
|
size: "sm",
|
|
3732
3796
|
"aria-label": o,
|
|
3733
3797
|
onClick: D,
|
|
3734
|
-
children: /* @__PURE__ */ t(
|
|
3798
|
+
children: /* @__PURE__ */ t(Y, {
|
|
3735
3799
|
name: "IconCross",
|
|
3736
3800
|
width: 24,
|
|
3737
3801
|
height: 24
|
|
@@ -3740,17 +3804,17 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3740
3804
|
}),
|
|
3741
3805
|
k && /* @__PURE__ */ t("p", {
|
|
3742
3806
|
id: v,
|
|
3743
|
-
className:
|
|
3807
|
+
className: Sn.description,
|
|
3744
3808
|
children: m
|
|
3745
3809
|
}),
|
|
3746
3810
|
/* @__PURE__ */ t("div", {
|
|
3747
|
-
className:
|
|
3811
|
+
className: Sn.content,
|
|
3748
3812
|
children: e
|
|
3749
3813
|
})
|
|
3750
3814
|
]
|
|
3751
3815
|
});
|
|
3752
|
-
},
|
|
3753
|
-
let n =
|
|
3816
|
+
}, Dn = ({ registry: e }) => {
|
|
3817
|
+
let n = mn((e) => e.modals), r = mn((e) => e.closeModal), [i, a] = g(() => /* @__PURE__ */ new Set()), o = h(/* @__PURE__ */ new Map()), s = (e) => {
|
|
3754
3818
|
if (o.current.has(e)) return;
|
|
3755
3819
|
a((t) => new Set(t).add(e));
|
|
3756
3820
|
let t = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -3766,7 +3830,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3766
3830
|
return () => e.forEach((e) => window.clearTimeout(e));
|
|
3767
3831
|
}, []), d(() => {
|
|
3768
3832
|
let e = (e) => {
|
|
3769
|
-
let t =
|
|
3833
|
+
let t = mn.getState().modals.at(-1);
|
|
3770
3834
|
e.key === "Escape" && t?.closeOnEscape && s(t.id);
|
|
3771
3835
|
};
|
|
3772
3836
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
@@ -3779,21 +3843,21 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3779
3843
|
n,
|
|
3780
3844
|
e
|
|
3781
3845
|
]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
3782
|
-
className:
|
|
3846
|
+
className: Sn.layer,
|
|
3783
3847
|
"aria-label": "Модальные окна",
|
|
3784
3848
|
children: n.map((r, a) => {
|
|
3785
3849
|
let o = e[r.name];
|
|
3786
3850
|
if (!o) return null;
|
|
3787
3851
|
let c = i.has(r.id);
|
|
3788
3852
|
return /* @__PURE__ */ t("div", {
|
|
3789
|
-
className:
|
|
3853
|
+
className: Sn.backdrop,
|
|
3790
3854
|
"data-closing": c || void 0,
|
|
3791
3855
|
"aria-hidden": a !== n.length - 1 || void 0,
|
|
3792
3856
|
inert: a !== n.length - 1 || void 0,
|
|
3793
3857
|
onMouseDown: (e) => {
|
|
3794
3858
|
e.target === e.currentTarget && r.closeOnBackdrop && s(r.id);
|
|
3795
3859
|
},
|
|
3796
|
-
children: /* @__PURE__ */ t(
|
|
3860
|
+
children: /* @__PURE__ */ t(wn.Provider, {
|
|
3797
3861
|
value: {
|
|
3798
3862
|
title: r.title ?? r.payload.title,
|
|
3799
3863
|
description: r.description ?? r.payload.description,
|
|
@@ -3810,31 +3874,31 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3810
3874
|
}, r.id);
|
|
3811
3875
|
})
|
|
3812
3876
|
}), document.body);
|
|
3813
|
-
},
|
|
3814
|
-
let o =
|
|
3877
|
+
}, On = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
|
|
3878
|
+
let o = mn((e) => e.modals.length);
|
|
3815
3879
|
return d(() => {
|
|
3816
3880
|
if (!a || o === 0) return;
|
|
3817
3881
|
let e = document.body.style.overflow;
|
|
3818
3882
|
return document.body.style.overflow = "hidden", () => {
|
|
3819
3883
|
document.body.style.overflow = e;
|
|
3820
3884
|
};
|
|
3821
|
-
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(
|
|
3822
|
-
},
|
|
3885
|
+
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Dn, { registry: r })] });
|
|
3886
|
+
}, kn = (e) => e, An = {
|
|
3823
3887
|
message: "_message_c23ie_1",
|
|
3824
3888
|
actions: "_actions_c23ie_13"
|
|
3825
|
-
},
|
|
3889
|
+
}, jn = /* @__PURE__ */ new Map(), Mn = 0, Nn = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
|
|
3826
3890
|
let u = (e) => {
|
|
3827
|
-
|
|
3891
|
+
jn.get(l)?.(e), jn.delete(l), r();
|
|
3828
3892
|
};
|
|
3829
|
-
return /* @__PURE__ */ n(
|
|
3893
|
+
return /* @__PURE__ */ n(En, {
|
|
3830
3894
|
modalId: e,
|
|
3831
3895
|
title: i,
|
|
3832
3896
|
role: "alertdialog",
|
|
3833
3897
|
children: [/* @__PURE__ */ t("p", {
|
|
3834
|
-
className:
|
|
3898
|
+
className: An.message,
|
|
3835
3899
|
children: a
|
|
3836
3900
|
}), /* @__PURE__ */ n("div", {
|
|
3837
|
-
className:
|
|
3901
|
+
className: An.actions,
|
|
3838
3902
|
children: [/* @__PURE__ */ t(j, {
|
|
3839
3903
|
variant: "outline",
|
|
3840
3904
|
onClick: () => u(!1),
|
|
@@ -3846,46 +3910,46 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3846
3910
|
})]
|
|
3847
3911
|
})]
|
|
3848
3912
|
});
|
|
3849
|
-
},
|
|
3913
|
+
}, Pn = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(En, {
|
|
3850
3914
|
modalId: e,
|
|
3851
3915
|
title: i,
|
|
3852
3916
|
role: "alertdialog",
|
|
3853
3917
|
children: [/* @__PURE__ */ t("p", {
|
|
3854
|
-
className:
|
|
3918
|
+
className: An.message,
|
|
3855
3919
|
children: a
|
|
3856
3920
|
}), /* @__PURE__ */ t("div", {
|
|
3857
|
-
className:
|
|
3921
|
+
className: An.actions,
|
|
3858
3922
|
children: /* @__PURE__ */ t(j, {
|
|
3859
3923
|
onClick: r,
|
|
3860
3924
|
children: o
|
|
3861
3925
|
})
|
|
3862
3926
|
})]
|
|
3863
|
-
}),
|
|
3864
|
-
ConfirmModal:
|
|
3865
|
-
ErrorModal:
|
|
3866
|
-
}),
|
|
3867
|
-
let e =
|
|
3927
|
+
}), Fn = kn({
|
|
3928
|
+
ConfirmModal: Nn,
|
|
3929
|
+
ErrorModal: Pn
|
|
3930
|
+
}), In = () => {
|
|
3931
|
+
let e = mn((e) => e.openModal);
|
|
3868
3932
|
return (t = {}) => new Promise((n) => {
|
|
3869
|
-
|
|
3870
|
-
let r = `confirm-${
|
|
3871
|
-
|
|
3933
|
+
Mn += 1;
|
|
3934
|
+
let r = `confirm-${Mn}`;
|
|
3935
|
+
jn.set(r, n), e("ConfirmModal", {
|
|
3872
3936
|
...t,
|
|
3873
3937
|
requestId: r
|
|
3874
3938
|
}, {
|
|
3875
3939
|
closeOnEscape: !1,
|
|
3876
3940
|
onClose: () => {
|
|
3877
|
-
|
|
3941
|
+
jn.get(r)?.(!1), jn.delete(r);
|
|
3878
3942
|
}
|
|
3879
3943
|
});
|
|
3880
3944
|
});
|
|
3881
|
-
},
|
|
3882
|
-
let e =
|
|
3945
|
+
}, Ln = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Rn = () => {
|
|
3946
|
+
let e = mn((e) => e.openModal);
|
|
3883
3947
|
return { showError: (t, n) => e("ErrorModal", {
|
|
3884
3948
|
title: n,
|
|
3885
|
-
message:
|
|
3949
|
+
message: Ln(t)
|
|
3886
3950
|
}) };
|
|
3887
|
-
},
|
|
3888
|
-
let e =
|
|
3951
|
+
}, zn = S(() => ({})), Bn = S(() => ({})), Vn = () => {
|
|
3952
|
+
let e = mn((e) => e.modals), t = mn((e) => e.openModal), n = mn((e) => e.closeModal), r = mn((e) => e.closeTopModal), i = mn((e) => e.closeAllModals), a = l((e, n = {}, r) => t(e, n, r), [t]), o = l((t) => e.some((e) => e.name === t), [e]);
|
|
3889
3953
|
return m(() => ({
|
|
3890
3954
|
openModal: a,
|
|
3891
3955
|
closeModal: n,
|
|
@@ -3901,7 +3965,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3901
3965
|
e.length,
|
|
3902
3966
|
a
|
|
3903
3967
|
]);
|
|
3904
|
-
},
|
|
3968
|
+
}, Hn = {
|
|
3905
3969
|
layer: "_layer_ct7yp_1",
|
|
3906
3970
|
backdrop: "_backdrop_ct7yp_13",
|
|
3907
3971
|
panel: "_panel_ct7yp_27",
|
|
@@ -3921,16 +3985,16 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3921
3985
|
"enter-right": "_enter-right_ct7yp_1",
|
|
3922
3986
|
"enter-left": "_enter-left_ct7yp_1",
|
|
3923
3987
|
"enter-bottom": "_enter-bottom_ct7yp_1"
|
|
3924
|
-
},
|
|
3988
|
+
}, Un = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Wn = a(null), Gn = (e) => {
|
|
3925
3989
|
if (e.key !== "Tab") return;
|
|
3926
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
3990
|
+
let t = Array.from(e.currentTarget.querySelectorAll(Un));
|
|
3927
3991
|
if (!t.length) {
|
|
3928
3992
|
e.preventDefault();
|
|
3929
3993
|
return;
|
|
3930
3994
|
}
|
|
3931
3995
|
let n = t[0], r = t.at(-1);
|
|
3932
3996
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
3933
|
-
},
|
|
3997
|
+
}, Kn = () => u(Wn), qn = ({ open: e, onCloseRequest: r, children: i, title: a, description: o, headerActions: s, footer: c, placement: l = "right", size: u = "md", closeOnEscape: p = !0, closeOnBackdrop: m = !0, preventClose: g = !1, closeLabel: v = "Закрыть", initialFocusRef: y, returnFocusRef: b, className: x = "" }) => {
|
|
3934
3998
|
let S = h(null), C = f(), w = f(), T = (e) => {
|
|
3935
3999
|
g || r(e);
|
|
3936
4000
|
};
|
|
@@ -3939,7 +4003,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3939
4003
|
let t = document.activeElement, n = b?.current, i = document.body.style.overflow;
|
|
3940
4004
|
document.body.style.overflow = "hidden";
|
|
3941
4005
|
let a = S.current;
|
|
3942
|
-
(y?.current ?? a?.querySelector(
|
|
4006
|
+
(y?.current ?? a?.querySelector(Un) ?? a)?.focus();
|
|
3943
4007
|
let o = (e) => {
|
|
3944
4008
|
e.key === "Escape" && p && !g && r("escape");
|
|
3945
4009
|
};
|
|
@@ -3954,29 +4018,29 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3954
4018
|
g,
|
|
3955
4019
|
b
|
|
3956
4020
|
]), !e || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
3957
|
-
className:
|
|
4021
|
+
className: Hn.layer,
|
|
3958
4022
|
children: /* @__PURE__ */ t("div", {
|
|
3959
|
-
className:
|
|
4023
|
+
className: Hn.backdrop,
|
|
3960
4024
|
onMouseDown: (e) => {
|
|
3961
4025
|
e.target === e.currentTarget && m && T("backdrop");
|
|
3962
4026
|
},
|
|
3963
|
-
children: /* @__PURE__ */ t(
|
|
4027
|
+
children: /* @__PURE__ */ t(Wn.Provider, {
|
|
3964
4028
|
value: { requestClose: T },
|
|
3965
4029
|
children: /* @__PURE__ */ n("section", {
|
|
3966
4030
|
ref: S,
|
|
3967
|
-
className: `${
|
|
4031
|
+
className: `${Hn.panel} ${Hn[l]} ${Hn[u]} ${x}`,
|
|
3968
4032
|
role: "dialog",
|
|
3969
4033
|
"aria-modal": "true",
|
|
3970
4034
|
"aria-labelledby": a ? C : void 0,
|
|
3971
4035
|
"aria-describedby": o ? w : void 0,
|
|
3972
4036
|
tabIndex: -1,
|
|
3973
|
-
onKeyDown:
|
|
4037
|
+
onKeyDown: Gn,
|
|
3974
4038
|
children: [
|
|
3975
4039
|
/* @__PURE__ */ n("header", {
|
|
3976
|
-
className:
|
|
4040
|
+
className: Hn.header,
|
|
3977
4041
|
children: [
|
|
3978
4042
|
/* @__PURE__ */ n("div", {
|
|
3979
|
-
className:
|
|
4043
|
+
className: Hn.heading,
|
|
3980
4044
|
children: [a && /* @__PURE__ */ t("h2", {
|
|
3981
4045
|
id: C,
|
|
3982
4046
|
children: a
|
|
@@ -3986,7 +4050,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3986
4050
|
})]
|
|
3987
4051
|
}),
|
|
3988
4052
|
s && /* @__PURE__ */ t("div", {
|
|
3989
|
-
className:
|
|
4053
|
+
className: Hn.headerActions,
|
|
3990
4054
|
children: s
|
|
3991
4055
|
}),
|
|
3992
4056
|
/* @__PURE__ */ t(j, {
|
|
@@ -3995,7 +4059,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3995
4059
|
"aria-label": v,
|
|
3996
4060
|
disabled: g,
|
|
3997
4061
|
onClick: () => T("close-button"),
|
|
3998
|
-
children: /* @__PURE__ */ t(
|
|
4062
|
+
children: /* @__PURE__ */ t(Y, {
|
|
3999
4063
|
name: "IconCross",
|
|
4000
4064
|
width: 20,
|
|
4001
4065
|
height: 20
|
|
@@ -4004,11 +4068,11 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4004
4068
|
]
|
|
4005
4069
|
}),
|
|
4006
4070
|
/* @__PURE__ */ t("div", {
|
|
4007
|
-
className:
|
|
4071
|
+
className: Hn.content,
|
|
4008
4072
|
children: i
|
|
4009
4073
|
}),
|
|
4010
4074
|
c && /* @__PURE__ */ t("footer", {
|
|
4011
|
-
className:
|
|
4075
|
+
className: Hn.footer,
|
|
4012
4076
|
children: c
|
|
4013
4077
|
})
|
|
4014
4078
|
]
|
|
@@ -4016,17 +4080,17 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4016
4080
|
})
|
|
4017
4081
|
})
|
|
4018
4082
|
}), document.body);
|
|
4019
|
-
},
|
|
4083
|
+
}, Jn = ({ placement: e = "right", ...n }) => /* @__PURE__ */ t(qn, {
|
|
4020
4084
|
...n,
|
|
4021
4085
|
placement: e
|
|
4022
|
-
}),
|
|
4086
|
+
}), Yn = (e) => /* @__PURE__ */ t(qn, {
|
|
4023
4087
|
...e,
|
|
4024
4088
|
placement: "bottom"
|
|
4025
|
-
}),
|
|
4089
|
+
}), Xn = (e) => /* @__PURE__ */ t(qn, {
|
|
4026
4090
|
...e,
|
|
4027
4091
|
placement: "fullscreen",
|
|
4028
4092
|
size: "xl"
|
|
4029
|
-
}),
|
|
4093
|
+
}), Zn = {
|
|
4030
4094
|
wrapper: "_wrapper_1hyyy_1",
|
|
4031
4095
|
container: "_container_1hyyy_15",
|
|
4032
4096
|
inner: "_inner_1hyyy_35",
|
|
@@ -4041,29 +4105,29 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4041
4105
|
empty: "_empty_1hyyy_153",
|
|
4042
4106
|
destructive: "_destructive_1hyyy_161",
|
|
4043
4107
|
destructiveOutline: "_destructiveOutline_1hyyy_169"
|
|
4044
|
-
},
|
|
4045
|
-
className:
|
|
4108
|
+
}, Qn = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
|
|
4109
|
+
className: Zn.wrapper,
|
|
4046
4110
|
children: /* @__PURE__ */ t("div", {
|
|
4047
|
-
className:
|
|
4111
|
+
className: Zn.container,
|
|
4048
4112
|
children: /* @__PURE__ */ n("div", {
|
|
4049
|
-
className:
|
|
4113
|
+
className: Zn.inner,
|
|
4050
4114
|
children: [
|
|
4051
4115
|
/* @__PURE__ */ t("div", {
|
|
4052
|
-
className:
|
|
4053
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4116
|
+
className: Zn.cube,
|
|
4117
|
+
children: /* @__PURE__ */ t("div", { className: `${Zn.cube__inner} ${Zn[e]}` })
|
|
4054
4118
|
}),
|
|
4055
4119
|
/* @__PURE__ */ t("div", {
|
|
4056
|
-
className:
|
|
4057
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4120
|
+
className: Zn.cube,
|
|
4121
|
+
children: /* @__PURE__ */ t("div", { className: `${Zn.cube__inner} ${Zn[e]}` })
|
|
4058
4122
|
}),
|
|
4059
4123
|
/* @__PURE__ */ t("div", {
|
|
4060
|
-
className:
|
|
4061
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4124
|
+
className: Zn.cube,
|
|
4125
|
+
children: /* @__PURE__ */ t("div", { className: `${Zn.cube__inner} ${Zn[e]}` })
|
|
4062
4126
|
})
|
|
4063
4127
|
]
|
|
4064
4128
|
})
|
|
4065
4129
|
})
|
|
4066
|
-
}),
|
|
4130
|
+
}), $n = {
|
|
4067
4131
|
viewport: "_viewport_bu4eh_1",
|
|
4068
4132
|
"top-right": "_top-right_bu4eh_21",
|
|
4069
4133
|
"top-left": "_top-left_bu4eh_31",
|
|
@@ -4079,12 +4143,12 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4079
4143
|
success: "_success_bu4eh_195",
|
|
4080
4144
|
warning: "_warning_bu4eh_203",
|
|
4081
4145
|
error: "_error_bu4eh_211"
|
|
4082
|
-
},
|
|
4146
|
+
}, er = {
|
|
4083
4147
|
info: "IconInfoCircle",
|
|
4084
4148
|
success: "IconSuccessCircle",
|
|
4085
4149
|
warning: "IconWarning",
|
|
4086
4150
|
error: "IconWarning"
|
|
4087
|
-
},
|
|
4151
|
+
}, tr = ({ toast: e, onClose: r }) => {
|
|
4088
4152
|
let [i, a] = g(!1), [o, s] = g(() => typeof document < "u" && document.hidden), c = h(e.duration), l = h(Date.now());
|
|
4089
4153
|
return d(() => {
|
|
4090
4154
|
if (i || o || e.duration <= 0) return;
|
|
@@ -4104,7 +4168,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4104
4168
|
let e = () => s(document.hidden);
|
|
4105
4169
|
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
4106
4170
|
}, []), /* @__PURE__ */ n("article", {
|
|
4107
|
-
className: `${
|
|
4171
|
+
className: `${$n.toast} ${$n[e.variant]}`,
|
|
4108
4172
|
role: e.variant === "error" ? "alert" : "status",
|
|
4109
4173
|
"aria-live": e.variant === "error" ? "assertive" : "polite",
|
|
4110
4174
|
onMouseEnter: () => a(!0),
|
|
@@ -4113,24 +4177,24 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4113
4177
|
onBlur: () => a(!1),
|
|
4114
4178
|
children: [
|
|
4115
4179
|
/* @__PURE__ */ t("div", {
|
|
4116
|
-
className:
|
|
4180
|
+
className: $n.icon,
|
|
4117
4181
|
"aria-hidden": "true",
|
|
4118
|
-
children: /* @__PURE__ */ t(
|
|
4119
|
-
name:
|
|
4182
|
+
children: /* @__PURE__ */ t(Y, {
|
|
4183
|
+
name: er[e.variant],
|
|
4120
4184
|
color: "var(--ds-toast-accent)",
|
|
4121
4185
|
width: 20,
|
|
4122
4186
|
height: 20
|
|
4123
4187
|
})
|
|
4124
4188
|
}),
|
|
4125
4189
|
/* @__PURE__ */ n("div", {
|
|
4126
|
-
className:
|
|
4190
|
+
className: $n.body,
|
|
4127
4191
|
children: [
|
|
4128
4192
|
e.title && /* @__PURE__ */ t("strong", {
|
|
4129
|
-
className:
|
|
4193
|
+
className: $n.title,
|
|
4130
4194
|
children: e.title
|
|
4131
4195
|
}),
|
|
4132
4196
|
/* @__PURE__ */ t("div", {
|
|
4133
|
-
className:
|
|
4197
|
+
className: $n.message,
|
|
4134
4198
|
children: e.message
|
|
4135
4199
|
}),
|
|
4136
4200
|
e.action && /* @__PURE__ */ t(j, {
|
|
@@ -4148,7 +4212,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4148
4212
|
size: "sm",
|
|
4149
4213
|
"aria-label": "Закрыть уведомление",
|
|
4150
4214
|
onClick: () => r(e.id),
|
|
4151
|
-
children: /* @__PURE__ */ t(
|
|
4215
|
+
children: /* @__PURE__ */ t(Y, {
|
|
4152
4216
|
name: "IconCross",
|
|
4153
4217
|
width: 20,
|
|
4154
4218
|
height: 20
|
|
@@ -4156,15 +4220,15 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4156
4220
|
})
|
|
4157
4221
|
]
|
|
4158
4222
|
});
|
|
4159
|
-
},
|
|
4223
|
+
}, nr = 0, rr = S((e, t) => ({
|
|
4160
4224
|
toasts: [],
|
|
4161
4225
|
showToast: (n) => {
|
|
4162
4226
|
if (n.dedupeKey) {
|
|
4163
4227
|
let e = t().toasts.find((e) => e.dedupeKey === n.dedupeKey);
|
|
4164
4228
|
if (e) return e.id;
|
|
4165
4229
|
}
|
|
4166
|
-
|
|
4167
|
-
let r = `ds-toast-${
|
|
4230
|
+
nr += 1;
|
|
4231
|
+
let r = `ds-toast-${nr}`;
|
|
4168
4232
|
return e((e) => ({ toasts: [...e.toasts, {
|
|
4169
4233
|
variant: "info",
|
|
4170
4234
|
duration: 5e3,
|
|
@@ -4175,18 +4239,18 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4175
4239
|
},
|
|
4176
4240
|
removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
|
|
4177
4241
|
clearToasts: () => e({ toasts: [] })
|
|
4178
|
-
})),
|
|
4179
|
-
let r =
|
|
4242
|
+
})), ir = () => rr.setState({ toasts: [] }), ar = ({ position: e = "top-right", maxVisible: n }) => {
|
|
4243
|
+
let r = rr((e) => e.toasts), i = rr((e) => e.removeToast), a = n === void 0 ? r : r.slice(0, Math.max(0, Math.floor(n)));
|
|
4180
4244
|
return /* @__PURE__ */ t("div", {
|
|
4181
|
-
className: `${
|
|
4245
|
+
className: `${$n.viewport} ${$n[e]}`,
|
|
4182
4246
|
"aria-label": "Уведомления",
|
|
4183
|
-
children: a.map((e) => /* @__PURE__ */ t(
|
|
4247
|
+
children: a.map((e) => /* @__PURE__ */ t(tr, {
|
|
4184
4248
|
toast: e,
|
|
4185
4249
|
onClose: i
|
|
4186
4250
|
}, e.id))
|
|
4187
4251
|
});
|
|
4188
|
-
},
|
|
4189
|
-
let e =
|
|
4252
|
+
}, or = () => {
|
|
4253
|
+
let e = rr((e) => e.showToast), t = rr((e) => e.removeToast), n = rr((e) => e.clearToasts), r = l((t) => e({
|
|
4190
4254
|
...t,
|
|
4191
4255
|
variant: "info"
|
|
4192
4256
|
}), [e]), i = l((t) => e({
|
|
@@ -4216,24 +4280,24 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4216
4280
|
i,
|
|
4217
4281
|
a
|
|
4218
4282
|
]);
|
|
4219
|
-
},
|
|
4283
|
+
}, sr = {
|
|
4220
4284
|
root: "_root_ncmxp_1",
|
|
4221
4285
|
tooltip: "_tooltip_ncmxp_11",
|
|
4222
4286
|
"ds-tooltip-in": "_ds-tooltip-in_ncmxp_1"
|
|
4223
|
-
},
|
|
4287
|
+
}, cr = 8, lr = 16, ur = {
|
|
4224
4288
|
top: "bottom",
|
|
4225
4289
|
right: "left",
|
|
4226
4290
|
bottom: "top",
|
|
4227
4291
|
left: "right"
|
|
4228
|
-
},
|
|
4292
|
+
}, dr = (e, t, n) => e === "top" ? t.top >= n.height + cr + lr : e === "bottom" ? window.innerHeight - t.bottom >= n.height + cr + lr : e === "left" ? t.left >= n.width + cr + lr : window.innerWidth - t.right >= n.width + cr + lr, fr = (e, t, n) => {
|
|
4229
4293
|
if (!(t.bottom > 0 && t.right > 0 && t.top < window.innerHeight && t.left < window.innerWidth)) return null;
|
|
4230
|
-
let r =
|
|
4231
|
-
return r === "top" && (a = t.top - n.height -
|
|
4294
|
+
let r = dr(e, t, n) ? e : dr(ur[e], t, n) ? ur[e] : e, i = t.left + (t.width - n.width) / 2, a = t.top + (t.height - n.height) / 2;
|
|
4295
|
+
return r === "top" && (a = t.top - n.height - cr), r === "bottom" && (a = t.bottom + cr), r === "left" && (i = t.left - n.width - cr), r === "right" && (i = t.right + cr), i = Math.min(Math.max(i, lr), Math.max(lr, window.innerWidth - n.width - lr)), a = Math.min(Math.max(a, lr), Math.max(lr, window.innerHeight - n.height - lr)), {
|
|
4232
4296
|
left: i,
|
|
4233
4297
|
top: a,
|
|
4234
4298
|
visibility: "visible"
|
|
4235
4299
|
};
|
|
4236
|
-
},
|
|
4300
|
+
}, pr = ({ content: e, children: r, placement: a = "top", delay: o = 450, disabled: s = !1, maxWidth: u = 280, className: p = "" }) => {
|
|
4237
4301
|
let m = f(), [_, v] = g(!1), [y, b] = g({ visibility: "hidden" }), [x, S] = g(null), C = h(null), w = h(null), T = l(() => {
|
|
4238
4302
|
C.current && clearTimeout(C.current), C.current = null, v(!1);
|
|
4239
4303
|
}, []), E = l(() => {
|
|
@@ -4251,7 +4315,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4251
4315
|
let e = () => {
|
|
4252
4316
|
let e = w.current;
|
|
4253
4317
|
if (!e || !x) return;
|
|
4254
|
-
let t =
|
|
4318
|
+
let t = fr(a, e.getBoundingClientRect(), x.getBoundingClientRect());
|
|
4255
4319
|
if (!t) {
|
|
4256
4320
|
T();
|
|
4257
4321
|
return;
|
|
@@ -4288,24 +4352,24 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4288
4352
|
});
|
|
4289
4353
|
return /* @__PURE__ */ n("span", {
|
|
4290
4354
|
ref: w,
|
|
4291
|
-
className: `${
|
|
4355
|
+
className: `${sr.root} ${p}`,
|
|
4292
4356
|
onPointerDown: _ ? T : E,
|
|
4293
|
-
children: [O, _ && /* @__PURE__ */ t(
|
|
4357
|
+
children: [O, _ && /* @__PURE__ */ t(sn, { children: /* @__PURE__ */ t("span", {
|
|
4294
4358
|
ref: S,
|
|
4295
4359
|
id: m,
|
|
4296
4360
|
role: "tooltip",
|
|
4297
|
-
className:
|
|
4361
|
+
className: sr.tooltip,
|
|
4298
4362
|
style: D,
|
|
4299
4363
|
children: e
|
|
4300
4364
|
}) })]
|
|
4301
4365
|
});
|
|
4302
|
-
},
|
|
4366
|
+
}, mr = {
|
|
4303
4367
|
root: "_root_bs28m_1",
|
|
4304
4368
|
tabList: "_tabList_bs28m_11",
|
|
4305
4369
|
tab: "_tab_bs28m_11",
|
|
4306
4370
|
panels: "_panels_bs28m_127",
|
|
4307
4371
|
panel: "_panel_bs28m_127"
|
|
4308
|
-
},
|
|
4372
|
+
}, hr = ({ items: e, value: r, onChange: i, ariaLabel: a = "Вкладки", disabled: o = !1, loading: s = !1, className: c = "" }) => {
|
|
4309
4373
|
let l = `ds-tabs-${f().replace(/:/g, "")}`, u = h([]), d = o || s, p = e.findIndex((e) => e.id === r), m = e.findIndex((e) => !e.disabled), g = p >= 0 && !e[p]?.disabled ? p : m, _ = (t) => {
|
|
4310
4374
|
let n = e[t];
|
|
4311
4375
|
!n || n.disabled || d || (i(n.id), u.current[t]?.focus(), u.current[t]?.scrollIntoView({
|
|
@@ -4335,10 +4399,10 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4335
4399
|
t.preventDefault(), _(a);
|
|
4336
4400
|
};
|
|
4337
4401
|
return /* @__PURE__ */ n("div", {
|
|
4338
|
-
className: `${
|
|
4402
|
+
className: `${mr.root} ${c}`,
|
|
4339
4403
|
"aria-busy": s || void 0,
|
|
4340
4404
|
children: [/* @__PURE__ */ t("div", {
|
|
4341
|
-
className:
|
|
4405
|
+
className: mr.tabList,
|
|
4342
4406
|
role: "tablist",
|
|
4343
4407
|
"aria-label": a,
|
|
4344
4408
|
"aria-orientation": "horizontal",
|
|
@@ -4350,7 +4414,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4350
4414
|
u.current[n] = e;
|
|
4351
4415
|
},
|
|
4352
4416
|
id: a,
|
|
4353
|
-
className:
|
|
4417
|
+
className: mr.tab,
|
|
4354
4418
|
type: "button",
|
|
4355
4419
|
role: "tab",
|
|
4356
4420
|
"aria-selected": i,
|
|
@@ -4363,12 +4427,12 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4363
4427
|
}, e.id);
|
|
4364
4428
|
})
|
|
4365
4429
|
}), /* @__PURE__ */ t("div", {
|
|
4366
|
-
className:
|
|
4430
|
+
className: mr.panels,
|
|
4367
4431
|
children: e.map((e, n) => {
|
|
4368
4432
|
let i = e.id === r;
|
|
4369
4433
|
return /* @__PURE__ */ t("div", {
|
|
4370
4434
|
id: `${l}-panel-${n}`,
|
|
4371
|
-
className:
|
|
4435
|
+
className: mr.panel,
|
|
4372
4436
|
role: "tabpanel",
|
|
4373
4437
|
"aria-labelledby": `${l}-tab-${n}`,
|
|
4374
4438
|
tabIndex: 0,
|
|
@@ -4378,7 +4442,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4378
4442
|
})
|
|
4379
4443
|
})]
|
|
4380
4444
|
});
|
|
4381
|
-
},
|
|
4445
|
+
}, gr = (e) => {
|
|
4382
4446
|
if (!Number.isFinite(e) || e < 0) return "00:00";
|
|
4383
4447
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = `${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
|
|
4384
4448
|
return n ? `${n}:${a}` : a;
|
|
@@ -4411,24 +4475,24 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4411
4475
|
settingsActionLabel: "_settingsActionLabel_14cqp_693",
|
|
4412
4476
|
caption: "_caption_14cqp_705",
|
|
4413
4477
|
fullscreen: "_fullscreen_14cqp_719"
|
|
4414
|
-
},
|
|
4478
|
+
}, _r = 2500, vr = 5, yr = .05, br = [
|
|
4415
4479
|
.5,
|
|
4416
4480
|
.75,
|
|
4417
4481
|
1,
|
|
4418
4482
|
1.25,
|
|
4419
4483
|
1.5,
|
|
4420
4484
|
2
|
|
4421
|
-
],
|
|
4422
|
-
let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, w] = g(!1), [T, E] = g(r.length > 0), [D, O] = g(!1), [A, M] = g(!1), [ee, N] = g(!1), [P, F] = g(0), [I, L] = g(0), [R, z] = g(0), [B, V] = g(1), [H, U] = g(!!v.muted), [W, te] = g(1), [ne, re] = g(!!v.loop), [ie, ae] = g(-1), [oe, se] = g(!1), [ce,
|
|
4485
|
+
], xr = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: s = "contain", loading: c = !1, error: u, fallback: f, className: p = "", controls: m = !0, playsInline: _ = !0, ...v }) => {
|
|
4486
|
+
let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, w] = g(!1), [T, E] = g(r.length > 0), [D, O] = g(!1), [A, M] = g(!1), [ee, N] = g(!1), [P, F] = g(0), [I, L] = g(0), [R, z] = g(0), [B, V] = g(1), [H, U] = g(!!v.muted), [W, te] = g(1), [ne, re] = g(!!v.loop), [ie, ae] = g(-1), [oe, se] = g(!1), [ce, G] = g(!0), [le, ue] = g(!1), [de, K] = g(!1), fe = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), pe = i.map((e, t) => ({
|
|
4423
4487
|
track: e,
|
|
4424
4488
|
index: t
|
|
4425
|
-
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"),
|
|
4426
|
-
|
|
4489
|
+
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), me = u ?? (C ? "Не удалось воспроизвести видео" : void 0), he = c || T && !me && r.length > 0, ge = !he && !me && r.length === 0, _e = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, ve = l(() => {
|
|
4490
|
+
G(!0), window.clearTimeout(S.current), A && !oe && (S.current = window.setTimeout(() => G(!1), _r));
|
|
4427
4491
|
}, [A, oe]);
|
|
4428
4492
|
d(() => {
|
|
4429
4493
|
w(!1), E(r.length > 0), O(!1), M(!1), N(!1), F(0), L(0), z(0);
|
|
4430
|
-
}, [
|
|
4431
|
-
let e = () =>
|
|
4494
|
+
}, [fe, r.length]), d(() => (ve(), () => window.clearTimeout(S.current)), [ve]), d(() => {
|
|
4495
|
+
let e = () => ue(document.fullscreenElement === b.current), t = () => K(document.pictureInPictureElement === x.current);
|
|
4432
4496
|
return document.addEventListener("fullscreenchange", e), document.addEventListener("enterpictureinpicture", t), document.addEventListener("leavepictureinpicture", t), () => {
|
|
4433
4497
|
document.removeEventListener("fullscreenchange", e), document.removeEventListener("enterpictureinpicture", t), document.removeEventListener("leavepictureinpicture", t);
|
|
4434
4498
|
};
|
|
@@ -4439,9 +4503,9 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4439
4503
|
};
|
|
4440
4504
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
4441
4505
|
}, [oe]);
|
|
4442
|
-
let
|
|
4506
|
+
let ye = async () => {
|
|
4443
4507
|
let e = x.current;
|
|
4444
|
-
if (!(!e ||
|
|
4508
|
+
if (!(!e || me || he)) {
|
|
4445
4509
|
if (e.paused || e.ended) {
|
|
4446
4510
|
e.ended && (e.currentTime = 0);
|
|
4447
4511
|
try {
|
|
@@ -4451,38 +4515,38 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4451
4515
|
}
|
|
4452
4516
|
} else e.pause();
|
|
4453
4517
|
}
|
|
4454
|
-
},
|
|
4518
|
+
}, be = () => {
|
|
4455
4519
|
let e = x.current;
|
|
4456
4520
|
e && (e.muted = !e.muted);
|
|
4457
|
-
},
|
|
4521
|
+
}, xe = (e) => {
|
|
4458
4522
|
let t = x.current;
|
|
4459
4523
|
t && (t.volume = Math.min(1, Math.max(0, e)), t.muted = t.volume === 0);
|
|
4460
|
-
},
|
|
4524
|
+
}, Se = (e) => {
|
|
4461
4525
|
let t = x.current;
|
|
4462
4526
|
!t || !I || (t.currentTime = Math.min(I, Math.max(0, e)), F(t.currentTime));
|
|
4463
|
-
},
|
|
4527
|
+
}, Ce = async () => {
|
|
4464
4528
|
if (b.current) try {
|
|
4465
4529
|
document.fullscreenElement ? await document.exitFullscreen() : await b.current.requestFullscreen();
|
|
4466
4530
|
} catch {
|
|
4467
|
-
|
|
4531
|
+
ue(!1);
|
|
4468
4532
|
}
|
|
4469
|
-
},
|
|
4533
|
+
}, we = async () => {
|
|
4470
4534
|
let e = x.current;
|
|
4471
|
-
if (!(!e || !
|
|
4535
|
+
if (!(!e || !_e)) try {
|
|
4472
4536
|
document.pictureInPictureElement ? await document.exitPictureInPicture() : await e.requestPictureInPicture();
|
|
4473
4537
|
} catch {
|
|
4474
|
-
|
|
4538
|
+
K(!1);
|
|
4475
4539
|
}
|
|
4476
|
-
},
|
|
4540
|
+
}, Te = (e) => {
|
|
4477
4541
|
let t = x.current;
|
|
4478
4542
|
t && (Array.from(t.textTracks).forEach((t, n) => {
|
|
4479
4543
|
t.mode = n === e ? "showing" : "disabled";
|
|
4480
4544
|
}), ae(e));
|
|
4481
|
-
},
|
|
4545
|
+
}, Ee = (e) => {
|
|
4482
4546
|
let t = e.target;
|
|
4483
4547
|
if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
|
|
4484
4548
|
let n = e.key.toLowerCase();
|
|
4485
|
-
n === " " || n === "k" ? (e.preventDefault(),
|
|
4549
|
+
n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), be()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" && pe.length ? (e.preventDefault(), Te(ie === -1 ? pe[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Se(P + (e.key === "ArrowRight" ? vr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), xe(B + (e.key === "ArrowUp" ? yr : -.05))) : e.key === "Escape" && se(!1), ve();
|
|
4486
4550
|
}, q = () => {
|
|
4487
4551
|
let e = x.current;
|
|
4488
4552
|
w(!1), E(!0), e?.load();
|
|
@@ -4493,18 +4557,18 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4493
4557
|
return /* @__PURE__ */ n("figure", {
|
|
4494
4558
|
ref: y,
|
|
4495
4559
|
className: `${$.root} ${p}`,
|
|
4496
|
-
onKeyDown:
|
|
4560
|
+
onKeyDown: Ee,
|
|
4497
4561
|
children: [/* @__PURE__ */ n("div", {
|
|
4498
4562
|
ref: b,
|
|
4499
|
-
className: `${$.frame} ${
|
|
4563
|
+
className: `${$.frame} ${le ? $.fullscreen : ""}`,
|
|
4500
4564
|
style: { aspectRatio: o },
|
|
4501
|
-
"aria-busy":
|
|
4565
|
+
"aria-busy": he || void 0,
|
|
4502
4566
|
tabIndex: m && r.length ? 0 : void 0,
|
|
4503
|
-
onPointerMove:
|
|
4504
|
-
onPointerDown:
|
|
4505
|
-
onFocusCapture:
|
|
4567
|
+
onPointerMove: ve,
|
|
4568
|
+
onPointerDown: ve,
|
|
4569
|
+
onFocusCapture: ve,
|
|
4506
4570
|
onMouseLeave: () => {
|
|
4507
|
-
A && !oe &&
|
|
4571
|
+
A && !oe && G(!1);
|
|
4508
4572
|
},
|
|
4509
4573
|
children: [
|
|
4510
4574
|
r.length > 0 && /* @__PURE__ */ n("video", {
|
|
@@ -4517,18 +4581,18 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4517
4581
|
className: $.video,
|
|
4518
4582
|
style: { objectFit: s },
|
|
4519
4583
|
onClick: (e) => {
|
|
4520
|
-
v.onClick?.(e),
|
|
4584
|
+
v.onClick?.(e), ye();
|
|
4521
4585
|
},
|
|
4522
4586
|
onDoubleClick: (e) => {
|
|
4523
|
-
v.onDoubleClick?.(e),
|
|
4587
|
+
v.onDoubleClick?.(e), Ce();
|
|
4524
4588
|
},
|
|
4525
4589
|
onLoadStart: (e) => {
|
|
4526
4590
|
E(!0), v.onLoadStart?.(e);
|
|
4527
4591
|
},
|
|
4528
4592
|
onLoadedMetadata: (e) => {
|
|
4529
4593
|
L(e.currentTarget.duration || 0);
|
|
4530
|
-
let t =
|
|
4531
|
-
|
|
4594
|
+
let t = pe.find(({ track: e }) => e.default);
|
|
4595
|
+
Te(t?.index ?? -1), v.onLoadedMetadata?.(e);
|
|
4532
4596
|
},
|
|
4533
4597
|
onDurationChange: (e) => {
|
|
4534
4598
|
L(e.currentTarget.duration || 0), v.onDurationChange?.(e);
|
|
@@ -4559,7 +4623,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4559
4623
|
M(!1), v.onPause?.(e);
|
|
4560
4624
|
},
|
|
4561
4625
|
onEnded: (e) => {
|
|
4562
|
-
M(!1), N(!0),
|
|
4626
|
+
M(!1), N(!0), G(!0), v.onEnded?.(e);
|
|
4563
4627
|
},
|
|
4564
4628
|
onVolumeChange: (e) => {
|
|
4565
4629
|
V(e.currentTarget.volume), U(e.currentTarget.muted), v.onVolumeChange?.(e);
|
|
@@ -4572,7 +4636,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4572
4636
|
},
|
|
4573
4637
|
children: [r.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), i.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
|
|
4574
4638
|
}),
|
|
4575
|
-
|
|
4639
|
+
he && /* @__PURE__ */ n("div", {
|
|
4576
4640
|
className: $.overlay,
|
|
4577
4641
|
role: "status",
|
|
4578
4642
|
"aria-live": "polite",
|
|
@@ -4581,21 +4645,21 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4581
4645
|
"aria-hidden": "true",
|
|
4582
4646
|
children: /* @__PURE__ */ t("div", {
|
|
4583
4647
|
className: $.loaderScale,
|
|
4584
|
-
children: /* @__PURE__ */ t(
|
|
4648
|
+
children: /* @__PURE__ */ t(Qn, {})
|
|
4585
4649
|
})
|
|
4586
4650
|
}), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
|
|
4587
4651
|
}),
|
|
4588
|
-
!
|
|
4652
|
+
!he && D && !me && /* @__PURE__ */ t("div", {
|
|
4589
4653
|
className: $.buffering,
|
|
4590
4654
|
role: "status",
|
|
4591
4655
|
"aria-label": "Буферизация видео",
|
|
4592
4656
|
children: /* @__PURE__ */ t(k, { variant: "primary" })
|
|
4593
4657
|
}),
|
|
4594
|
-
|
|
4658
|
+
ge && /* @__PURE__ */ n("div", {
|
|
4595
4659
|
className: `${$.state} ${$.empty}`,
|
|
4596
4660
|
role: "status",
|
|
4597
4661
|
children: [
|
|
4598
|
-
/* @__PURE__ */ t(
|
|
4662
|
+
/* @__PURE__ */ t(Y, {
|
|
4599
4663
|
name: "IconInfoCircle",
|
|
4600
4664
|
className: $.stateIcon,
|
|
4601
4665
|
width: 40,
|
|
@@ -4605,17 +4669,17 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4605
4669
|
f ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
|
|
4606
4670
|
]
|
|
4607
4671
|
}),
|
|
4608
|
-
!
|
|
4672
|
+
!he && me && /* @__PURE__ */ n("div", {
|
|
4609
4673
|
className: `${$.state} ${$.error}`,
|
|
4610
4674
|
role: "alert",
|
|
4611
4675
|
children: [
|
|
4612
|
-
/* @__PURE__ */ t(
|
|
4676
|
+
/* @__PURE__ */ t(Y, {
|
|
4613
4677
|
name: "IconWarning",
|
|
4614
4678
|
className: $.stateIcon,
|
|
4615
4679
|
width: 40,
|
|
4616
4680
|
height: 40
|
|
4617
4681
|
}),
|
|
4618
|
-
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children:
|
|
4682
|
+
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: me })] }),
|
|
4619
4683
|
r.length > 0 && /* @__PURE__ */ t(j, {
|
|
4620
4684
|
size: "sm",
|
|
4621
4685
|
variant: "secondary",
|
|
@@ -4624,18 +4688,18 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4624
4688
|
})
|
|
4625
4689
|
]
|
|
4626
4690
|
}),
|
|
4627
|
-
!
|
|
4691
|
+
!he && !me && ee && /* @__PURE__ */ t("button", {
|
|
4628
4692
|
type: "button",
|
|
4629
4693
|
className: $.replay,
|
|
4630
4694
|
"aria-label": "Воспроизвести заново",
|
|
4631
|
-
onClick: () => void
|
|
4632
|
-
children: /* @__PURE__ */ t(
|
|
4695
|
+
onClick: () => void ye(),
|
|
4696
|
+
children: /* @__PURE__ */ t(Y, {
|
|
4633
4697
|
name: "IconReplay",
|
|
4634
4698
|
width: 28,
|
|
4635
4699
|
height: 28
|
|
4636
4700
|
})
|
|
4637
4701
|
}),
|
|
4638
|
-
m && r.length > 0 && !
|
|
4702
|
+
m && r.length > 0 && !he && !me && /* @__PURE__ */ n("div", {
|
|
4639
4703
|
className: `${$.controlsLayer} ${ce || !A ? $.controlsVisible : ""}`,
|
|
4640
4704
|
onClick: (e) => e.stopPropagation(),
|
|
4641
4705
|
children: [oe && /* @__PURE__ */ n("div", {
|
|
@@ -4649,18 +4713,18 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4649
4713
|
let t = Number(e.target.value);
|
|
4650
4714
|
x.current && (x.current.playbackRate = t);
|
|
4651
4715
|
},
|
|
4652
|
-
children:
|
|
4716
|
+
children: br.map((e) => /* @__PURE__ */ n("option", {
|
|
4653
4717
|
value: e,
|
|
4654
4718
|
children: [e, "×"]
|
|
4655
4719
|
}, e))
|
|
4656
4720
|
})] }),
|
|
4657
|
-
|
|
4721
|
+
pe.length > 0 && /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Субтитры" }), /* @__PURE__ */ n("select", {
|
|
4658
4722
|
value: ie,
|
|
4659
|
-
onChange: (e) =>
|
|
4723
|
+
onChange: (e) => Te(Number(e.target.value)),
|
|
4660
4724
|
children: [/* @__PURE__ */ t("option", {
|
|
4661
4725
|
value: -1,
|
|
4662
4726
|
children: "Выключены"
|
|
4663
|
-
}),
|
|
4727
|
+
}), pe.map(({ track: e, index: n }) => /* @__PURE__ */ t("option", {
|
|
4664
4728
|
value: n,
|
|
4665
4729
|
children: e.label
|
|
4666
4730
|
}, `${e.srcLang}-${e.label}`))]
|
|
@@ -4672,14 +4736,14 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4672
4736
|
onClick: () => re((e) => !e),
|
|
4673
4737
|
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: ne ? "Вкл." : "Выкл." })]
|
|
4674
4738
|
}),
|
|
4675
|
-
|
|
4739
|
+
_e && /* @__PURE__ */ t("button", {
|
|
4676
4740
|
type: "button",
|
|
4677
4741
|
className: $.settingsAction,
|
|
4678
|
-
"aria-pressed":
|
|
4679
|
-
onClick: () => void
|
|
4742
|
+
"aria-pressed": de,
|
|
4743
|
+
onClick: () => void we(),
|
|
4680
4744
|
children: /* @__PURE__ */ n("span", {
|
|
4681
4745
|
className: $.settingsActionLabel,
|
|
4682
|
-
children: [/* @__PURE__ */ t(
|
|
4746
|
+
children: [/* @__PURE__ */ t(Y, {
|
|
4683
4747
|
name: "IconPictureInPicture",
|
|
4684
4748
|
width: 18,
|
|
4685
4749
|
height: 18
|
|
@@ -4697,8 +4761,8 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4697
4761
|
className: `${$.controlButton} ${$.playButton}`,
|
|
4698
4762
|
"aria-label": A ? "Пауза" : "Воспроизвести",
|
|
4699
4763
|
title: A ? "Пауза (K)" : "Воспроизвести (K)",
|
|
4700
|
-
onClick: () => void
|
|
4701
|
-
children: /* @__PURE__ */ t(
|
|
4764
|
+
onClick: () => void ye(),
|
|
4765
|
+
children: /* @__PURE__ */ t(Y, {
|
|
4702
4766
|
name: A ? "IconPause" : "IconPlay",
|
|
4703
4767
|
width: 24,
|
|
4704
4768
|
height: 24
|
|
@@ -4713,8 +4777,8 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4713
4777
|
"aria-label": H ? "Включить звук" : "Выключить звук",
|
|
4714
4778
|
"aria-pressed": H,
|
|
4715
4779
|
title: "Звук (M)",
|
|
4716
|
-
onClick:
|
|
4717
|
-
children: /* @__PURE__ */ t(
|
|
4780
|
+
onClick: be,
|
|
4781
|
+
children: /* @__PURE__ */ t(Y, {
|
|
4718
4782
|
name: H || B === 0 ? "IconVolumeMuted" : "IconVolume",
|
|
4719
4783
|
width: 22,
|
|
4720
4784
|
height: 22
|
|
@@ -4728,7 +4792,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4728
4792
|
value: H ? 0 : B,
|
|
4729
4793
|
"aria-label": "Громкость",
|
|
4730
4794
|
"aria-valuetext": `${Math.round((H ? 0 : B) * 100)}%`,
|
|
4731
|
-
onChange: (e) =>
|
|
4795
|
+
onChange: (e) => xe(Number(e.target.value))
|
|
4732
4796
|
})]
|
|
4733
4797
|
}),
|
|
4734
4798
|
/* @__PURE__ */ n("div", {
|
|
@@ -4736,7 +4800,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4736
4800
|
children: [
|
|
4737
4801
|
/* @__PURE__ */ t("span", {
|
|
4738
4802
|
className: $.time,
|
|
4739
|
-
children:
|
|
4803
|
+
children: gr(P)
|
|
4740
4804
|
}),
|
|
4741
4805
|
/* @__PURE__ */ t("input", {
|
|
4742
4806
|
className: $.timeline,
|
|
@@ -4747,12 +4811,12 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4747
4811
|
step: .01,
|
|
4748
4812
|
value: Math.min(P, I || 0),
|
|
4749
4813
|
"aria-label": "Позиция воспроизведения",
|
|
4750
|
-
"aria-valuetext": `${
|
|
4751
|
-
onChange: (e) =>
|
|
4814
|
+
"aria-valuetext": `${gr(P)} из ${gr(I)}`,
|
|
4815
|
+
onChange: (e) => Se(Number(e.target.value))
|
|
4752
4816
|
}),
|
|
4753
4817
|
/* @__PURE__ */ t("span", {
|
|
4754
4818
|
className: $.time,
|
|
4755
|
-
children:
|
|
4819
|
+
children: gr(I)
|
|
4756
4820
|
})
|
|
4757
4821
|
]
|
|
4758
4822
|
}),
|
|
@@ -4765,7 +4829,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4765
4829
|
"aria-expanded": oe,
|
|
4766
4830
|
title: "Настройки",
|
|
4767
4831
|
onClick: () => se((e) => !e),
|
|
4768
|
-
children: /* @__PURE__ */ t(
|
|
4832
|
+
children: /* @__PURE__ */ t(Y, {
|
|
4769
4833
|
name: "IconSettings",
|
|
4770
4834
|
width: 22,
|
|
4771
4835
|
height: 22
|
|
@@ -4773,11 +4837,11 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4773
4837
|
}), /* @__PURE__ */ t("button", {
|
|
4774
4838
|
type: "button",
|
|
4775
4839
|
className: $.controlButton,
|
|
4776
|
-
"aria-label":
|
|
4840
|
+
"aria-label": le ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
|
|
4777
4841
|
title: "Полноэкранный режим (F)",
|
|
4778
|
-
onClick: () => void
|
|
4779
|
-
children: /* @__PURE__ */ t(
|
|
4780
|
-
name:
|
|
4842
|
+
onClick: () => void Ce(),
|
|
4843
|
+
children: /* @__PURE__ */ t(Y, {
|
|
4844
|
+
name: le ? "IconFullscreenExit" : "IconFullscreen",
|
|
4781
4845
|
width: 22,
|
|
4782
4846
|
height: 22
|
|
4783
4847
|
})
|
|
@@ -4792,7 +4856,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4792
4856
|
children: a
|
|
4793
4857
|
})]
|
|
4794
4858
|
});
|
|
4795
|
-
},
|
|
4859
|
+
}, Sr = {
|
|
4796
4860
|
root: "_root_ymidq_1",
|
|
4797
4861
|
trigger: "_trigger_ymidq_15",
|
|
4798
4862
|
heading: "_heading_ymidq_41",
|
|
@@ -4802,7 +4866,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4802
4866
|
open: "_open_ymidq_91",
|
|
4803
4867
|
content: "_content_ymidq_99",
|
|
4804
4868
|
contentInner: "_contentInner_ymidq_119"
|
|
4805
|
-
},
|
|
4869
|
+
}, Cr = (e, t, n, r = 16) => {
|
|
4806
4870
|
if (t > Math.max(0, n - r * 2)) {
|
|
4807
4871
|
let t = e - r;
|
|
4808
4872
|
return Math.abs(t) <= 1 ? {
|
|
@@ -4824,7 +4888,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4824
4888
|
alignment: "none",
|
|
4825
4889
|
delta: 0
|
|
4826
4890
|
};
|
|
4827
|
-
},
|
|
4891
|
+
}, wr = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, autoScrollOnOpen: c = !0, scrollOffset: l = 16, className: u = "" }) => {
|
|
4828
4892
|
let p = f(), [m, _] = g(a), v = o ?? m, y = h(null), b = h(null), x = h(v);
|
|
4829
4893
|
return d(() => {
|
|
4830
4894
|
let e = x.current;
|
|
@@ -4834,7 +4898,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4834
4898
|
let r = !1, i = () => {
|
|
4835
4899
|
if (r) return;
|
|
4836
4900
|
r = !0;
|
|
4837
|
-
let e = t.getBoundingClientRect(), n =
|
|
4901
|
+
let e = t.getBoundingClientRect(), n = Cr(e.top, e.height, window.innerHeight, l);
|
|
4838
4902
|
if (n.alignment === "none") return;
|
|
4839
4903
|
let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
4840
4904
|
window.scrollBy({
|
|
@@ -4855,10 +4919,10 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4855
4919
|
l
|
|
4856
4920
|
]), /* @__PURE__ */ n("section", {
|
|
4857
4921
|
ref: y,
|
|
4858
|
-
className: `${
|
|
4922
|
+
className: `${Sr.root} ${v ? Sr.open : ""} ${u}`,
|
|
4859
4923
|
children: [/* @__PURE__ */ n("button", {
|
|
4860
4924
|
type: "button",
|
|
4861
|
-
className:
|
|
4925
|
+
className: Sr.trigger,
|
|
4862
4926
|
"aria-expanded": v,
|
|
4863
4927
|
"aria-controls": p,
|
|
4864
4928
|
onClick: () => {
|
|
@@ -4866,18 +4930,18 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4866
4930
|
o === void 0 && _(e), s?.(e);
|
|
4867
4931
|
},
|
|
4868
4932
|
children: [/* @__PURE__ */ n("span", {
|
|
4869
|
-
className:
|
|
4933
|
+
className: Sr.heading,
|
|
4870
4934
|
children: [/* @__PURE__ */ t("span", {
|
|
4871
|
-
className:
|
|
4935
|
+
className: Sr.title,
|
|
4872
4936
|
children: e
|
|
4873
4937
|
}), r && /* @__PURE__ */ t("span", {
|
|
4874
|
-
className:
|
|
4938
|
+
className: Sr.subtitle,
|
|
4875
4939
|
children: r
|
|
4876
4940
|
})]
|
|
4877
4941
|
}), /* @__PURE__ */ t("span", {
|
|
4878
|
-
className:
|
|
4942
|
+
className: Sr.icon,
|
|
4879
4943
|
"aria-hidden": "true",
|
|
4880
|
-
children: /* @__PURE__ */ t(
|
|
4944
|
+
children: /* @__PURE__ */ t(Y, {
|
|
4881
4945
|
name: "IconChevron",
|
|
4882
4946
|
width: 20,
|
|
4883
4947
|
height: 20
|
|
@@ -4886,15 +4950,15 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4886
4950
|
}), /* @__PURE__ */ t("div", {
|
|
4887
4951
|
ref: b,
|
|
4888
4952
|
id: p,
|
|
4889
|
-
className:
|
|
4953
|
+
className: Sr.content,
|
|
4890
4954
|
"aria-hidden": !v,
|
|
4891
4955
|
children: /* @__PURE__ */ t("div", {
|
|
4892
|
-
className:
|
|
4956
|
+
className: Sr.contentInner,
|
|
4893
4957
|
children: i
|
|
4894
4958
|
})
|
|
4895
4959
|
})]
|
|
4896
4960
|
});
|
|
4897
|
-
},
|
|
4961
|
+
}, Tr = {
|
|
4898
4962
|
root: "_root_14ewt_1",
|
|
4899
4963
|
topSlot: "_topSlot_14ewt_29",
|
|
4900
4964
|
searchSlot: "_searchSlot_14ewt_31",
|
|
@@ -4912,14 +4976,14 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4912
4976
|
description: "_description_14ewt_235",
|
|
4913
4977
|
badge: "_badge_14ewt_269",
|
|
4914
4978
|
empty: "_empty_14ewt_281"
|
|
4915
|
-
},
|
|
4979
|
+
}, Er = (e, t, n) => {
|
|
4916
4980
|
if (e.length === 0) return -1;
|
|
4917
4981
|
for (let r = 1; r <= e.length; r += 1) {
|
|
4918
4982
|
let i = (t + n * r + e.length) % e.length;
|
|
4919
4983
|
if (!e[i]?.disabled) return i;
|
|
4920
4984
|
}
|
|
4921
4985
|
return -1;
|
|
4922
|
-
},
|
|
4986
|
+
}, Dr = ({ groups: r, currentItemId: i, ariaLabel: a = "Основная навигация", searchSlot: o, topSlot: s, bottomSlot: c, emptyState: l, renderLink: u, onItemSelect: d, className: p = "" }) => {
|
|
4923
4987
|
let m = f(), g = h(null), _ = h({
|
|
4924
4988
|
value: "",
|
|
4925
4989
|
time: 0
|
|
@@ -4931,7 +4995,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4931
4995
|
let n = v.findIndex((e) => e.id === t.id);
|
|
4932
4996
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
4933
4997
|
e.preventDefault();
|
|
4934
|
-
let t =
|
|
4998
|
+
let t = Er(v, n, e.key === "ArrowDown" ? 1 : -1);
|
|
4935
4999
|
x(v[t]);
|
|
4936
5000
|
return;
|
|
4937
5001
|
}
|
|
@@ -4951,26 +5015,26 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4951
5015
|
let a = r.id === i, o = {
|
|
4952
5016
|
children: /* @__PURE__ */ n(e, { children: [
|
|
4953
5017
|
r.icon && /* @__PURE__ */ t("span", {
|
|
4954
|
-
className:
|
|
5018
|
+
className: Tr.icon,
|
|
4955
5019
|
"aria-hidden": "true",
|
|
4956
5020
|
children: r.icon
|
|
4957
5021
|
}),
|
|
4958
5022
|
/* @__PURE__ */ n("span", {
|
|
4959
|
-
className:
|
|
5023
|
+
className: Tr.copy,
|
|
4960
5024
|
children: [/* @__PURE__ */ t("span", {
|
|
4961
|
-
className:
|
|
5025
|
+
className: Tr.label,
|
|
4962
5026
|
children: r.label
|
|
4963
5027
|
}), r.description && /* @__PURE__ */ t("span", {
|
|
4964
|
-
className:
|
|
5028
|
+
className: Tr.description,
|
|
4965
5029
|
children: r.description
|
|
4966
5030
|
})]
|
|
4967
5031
|
}),
|
|
4968
5032
|
r.badge && /* @__PURE__ */ t("span", {
|
|
4969
|
-
className:
|
|
5033
|
+
className: Tr.badge,
|
|
4970
5034
|
children: r.badge
|
|
4971
5035
|
})
|
|
4972
5036
|
] }),
|
|
4973
|
-
className: `${
|
|
5037
|
+
className: `${Tr.link} ${a ? Tr.current : ""}`,
|
|
4974
5038
|
tabIndex: r.id === b ? 0 : -1,
|
|
4975
5039
|
"aria-current": a ? "page" : void 0,
|
|
4976
5040
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -4986,7 +5050,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4986
5050
|
onKeyDown: (e) => S(e, r)
|
|
4987
5051
|
};
|
|
4988
5052
|
return /* @__PURE__ */ t("li", {
|
|
4989
|
-
className:
|
|
5053
|
+
className: Tr.item,
|
|
4990
5054
|
children: u ? u(r, o) : r.href ? /* @__PURE__ */ t("a", {
|
|
4991
5055
|
href: r.href,
|
|
4992
5056
|
...o,
|
|
@@ -5001,45 +5065,45 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5001
5065
|
};
|
|
5002
5066
|
return /* @__PURE__ */ n("nav", {
|
|
5003
5067
|
ref: g,
|
|
5004
|
-
className: `${
|
|
5068
|
+
className: `${Tr.root} ${p}`,
|
|
5005
5069
|
"aria-label": a,
|
|
5006
5070
|
children: [
|
|
5007
5071
|
s && /* @__PURE__ */ t("div", {
|
|
5008
|
-
className:
|
|
5072
|
+
className: Tr.topSlot,
|
|
5009
5073
|
children: s
|
|
5010
5074
|
}),
|
|
5011
5075
|
o && /* @__PURE__ */ t("div", {
|
|
5012
|
-
className:
|
|
5076
|
+
className: Tr.searchSlot,
|
|
5013
5077
|
children: o
|
|
5014
5078
|
}),
|
|
5015
5079
|
/* @__PURE__ */ n("div", {
|
|
5016
|
-
className:
|
|
5080
|
+
className: Tr.groups,
|
|
5017
5081
|
children: [r.map((e) => {
|
|
5018
5082
|
let r = `${m}-${e.id}`;
|
|
5019
5083
|
return /* @__PURE__ */ n("section", {
|
|
5020
|
-
className:
|
|
5084
|
+
className: Tr.group,
|
|
5021
5085
|
"aria-labelledby": e.label ? r : void 0,
|
|
5022
5086
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
5023
5087
|
id: r,
|
|
5024
|
-
className:
|
|
5088
|
+
className: Tr.groupLabel,
|
|
5025
5089
|
children: e.label
|
|
5026
5090
|
}), /* @__PURE__ */ t("ul", {
|
|
5027
|
-
className:
|
|
5091
|
+
className: Tr.list,
|
|
5028
5092
|
children: e.items.map(C)
|
|
5029
5093
|
})]
|
|
5030
5094
|
}, e.id);
|
|
5031
5095
|
}), v.length === 0 && l && /* @__PURE__ */ t("div", {
|
|
5032
|
-
className:
|
|
5096
|
+
className: Tr.empty,
|
|
5033
5097
|
children: l
|
|
5034
5098
|
})]
|
|
5035
5099
|
}),
|
|
5036
5100
|
c && /* @__PURE__ */ t("div", {
|
|
5037
|
-
className:
|
|
5101
|
+
className: Tr.bottomSlot,
|
|
5038
5102
|
children: c
|
|
5039
5103
|
})
|
|
5040
5104
|
]
|
|
5041
5105
|
});
|
|
5042
|
-
},
|
|
5106
|
+
}, Or = {
|
|
5043
5107
|
root: "_root_2mdgb_1",
|
|
5044
5108
|
list: "_list_2mdgb_19",
|
|
5045
5109
|
item: "_item_2mdgb_37",
|
|
@@ -5049,7 +5113,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5049
5113
|
icon: "_icon_2mdgb_141",
|
|
5050
5114
|
badge: "_badge_2mdgb_149",
|
|
5051
5115
|
label: "_label_2mdgb_163"
|
|
5052
|
-
},
|
|
5116
|
+
}, kr = ({ items: r, currentItemId: i, ariaLabel: a = "Мобильная навигация", renderLink: o, onItemSelect: s, className: c = "" }) => {
|
|
5053
5117
|
let l = h(null), u = r.filter((e) => !e.disabled), d = u.some((e) => e.id === i) ? i : u[0]?.id, f = (e) => {
|
|
5054
5118
|
l.current?.querySelectorAll("[data-ds-navigation-item]")[e]?.focus();
|
|
5055
5119
|
}, p = (e, t) => {
|
|
@@ -5066,27 +5130,27 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5066
5130
|
};
|
|
5067
5131
|
return /* @__PURE__ */ t("nav", {
|
|
5068
5132
|
ref: l,
|
|
5069
|
-
className: `${
|
|
5133
|
+
className: `${Or.root} ${c}`,
|
|
5070
5134
|
"aria-label": a,
|
|
5071
5135
|
children: /* @__PURE__ */ t("ul", {
|
|
5072
|
-
className:
|
|
5136
|
+
className: Or.list,
|
|
5073
5137
|
children: r.map((r) => {
|
|
5074
5138
|
let a = r.id === i, c = {
|
|
5075
5139
|
children: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("span", {
|
|
5076
|
-
className:
|
|
5140
|
+
className: Or.visual,
|
|
5077
5141
|
children: [r.icon && /* @__PURE__ */ t("span", {
|
|
5078
|
-
className:
|
|
5142
|
+
className: Or.icon,
|
|
5079
5143
|
"aria-hidden": "true",
|
|
5080
5144
|
children: r.icon
|
|
5081
5145
|
}), r.badge && /* @__PURE__ */ t("span", {
|
|
5082
|
-
className:
|
|
5146
|
+
className: Or.badge,
|
|
5083
5147
|
children: r.badge
|
|
5084
5148
|
})]
|
|
5085
5149
|
}), /* @__PURE__ */ t("span", {
|
|
5086
|
-
className:
|
|
5150
|
+
className: Or.label,
|
|
5087
5151
|
children: r.label
|
|
5088
5152
|
})] }),
|
|
5089
|
-
className: `${
|
|
5153
|
+
className: `${Or.link} ${a ? Or.current : ""}`,
|
|
5090
5154
|
tabIndex: r.id === d ? 0 : -1,
|
|
5091
5155
|
"aria-current": a ? "page" : void 0,
|
|
5092
5156
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5102,7 +5166,7 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5102
5166
|
onKeyDown: (e) => p(e, r)
|
|
5103
5167
|
};
|
|
5104
5168
|
return /* @__PURE__ */ t("li", {
|
|
5105
|
-
className:
|
|
5169
|
+
className: Or.item,
|
|
5106
5170
|
children: o ? o(r, c) : r.href ? /* @__PURE__ */ t("a", {
|
|
5107
5171
|
href: r.href,
|
|
5108
5172
|
...c,
|
|
@@ -5119,4 +5183,4 @@ var bn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5119
5183
|
});
|
|
5120
5184
|
};
|
|
5121
5185
|
//#endregion
|
|
5122
|
-
export {
|
|
5186
|
+
export { Nn as ConfirmModal, wr as DSAccordion, w as DSBadge, kr as DSBottomNavigation, Yn as DSBottomSheet, j as DSButton, Ne as DSCheckbox, D as DSCounterBadge, Lt as DSDataTable, nt as DSDateRange, $e as DSDateTimePicker, Jn as DSDrawer, ut as DSDropDown, yt as DSDropDownMultiple, ee as DSFieldLabel, N as DSFieldMessage, on as DSFileInput, Xt as DSFilters, cn as DSFloatingMenu, Qt as DSFormGrid, $t as DSFormGridItem, Xn as DSFullscreenDialog, Y as DSIcon, je as DSIconNames, Jt as DSInfoBlock, mt as DSInput, k as DSLoader, Dn as DSModal, En as DSModalFrame, Dr as DSNavigationSurface, qn as DSOverlay, Qn as DSPageLoader, sn as DSPortal, xt as DSRadioButton, Kt as DSSearchDropDown, it as DSSkeleton, ft as DSSort, hr as DSTabs, fn as DSTextarea, tr as DSToast, ar as DSToastProvider, pr as DSTooltip, en as DSValidationSummary, xr as DSVideoPlayerFrame, Pn as ErrorModal, On as ModalSystemProvider, Fn as builtInModalRegistry, kn as defineModalRegistry, E as formatDSCounterValue, ze as formatDateInputValue, Ge as formatDateTimeLocalValue, Cr as getDSAccordionScrollTarget, Tt as getDSDataTableColumnStyle, Dt as getDSDataTablePaginationItems, Et as getDSDataTableStickyColumnStyle, Ln as getErrorMessage, wt as getNextDSDataTablePageSelection, ct as getNextEnabledOptionIndex, He as isValidDateInputPrefix, tt as isValidDateRange, Be as maskDateInputValue, Ue as parseDateInputValue, Ke as parseDateTimeLocalValue, hn as resetModalStore, ir as resetToastStore, In as useConfirmModal, zn as useConfirmModalStore, Kn as useDSOverlay, Rn as useErrorModal, Bn as useErrorModalStore, Vn as useModals, mn as useModalsStore, or as useToast, rr as useToastStore, Ot as validateDSDataTableData };
|