@efficiency-point/design-system 0.1.46 → 0.1.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -250,17 +250,17 @@ var M = {
|
|
|
250
250
|
y: "3",
|
|
251
251
|
rx: "2"
|
|
252
252
|
}), /* @__PURE__ */ t("path", { d: "M3 9h18M9 21V9" })]
|
|
253
|
-
}),
|
|
253
|
+
}), le = (e) => /* @__PURE__ */ t(P, {
|
|
254
254
|
...e,
|
|
255
255
|
children: /* @__PURE__ */ t("path", {
|
|
256
256
|
d: "M8 5v14M16 5v14",
|
|
257
257
|
strokeWidth: "3"
|
|
258
258
|
})
|
|
259
|
-
}),
|
|
259
|
+
}), ue = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(P, {
|
|
260
260
|
strokeWidth: e,
|
|
261
261
|
...n,
|
|
262
262
|
children: /* @__PURE__ */ t("path", { d: "M12 5v14M5 12h14" })
|
|
263
|
-
}),
|
|
263
|
+
}), G = (e) => /* @__PURE__ */ n(P, {
|
|
264
264
|
...e,
|
|
265
265
|
children: [
|
|
266
266
|
/* @__PURE__ */ t("path", { d: "M12 22v-5" }),
|
|
@@ -271,20 +271,20 @@ var M = {
|
|
|
271
271
|
}), de = (e) => /* @__PURE__ */ t(P, {
|
|
272
272
|
...e,
|
|
273
273
|
children: /* @__PURE__ */ t("path", { d: "M3 5h18v14H3V5Zm10 7h6v5h-6v-5Z" })
|
|
274
|
-
}),
|
|
274
|
+
}), fe = (e) => /* @__PURE__ */ t(P, {
|
|
275
275
|
...e,
|
|
276
276
|
children: /* @__PURE__ */ t("path", {
|
|
277
277
|
d: "m8 5 11 7-11 7V5Z",
|
|
278
278
|
fill: "currentColor",
|
|
279
279
|
stroke: "none"
|
|
280
280
|
})
|
|
281
|
-
}),
|
|
281
|
+
}), pe = (e) => /* @__PURE__ */ t(P, {
|
|
282
282
|
...e,
|
|
283
283
|
children: /* @__PURE__ */ t("path", { d: "M4 7v5h5M5.5 11a7 7 0 1 1 1.3 6.3" })
|
|
284
|
-
}),
|
|
284
|
+
}), me = (e) => /* @__PURE__ */ t(P, {
|
|
285
285
|
...e,
|
|
286
286
|
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" })
|
|
287
|
-
}),
|
|
287
|
+
}), K = (e) => /* @__PURE__ */ t(P, {
|
|
288
288
|
...e,
|
|
289
289
|
children: /* @__PURE__ */ t("path", { d: "M9 4H4v5m11-5h5v5M9 20H4v-5m11 5h5v-5" })
|
|
290
290
|
}), he = (e) => /* @__PURE__ */ t(P, {
|
|
@@ -343,10 +343,10 @@ var M = {
|
|
|
343
343
|
}), Ee = (e) => /* @__PURE__ */ t(P, {
|
|
344
344
|
...e,
|
|
345
345
|
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" })
|
|
346
|
-
}),
|
|
346
|
+
}), De = (e) => /* @__PURE__ */ n(P, {
|
|
347
347
|
...e,
|
|
348
348
|
children: [/* @__PURE__ */ t("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t("path", { d: "M22 2 11 13" })]
|
|
349
|
-
}),
|
|
349
|
+
}), Oe = (e) => /* @__PURE__ */ n(P, {
|
|
350
350
|
...e,
|
|
351
351
|
children: [
|
|
352
352
|
/* @__PURE__ */ t("circle", {
|
|
@@ -357,7 +357,7 @@ var M = {
|
|
|
357
357
|
/* @__PURE__ */ t("path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }),
|
|
358
358
|
/* @__PURE__ */ t("path", { d: "M9 9h.01M15 9h.01" })
|
|
359
359
|
]
|
|
360
|
-
}),
|
|
360
|
+
}), ke = (e) => /* @__PURE__ */ n(P, {
|
|
361
361
|
...e,
|
|
362
362
|
children: [
|
|
363
363
|
/* @__PURE__ */ t("circle", {
|
|
@@ -382,7 +382,7 @@ var M = {
|
|
|
382
382
|
stroke: "none"
|
|
383
383
|
})
|
|
384
384
|
]
|
|
385
|
-
}),
|
|
385
|
+
}), Ae = (e) => /* @__PURE__ */ t(P, {
|
|
386
386
|
...e,
|
|
387
387
|
children: [
|
|
388
388
|
5,
|
|
@@ -399,60 +399,60 @@ var M = {
|
|
|
399
399
|
fill: "currentColor",
|
|
400
400
|
stroke: "none"
|
|
401
401
|
}, `${n}-${e}`)))
|
|
402
|
-
}),
|
|
402
|
+
}), q = (e) => (n) => /* @__PURE__ */ t(P, {
|
|
403
403
|
...n,
|
|
404
404
|
children: e.map(([e, t], n) => o(e, {
|
|
405
405
|
...t,
|
|
406
406
|
key: t.key ?? `${e}-${n}`
|
|
407
407
|
}))
|
|
408
|
-
}),
|
|
409
|
-
IconAppsGrid:
|
|
410
|
-
IconActivity:
|
|
408
|
+
}), je = {
|
|
409
|
+
IconAppsGrid: Ae,
|
|
410
|
+
IconActivity: q([["path", {
|
|
411
411
|
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",
|
|
412
412
|
key: "169zse"
|
|
413
413
|
}]]),
|
|
414
414
|
IconArchive: R,
|
|
415
|
-
IconAlertTriangle:
|
|
415
|
+
IconAlertTriangle: q([
|
|
416
416
|
["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" }],
|
|
417
417
|
["path", { d: "M12 9v4" }],
|
|
418
418
|
["path", { d: "M12 17h.01" }]
|
|
419
419
|
]),
|
|
420
|
-
IconArrowDown:
|
|
420
|
+
IconArrowDown: q([["path", {
|
|
421
421
|
d: "M12 5v14",
|
|
422
422
|
key: "s699le"
|
|
423
423
|
}], ["path", {
|
|
424
424
|
d: "m19 12-7 7-7-7",
|
|
425
425
|
key: "1idqje"
|
|
426
426
|
}]]),
|
|
427
|
-
IconArrowLeft:
|
|
427
|
+
IconArrowLeft: q([["path", {
|
|
428
428
|
d: "m12 19-7-7 7-7",
|
|
429
429
|
key: "1l729n"
|
|
430
430
|
}], ["path", {
|
|
431
431
|
d: "M19 12H5",
|
|
432
432
|
key: "x3x0zl"
|
|
433
433
|
}]]),
|
|
434
|
-
IconArrowRight:
|
|
434
|
+
IconArrowRight: q([["path", {
|
|
435
435
|
d: "M5 12h14",
|
|
436
436
|
key: "1ays0h"
|
|
437
437
|
}], ["path", {
|
|
438
438
|
d: "m12 5 7 7-7 7",
|
|
439
439
|
key: "xquz4c"
|
|
440
440
|
}]]),
|
|
441
|
-
IconArrowUp:
|
|
441
|
+
IconArrowUp: q([["path", {
|
|
442
442
|
d: "m5 12 7-7 7 7",
|
|
443
443
|
key: "hav0vg"
|
|
444
444
|
}], ["path", {
|
|
445
445
|
d: "M12 19V5",
|
|
446
446
|
key: "x0mq9r"
|
|
447
447
|
}]]),
|
|
448
|
-
IconArrowUpRight:
|
|
448
|
+
IconArrowUpRight: q([["path", {
|
|
449
449
|
d: "M7 7h10v10",
|
|
450
450
|
key: "1tivn9"
|
|
451
451
|
}], ["path", {
|
|
452
452
|
d: "M7 17 17 7",
|
|
453
453
|
key: "1vkiza"
|
|
454
454
|
}]]),
|
|
455
|
-
IconBarChart3:
|
|
455
|
+
IconBarChart3: q([
|
|
456
456
|
["path", { d: "M3 3v18h18" }],
|
|
457
457
|
["path", { d: "M18 17V9" }],
|
|
458
458
|
["path", { d: "M13 17V5" }],
|
|
@@ -460,14 +460,14 @@ var M = {
|
|
|
460
460
|
]),
|
|
461
461
|
IconBedDouble: I,
|
|
462
462
|
IconBookText: L,
|
|
463
|
-
IconBell:
|
|
463
|
+
IconBell: q([["path", {
|
|
464
464
|
d: "M10.268 21a2 2 0 0 0 3.464 0",
|
|
465
465
|
key: "vwvbt9"
|
|
466
466
|
}], ["path", {
|
|
467
467
|
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",
|
|
468
468
|
key: "11g9vi"
|
|
469
469
|
}]]),
|
|
470
|
-
IconBoxes:
|
|
470
|
+
IconBoxes: q([
|
|
471
471
|
["path", {
|
|
472
472
|
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",
|
|
473
473
|
key: "lc1i9w"
|
|
@@ -517,7 +517,7 @@ var M = {
|
|
|
517
517
|
key: "1io7kd"
|
|
518
518
|
}]
|
|
519
519
|
]),
|
|
520
|
-
IconBuilding2:
|
|
520
|
+
IconBuilding2: q([
|
|
521
521
|
["path", {
|
|
522
522
|
d: "M10 12h4",
|
|
523
523
|
key: "a56b0p"
|
|
@@ -539,7 +539,7 @@ var M = {
|
|
|
539
539
|
key: "16ra0t"
|
|
540
540
|
}]
|
|
541
541
|
]),
|
|
542
|
-
IconCamera:
|
|
542
|
+
IconCamera: q([["path", {
|
|
543
543
|
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",
|
|
544
544
|
key: "18u6gg"
|
|
545
545
|
}], ["circle", {
|
|
@@ -548,7 +548,7 @@ var M = {
|
|
|
548
548
|
r: "3",
|
|
549
549
|
key: "1vg3eu"
|
|
550
550
|
}]]),
|
|
551
|
-
IconChartNoAxesCombined:
|
|
551
|
+
IconChartNoAxesCombined: q([
|
|
552
552
|
["path", {
|
|
553
553
|
d: "M12 16v5",
|
|
554
554
|
key: "zza2cw"
|
|
@@ -574,11 +574,11 @@ var M = {
|
|
|
574
574
|
key: "1t2idw"
|
|
575
575
|
}]
|
|
576
576
|
]),
|
|
577
|
-
IconChevronRight:
|
|
577
|
+
IconChevronRight: q([["path", {
|
|
578
578
|
d: "m9 18 6-6-6-6",
|
|
579
579
|
key: "mthhwq"
|
|
580
580
|
}]]),
|
|
581
|
-
IconCircleAlert:
|
|
581
|
+
IconCircleAlert: q([
|
|
582
582
|
["circle", {
|
|
583
583
|
cx: "12",
|
|
584
584
|
cy: "12",
|
|
@@ -600,7 +600,7 @@ var M = {
|
|
|
600
600
|
key: "4dfq90"
|
|
601
601
|
}]
|
|
602
602
|
]),
|
|
603
|
-
IconClock3:
|
|
603
|
+
IconClock3: q([["circle", {
|
|
604
604
|
cx: "12",
|
|
605
605
|
cy: "12",
|
|
606
606
|
r: "10",
|
|
@@ -610,7 +610,7 @@ var M = {
|
|
|
610
610
|
key: "135r8i"
|
|
611
611
|
}]]),
|
|
612
612
|
IconCopy: H,
|
|
613
|
-
IconDownload:
|
|
613
|
+
IconDownload: q([
|
|
614
614
|
["path", {
|
|
615
615
|
d: "M12 15V3",
|
|
616
616
|
key: "m9g1x1"
|
|
@@ -624,7 +624,7 @@ var M = {
|
|
|
624
624
|
key: "brsn70"
|
|
625
625
|
}]
|
|
626
626
|
]),
|
|
627
|
-
IconExternalLink:
|
|
627
|
+
IconExternalLink: q([
|
|
628
628
|
["path", {
|
|
629
629
|
d: "M15 3h6v6",
|
|
630
630
|
key: "1q9fwt"
|
|
@@ -638,7 +638,7 @@ var M = {
|
|
|
638
638
|
key: "a6xqqp"
|
|
639
639
|
}]
|
|
640
640
|
]),
|
|
641
|
-
IconFactory:
|
|
641
|
+
IconFactory: q([
|
|
642
642
|
["path", {
|
|
643
643
|
d: "M12 16h.01",
|
|
644
644
|
key: "1drbdi"
|
|
@@ -657,14 +657,14 @@ var M = {
|
|
|
657
657
|
}]
|
|
658
658
|
]),
|
|
659
659
|
IconFileText: ae,
|
|
660
|
-
IconGauge:
|
|
660
|
+
IconGauge: q([["path", {
|
|
661
661
|
d: "m12 14 4-4",
|
|
662
662
|
key: "9kzdfg"
|
|
663
663
|
}], ["path", {
|
|
664
664
|
d: "M3.34 19a10 10 0 1 1 17.32 0",
|
|
665
665
|
key: "19p75a"
|
|
666
666
|
}]]),
|
|
667
|
-
IconGripVertical:
|
|
667
|
+
IconGripVertical: q([
|
|
668
668
|
["circle", {
|
|
669
669
|
cx: "9",
|
|
670
670
|
cy: "12",
|
|
@@ -702,7 +702,7 @@ var M = {
|
|
|
702
702
|
key: "f4zoj3"
|
|
703
703
|
}]
|
|
704
704
|
]),
|
|
705
|
-
IconLayoutDashboard:
|
|
705
|
+
IconLayoutDashboard: q([
|
|
706
706
|
["rect", {
|
|
707
707
|
width: "7",
|
|
708
708
|
height: "9",
|
|
@@ -736,7 +736,7 @@ var M = {
|
|
|
736
736
|
key: "ldoo1y"
|
|
737
737
|
}]
|
|
738
738
|
]),
|
|
739
|
-
IconLockKeyhole:
|
|
739
|
+
IconLockKeyhole: q([
|
|
740
740
|
["circle", {
|
|
741
741
|
cx: "12",
|
|
742
742
|
cy: "16",
|
|
@@ -756,7 +756,7 @@ var M = {
|
|
|
756
756
|
key: "1pqi11"
|
|
757
757
|
}]
|
|
758
758
|
]),
|
|
759
|
-
IconLogOut:
|
|
759
|
+
IconLogOut: q([
|
|
760
760
|
["path", {
|
|
761
761
|
d: "m16 17 5-5-5-5",
|
|
762
762
|
key: "1bji2h"
|
|
@@ -770,7 +770,7 @@ var M = {
|
|
|
770
770
|
key: "1uf3rs"
|
|
771
771
|
}]
|
|
772
772
|
]),
|
|
773
|
-
IconMaximize2:
|
|
773
|
+
IconMaximize2: q([
|
|
774
774
|
["path", {
|
|
775
775
|
d: "M15 3h6v6",
|
|
776
776
|
key: "1q9fwt"
|
|
@@ -788,7 +788,7 @@ var M = {
|
|
|
788
788
|
key: "wtvkvv"
|
|
789
789
|
}]
|
|
790
790
|
]),
|
|
791
|
-
IconMenu:
|
|
791
|
+
IconMenu: q([
|
|
792
792
|
["path", {
|
|
793
793
|
d: "M4 5h16",
|
|
794
794
|
key: "1tepv9"
|
|
@@ -802,7 +802,7 @@ var M = {
|
|
|
802
802
|
key: "1djgab"
|
|
803
803
|
}]
|
|
804
804
|
]),
|
|
805
|
-
IconPackageCheck:
|
|
805
|
+
IconPackageCheck: q([
|
|
806
806
|
["path", {
|
|
807
807
|
d: "M12 22V12",
|
|
808
808
|
key: "d0xqtd"
|
|
@@ -824,7 +824,7 @@ var M = {
|
|
|
824
824
|
key: "9yrvtv"
|
|
825
825
|
}]
|
|
826
826
|
]),
|
|
827
|
-
IconRefreshCw:
|
|
827
|
+
IconRefreshCw: q([
|
|
828
828
|
["path", {
|
|
829
829
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
830
830
|
key: "v9h5vc"
|
|
@@ -842,14 +842,14 @@ var M = {
|
|
|
842
842
|
key: "1cv678"
|
|
843
843
|
}]
|
|
844
844
|
]),
|
|
845
|
-
IconRotateCw:
|
|
845
|
+
IconRotateCw: q([["path", {
|
|
846
846
|
d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",
|
|
847
847
|
key: "1p45f6"
|
|
848
848
|
}], ["path", {
|
|
849
849
|
d: "M21 3v5h-5",
|
|
850
850
|
key: "1q7to0"
|
|
851
851
|
}]]),
|
|
852
|
-
IconSearch:
|
|
852
|
+
IconSearch: q([["path", {
|
|
853
853
|
d: "m21 21-4.34-4.34",
|
|
854
854
|
key: "14j7rj"
|
|
855
855
|
}], ["circle", {
|
|
@@ -858,7 +858,7 @@ var M = {
|
|
|
858
858
|
r: "8",
|
|
859
859
|
key: "4ej97u"
|
|
860
860
|
}]]),
|
|
861
|
-
IconSettings2:
|
|
861
|
+
IconSettings2: q([
|
|
862
862
|
["path", {
|
|
863
863
|
d: "M14 17H5",
|
|
864
864
|
key: "gfn3mx"
|
|
@@ -880,7 +880,7 @@ var M = {
|
|
|
880
880
|
key: "dfmy0x"
|
|
881
881
|
}]
|
|
882
882
|
]),
|
|
883
|
-
IconShieldAlert:
|
|
883
|
+
IconShieldAlert: q([
|
|
884
884
|
["path", {
|
|
885
885
|
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",
|
|
886
886
|
key: "oel41y"
|
|
@@ -894,14 +894,14 @@ var M = {
|
|
|
894
894
|
key: "1drbdi"
|
|
895
895
|
}]
|
|
896
896
|
]),
|
|
897
|
-
IconShieldCheck:
|
|
897
|
+
IconShieldCheck: q([["path", {
|
|
898
898
|
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",
|
|
899
899
|
key: "oel41y"
|
|
900
900
|
}], ["path", {
|
|
901
901
|
d: "m9 12 2 2 4-4",
|
|
902
902
|
key: "dzmm74"
|
|
903
903
|
}]]),
|
|
904
|
-
IconSmartphone:
|
|
904
|
+
IconSmartphone: q([["rect", {
|
|
905
905
|
width: "14",
|
|
906
906
|
height: "20",
|
|
907
907
|
x: "5",
|
|
@@ -913,7 +913,7 @@ var M = {
|
|
|
913
913
|
d: "M12 18h.01",
|
|
914
914
|
key: "mhygvu"
|
|
915
915
|
}]]),
|
|
916
|
-
IconSparkles:
|
|
916
|
+
IconSparkles: q([
|
|
917
917
|
["path", {
|
|
918
918
|
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",
|
|
919
919
|
key: "1s2grr"
|
|
@@ -933,22 +933,22 @@ var M = {
|
|
|
933
933
|
key: "6kqj1y"
|
|
934
934
|
}]
|
|
935
935
|
]),
|
|
936
|
-
IconTable2:
|
|
936
|
+
IconTable2: q([["path", {
|
|
937
937
|
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",
|
|
938
938
|
key: "gugj83"
|
|
939
939
|
}]]),
|
|
940
|
-
IconThermometer:
|
|
940
|
+
IconThermometer: q([["path", {
|
|
941
941
|
d: "M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",
|
|
942
942
|
key: "17jzev"
|
|
943
943
|
}]]),
|
|
944
|
-
IconTrendingUp:
|
|
944
|
+
IconTrendingUp: q([["path", {
|
|
945
945
|
d: "M16 7h6v6",
|
|
946
946
|
key: "box55l"
|
|
947
947
|
}], ["path", {
|
|
948
948
|
d: "m22 7-8.5 8.5-5-5L2 17",
|
|
949
949
|
key: "1t1m79"
|
|
950
950
|
}]]),
|
|
951
|
-
IconUserCheck:
|
|
951
|
+
IconUserCheck: q([
|
|
952
952
|
["path", {
|
|
953
953
|
d: "m16 11 2 2 4-4",
|
|
954
954
|
key: "9rsbq5"
|
|
@@ -964,7 +964,7 @@ var M = {
|
|
|
964
964
|
key: "nufk8"
|
|
965
965
|
}]
|
|
966
966
|
]),
|
|
967
|
-
IconUserRound:
|
|
967
|
+
IconUserRound: q([["circle", {
|
|
968
968
|
cx: "12",
|
|
969
969
|
cy: "8",
|
|
970
970
|
r: "5",
|
|
@@ -973,7 +973,7 @@ var M = {
|
|
|
973
973
|
d: "M20 21a8 8 0 0 0-16 0",
|
|
974
974
|
key: "rfgkzh"
|
|
975
975
|
}]]),
|
|
976
|
-
IconUsers:
|
|
976
|
+
IconUsers: q([
|
|
977
977
|
["path", {
|
|
978
978
|
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
979
979
|
key: "1yyitq"
|
|
@@ -993,7 +993,7 @@ var M = {
|
|
|
993
993
|
key: "nufk8"
|
|
994
994
|
}]
|
|
995
995
|
]),
|
|
996
|
-
IconUserX:
|
|
996
|
+
IconUserX: q([
|
|
997
997
|
["path", {
|
|
998
998
|
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
999
999
|
key: "1yyitq"
|
|
@@ -1019,7 +1019,7 @@ var M = {
|
|
|
1019
1019
|
key: "1swrse"
|
|
1020
1020
|
}]
|
|
1021
1021
|
]),
|
|
1022
|
-
IconVideo:
|
|
1022
|
+
IconVideo: q([["path", {
|
|
1023
1023
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1024
1024
|
key: "ftymec"
|
|
1025
1025
|
}], ["rect", {
|
|
@@ -1030,7 +1030,7 @@ var M = {
|
|
|
1030
1030
|
rx: "2",
|
|
1031
1031
|
key: "158x01"
|
|
1032
1032
|
}]]),
|
|
1033
|
-
IconVideoOff:
|
|
1033
|
+
IconVideoOff: q([
|
|
1034
1034
|
["path", {
|
|
1035
1035
|
d: "M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196",
|
|
1036
1036
|
key: "w8jjjt"
|
|
@@ -1044,7 +1044,7 @@ var M = {
|
|
|
1044
1044
|
key: "1ooewy"
|
|
1045
1045
|
}]
|
|
1046
1046
|
]),
|
|
1047
|
-
IconVolume2:
|
|
1047
|
+
IconVolume2: q([
|
|
1048
1048
|
["path", {
|
|
1049
1049
|
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",
|
|
1050
1050
|
key: "uqj9uw"
|
|
@@ -1058,7 +1058,7 @@ var M = {
|
|
|
1058
1058
|
key: "ijwkga"
|
|
1059
1059
|
}]
|
|
1060
1060
|
]),
|
|
1061
|
-
IconX:
|
|
1061
|
+
IconX: q([["path", {
|
|
1062
1062
|
d: "M18 6 6 18",
|
|
1063
1063
|
key: "1bl5f8"
|
|
1064
1064
|
}], ["path", {
|
|
@@ -1076,20 +1076,20 @@ var M = {
|
|
|
1076
1076
|
IconInfo: re,
|
|
1077
1077
|
IconInfoCircle: ie,
|
|
1078
1078
|
IconMinus: oe,
|
|
1079
|
-
IconMoreVertical:
|
|
1079
|
+
IconMoreVertical: ke,
|
|
1080
1080
|
IconList: se,
|
|
1081
1081
|
IconPanelsTopLeft: ce,
|
|
1082
|
-
IconPause:
|
|
1082
|
+
IconPause: le,
|
|
1083
1083
|
IconPaperclip: Ee,
|
|
1084
|
-
IconPlus:
|
|
1085
|
-
IconPlug:
|
|
1084
|
+
IconPlus: ue,
|
|
1085
|
+
IconPlug: G,
|
|
1086
1086
|
IconPictureInPicture: de,
|
|
1087
|
-
IconPlay:
|
|
1088
|
-
IconReplay:
|
|
1089
|
-
IconSettings:
|
|
1090
|
-
IconSend:
|
|
1091
|
-
IconSmile:
|
|
1092
|
-
IconFullscreen:
|
|
1087
|
+
IconPlay: fe,
|
|
1088
|
+
IconReplay: pe,
|
|
1089
|
+
IconSettings: me,
|
|
1090
|
+
IconSend: De,
|
|
1091
|
+
IconSmile: Oe,
|
|
1092
|
+
IconFullscreen: K,
|
|
1093
1093
|
IconFullscreenExit: he,
|
|
1094
1094
|
IconCaptions: ge,
|
|
1095
1095
|
IconVolume: _e,
|
|
@@ -1101,25 +1101,25 @@ var M = {
|
|
|
1101
1101
|
IconUpload: Ce,
|
|
1102
1102
|
IconWarning: we,
|
|
1103
1103
|
IconTrash2: Te
|
|
1104
|
-
},
|
|
1105
|
-
let r =
|
|
1104
|
+
}, Me = Object.freeze(Object.keys(je)), J = ({ name: e, ...n }) => {
|
|
1105
|
+
let r = je[e];
|
|
1106
1106
|
return /* @__PURE__ */ t(r, { ...n });
|
|
1107
|
-
},
|
|
1107
|
+
}, Ne = {
|
|
1108
1108
|
wrapper: "_wrapper_1seon_1",
|
|
1109
1109
|
label: "_label_1seon_13",
|
|
1110
1110
|
input: "_input_1seon_35",
|
|
1111
1111
|
control: "_control_1seon_49",
|
|
1112
1112
|
disabled: "_disabled_1seon_95",
|
|
1113
1113
|
controlError: "_controlError_1seon_121"
|
|
1114
|
-
},
|
|
1114
|
+
}, Pe = ({ 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, ..._ }) => {
|
|
1115
1115
|
let v = f(), y = p ?? `ds-checkbox-${u ?? v}`, b = h(null), x = a ? `${y}-hint` : void 0, S = o ? `${y}-error` : void 0;
|
|
1116
1116
|
return d(() => {
|
|
1117
1117
|
b.current && (b.current.indeterminate = m && !e);
|
|
1118
1118
|
}, [e, m]), /* @__PURE__ */ n("div", {
|
|
1119
|
-
className: `${
|
|
1119
|
+
className: `${Ne.wrapper} ${l}`,
|
|
1120
1120
|
children: [
|
|
1121
1121
|
/* @__PURE__ */ n("label", {
|
|
1122
|
-
className: `${
|
|
1122
|
+
className: `${Ne.label} ${s ? Ne.disabled : ""}`,
|
|
1123
1123
|
htmlFor: y,
|
|
1124
1124
|
children: [
|
|
1125
1125
|
/* @__PURE__ */ t("input", {
|
|
@@ -1133,20 +1133,20 @@ var M = {
|
|
|
1133
1133
|
"aria-invalid": !!o,
|
|
1134
1134
|
"aria-describedby": [x, S].filter(Boolean).join(" ") || void 0,
|
|
1135
1135
|
"aria-label": g,
|
|
1136
|
-
className:
|
|
1136
|
+
className: Ne.input,
|
|
1137
1137
|
onChange: (e) => {
|
|
1138
1138
|
c || r?.(e.target.checked, e);
|
|
1139
1139
|
},
|
|
1140
1140
|
..._
|
|
1141
1141
|
}),
|
|
1142
1142
|
/* @__PURE__ */ n("span", {
|
|
1143
|
-
className: `${
|
|
1143
|
+
className: `${Ne.control} ${o ? Ne.controlError : ""}`,
|
|
1144
1144
|
"aria-hidden": "true",
|
|
1145
|
-
children: [m && !e && /* @__PURE__ */ t(
|
|
1145
|
+
children: [m && !e && /* @__PURE__ */ t(J, {
|
|
1146
1146
|
name: "IconMinus",
|
|
1147
1147
|
width: 16,
|
|
1148
1148
|
height: 16
|
|
1149
|
-
}), e && /* @__PURE__ */ t(
|
|
1149
|
+
}), e && /* @__PURE__ */ t(J, {
|
|
1150
1150
|
name: "IconCheck",
|
|
1151
1151
|
width: 16,
|
|
1152
1152
|
height: 16
|
|
@@ -1166,7 +1166,7 @@ var M = {
|
|
|
1166
1166
|
})
|
|
1167
1167
|
]
|
|
1168
1168
|
});
|
|
1169
|
-
},
|
|
1169
|
+
}, Y = {
|
|
1170
1170
|
wrapper: "_wrapper_su17c_1",
|
|
1171
1171
|
trigger: "_trigger_su17c_17",
|
|
1172
1172
|
sm: "_sm_su17c_53",
|
|
@@ -1197,7 +1197,7 @@ var M = {
|
|
|
1197
1197
|
timeLabel: "_timeLabel_su17c_533",
|
|
1198
1198
|
previousMonth: "_previousMonth_su17c_593",
|
|
1199
1199
|
nextMonth: "_nextMonth_su17c_601"
|
|
1200
|
-
},
|
|
1200
|
+
}, Fe = [
|
|
1201
1201
|
"Пн",
|
|
1202
1202
|
"Вт",
|
|
1203
1203
|
"Ср",
|
|
@@ -1205,7 +1205,7 @@ var M = {
|
|
|
1205
1205
|
"Пт",
|
|
1206
1206
|
"Сб",
|
|
1207
1207
|
"Вс"
|
|
1208
|
-
],
|
|
1208
|
+
], Ie = [
|
|
1209
1209
|
"Январь",
|
|
1210
1210
|
"Февраль",
|
|
1211
1211
|
"Март",
|
|
@@ -1218,8 +1218,8 @@ var M = {
|
|
|
1218
1218
|
"Октябрь",
|
|
1219
1219
|
"Ноябрь",
|
|
1220
1220
|
"Декабрь"
|
|
1221
|
-
],
|
|
1222
|
-
let t = e.replace(/\D/g, "").slice(0,
|
|
1221
|
+
], Le = (e) => String(e).padStart(2, "0"), Re = 8, ze = "Некорректная дата", X = (e) => e ? `${Le(e.getDate())}.${Le(e.getMonth() + 1)}.${e.getFullYear()}` : "", Be = (e) => {
|
|
1222
|
+
let t = e.replace(/\D/g, "").slice(0, Re);
|
|
1223
1223
|
return [
|
|
1224
1224
|
t.slice(0, 2),
|
|
1225
1225
|
t.slice(2, 4),
|
|
@@ -1242,7 +1242,7 @@ var M = {
|
|
|
1242
1242
|
return a.getFullYear() !== i || a.getMonth() !== r || a.getDate() !== n ? null : a;
|
|
1243
1243
|
}, We = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Ge = (e, t) => {
|
|
1244
1244
|
if (!e) return "";
|
|
1245
|
-
let n = `${e.getFullYear()}-${
|
|
1245
|
+
let n = `${e.getFullYear()}-${Le(e.getMonth() + 1)}-${Le(e.getDate())}`, r = `${Le(e.getHours())}:${Le(e.getMinutes())}`;
|
|
1246
1246
|
return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
|
|
1247
1247
|
}, Ke = (e, t) => {
|
|
1248
1248
|
if (!e) return null;
|
|
@@ -1264,7 +1264,7 @@ var M = {
|
|
|
1264
1264
|
return Number.isNaN(n.getTime()) ? null : n;
|
|
1265
1265
|
}, qe = (e, t) => {
|
|
1266
1266
|
if (!e) return "";
|
|
1267
|
-
let n = `${
|
|
1267
|
+
let n = `${Le(e.getDate())}.${Le(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${Le(e.getHours())}:${Le(e.getMinutes())}`;
|
|
1268
1268
|
return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
|
|
1269
1269
|
}, Je = (e) => {
|
|
1270
1270
|
let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
|
|
@@ -1276,13 +1276,13 @@ var M = {
|
|
|
1276
1276
|
let r = We(e).getTime();
|
|
1277
1277
|
return !!(t && r < We(t).getTime() || n && r > We(n).getTime());
|
|
1278
1278
|
}, 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 = "" }) => {
|
|
1279
|
-
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(
|
|
1279
|
+
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(X(r)), [W, te] = g(""), [ne, re] = g(0), [ie, ae] = g(null), oe = m(() => Je(R), [R]), se = a !== "time", ce = a !== "date";
|
|
1280
1280
|
d(() => {
|
|
1281
|
-
r && z(r), V(Ge(r, "time")), U(
|
|
1281
|
+
r && z(r), V(Ge(r, "time")), U(X(r));
|
|
1282
1282
|
}, [r]), d(() => () => {
|
|
1283
1283
|
F.current && clearTimeout(F.current);
|
|
1284
1284
|
}, []);
|
|
1285
|
-
let
|
|
1285
|
+
let le = l(() => {
|
|
1286
1286
|
let e = M.current, t = P.current;
|
|
1287
1287
|
if (!e || !t) return;
|
|
1288
1288
|
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;
|
|
@@ -1297,12 +1297,12 @@ var M = {
|
|
|
1297
1297
|
ae(null);
|
|
1298
1298
|
return;
|
|
1299
1299
|
}
|
|
1300
|
-
return
|
|
1301
|
-
window.removeEventListener("resize",
|
|
1300
|
+
return le(), window.addEventListener("resize", le), window.addEventListener("scroll", le, !0), () => {
|
|
1301
|
+
window.removeEventListener("resize", le), window.removeEventListener("scroll", le, !0);
|
|
1302
1302
|
};
|
|
1303
1303
|
}, [
|
|
1304
1304
|
I,
|
|
1305
|
-
|
|
1305
|
+
le,
|
|
1306
1306
|
R,
|
|
1307
1307
|
B
|
|
1308
1308
|
]), d(() => {
|
|
@@ -1317,18 +1317,18 @@ var M = {
|
|
|
1317
1317
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1318
1318
|
};
|
|
1319
1319
|
}, [I]);
|
|
1320
|
-
let
|
|
1320
|
+
let ue = (e) => {
|
|
1321
1321
|
if (Xe(e, x, S)) return;
|
|
1322
1322
|
let t = a === "date" ? Ke(Ge(e, "date"), "date") : new Date(e);
|
|
1323
|
-
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), U(
|
|
1324
|
-
},
|
|
1325
|
-
te(
|
|
1323
|
+
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), U(X(t)), a === "date" && L(!1));
|
|
1324
|
+
}, G = () => {
|
|
1325
|
+
te(ze), re((e) => e + 1), F.current && clearTimeout(F.current), F.current = setTimeout(() => {
|
|
1326
1326
|
te(""), F.current = null;
|
|
1327
1327
|
}, 3e3);
|
|
1328
1328
|
}, de = (e) => {
|
|
1329
|
-
let t = e.replace(/\D/g, "").slice(0,
|
|
1329
|
+
let t = e.replace(/\D/g, "").slice(0, Re);
|
|
1330
1330
|
if (!He(t)) {
|
|
1331
|
-
|
|
1331
|
+
G();
|
|
1332
1332
|
return;
|
|
1333
1333
|
}
|
|
1334
1334
|
let n = Be(t);
|
|
@@ -1336,14 +1336,14 @@ var M = {
|
|
|
1336
1336
|
i?.(null);
|
|
1337
1337
|
return;
|
|
1338
1338
|
}
|
|
1339
|
-
if (t.length <
|
|
1339
|
+
if (t.length < Re) return;
|
|
1340
1340
|
let o = Ue(n);
|
|
1341
1341
|
if (!o || Xe(o, x, S)) {
|
|
1342
|
-
|
|
1342
|
+
G();
|
|
1343
1343
|
return;
|
|
1344
1344
|
}
|
|
1345
1345
|
a === "datetime" && o.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(o), z(o), L(!1), requestAnimationFrame(() => M.current?.blur());
|
|
1346
|
-
},
|
|
1346
|
+
}, fe = (e) => {
|
|
1347
1347
|
if (V(e), !e) {
|
|
1348
1348
|
i?.(null);
|
|
1349
1349
|
return;
|
|
@@ -1352,15 +1352,15 @@ var M = {
|
|
|
1352
1352
|
if (!t) return;
|
|
1353
1353
|
let n = new Date(a === "datetime" ? r ?? R : /* @__PURE__ */ new Date());
|
|
1354
1354
|
n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
|
|
1355
|
-
},
|
|
1355
|
+
}, pe = s ?? (a === "date" ? "ДД.ММ.ГГГГ" : a === "time" ? "ЧЧ:ММ" : "ДД.ММ.ГГГГ ЧЧ:ММ"), me = W ? `${O}-validation` : void 0, K = [
|
|
1356
1356
|
k,
|
|
1357
1357
|
A,
|
|
1358
|
-
|
|
1358
|
+
me
|
|
1359
1359
|
].filter(Boolean).join(" ") || void 0, he = I && !y ? /* @__PURE__ */ n("div", {
|
|
1360
1360
|
ref: P,
|
|
1361
|
-
className:
|
|
1361
|
+
className: Y.panel,
|
|
1362
1362
|
role: "dialog",
|
|
1363
|
-
"aria-label": o ??
|
|
1363
|
+
"aria-label": o ?? pe,
|
|
1364
1364
|
style: ie ? {
|
|
1365
1365
|
top: ie.top,
|
|
1366
1366
|
left: ie.left,
|
|
@@ -1372,32 +1372,32 @@ var M = {
|
|
|
1372
1372
|
},
|
|
1373
1373
|
children: [se && /* @__PURE__ */ n(e, { children: [
|
|
1374
1374
|
/* @__PURE__ */ n("div", {
|
|
1375
|
-
className:
|
|
1375
|
+
className: Y.calendarHeader,
|
|
1376
1376
|
children: [
|
|
1377
1377
|
/* @__PURE__ */ t("button", {
|
|
1378
1378
|
type: "button",
|
|
1379
|
-
className:
|
|
1379
|
+
className: Y.nav,
|
|
1380
1380
|
"aria-label": "Предыдущий месяц",
|
|
1381
1381
|
onClick: () => z(new Date(R.getFullYear(), R.getMonth() - 1, 1)),
|
|
1382
|
-
children: /* @__PURE__ */ t(
|
|
1382
|
+
children: /* @__PURE__ */ t(J, {
|
|
1383
1383
|
name: "IconChevron",
|
|
1384
1384
|
width: 20,
|
|
1385
1385
|
height: 20,
|
|
1386
|
-
className:
|
|
1386
|
+
className: Y.previousMonth
|
|
1387
1387
|
})
|
|
1388
1388
|
}),
|
|
1389
1389
|
/* @__PURE__ */ t("select", {
|
|
1390
|
-
className:
|
|
1390
|
+
className: Y.monthSelect,
|
|
1391
1391
|
"aria-label": "Месяц",
|
|
1392
1392
|
value: R.getMonth(),
|
|
1393
1393
|
onChange: (e) => z(new Date(R.getFullYear(), Number(e.target.value), 1)),
|
|
1394
|
-
children:
|
|
1394
|
+
children: Ie.map((e, n) => /* @__PURE__ */ t("option", {
|
|
1395
1395
|
value: n,
|
|
1396
1396
|
children: e
|
|
1397
1397
|
}, e))
|
|
1398
1398
|
}),
|
|
1399
1399
|
/* @__PURE__ */ t("input", {
|
|
1400
|
-
className:
|
|
1400
|
+
className: Y.yearInput,
|
|
1401
1401
|
type: "number",
|
|
1402
1402
|
"aria-label": "Год",
|
|
1403
1403
|
value: R.getFullYear(),
|
|
@@ -1405,49 +1405,49 @@ var M = {
|
|
|
1405
1405
|
}),
|
|
1406
1406
|
/* @__PURE__ */ t("button", {
|
|
1407
1407
|
type: "button",
|
|
1408
|
-
className:
|
|
1408
|
+
className: Y.nav,
|
|
1409
1409
|
"aria-label": "Следующий месяц",
|
|
1410
1410
|
onClick: () => z(new Date(R.getFullYear(), R.getMonth() + 1, 1)),
|
|
1411
|
-
children: /* @__PURE__ */ t(
|
|
1411
|
+
children: /* @__PURE__ */ t(J, {
|
|
1412
1412
|
name: "IconChevron",
|
|
1413
1413
|
width: 20,
|
|
1414
1414
|
height: 20,
|
|
1415
|
-
className:
|
|
1415
|
+
className: Y.nextMonth
|
|
1416
1416
|
})
|
|
1417
1417
|
})
|
|
1418
1418
|
]
|
|
1419
1419
|
}),
|
|
1420
1420
|
/* @__PURE__ */ t("div", {
|
|
1421
|
-
className:
|
|
1422
|
-
children:
|
|
1421
|
+
className: Y.weekdays,
|
|
1422
|
+
children: Fe.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
|
|
1423
1423
|
}),
|
|
1424
1424
|
/* @__PURE__ */ t("div", {
|
|
1425
|
-
className:
|
|
1425
|
+
className: Y.days,
|
|
1426
1426
|
children: oe.map((e) => {
|
|
1427
1427
|
let n = Ye(r, e);
|
|
1428
1428
|
return /* @__PURE__ */ t("button", {
|
|
1429
1429
|
type: "button",
|
|
1430
|
-
className: `${
|
|
1430
|
+
className: `${Y.day} ${e.getMonth() === R.getMonth() ? "" : Y.outside} ${n ? Y.selected : ""}`,
|
|
1431
1431
|
disabled: Xe(e, x, S),
|
|
1432
1432
|
"aria-pressed": n,
|
|
1433
|
-
onClick: () =>
|
|
1433
|
+
onClick: () => ue(e),
|
|
1434
1434
|
children: e.getDate()
|
|
1435
1435
|
}, e.toISOString());
|
|
1436
1436
|
})
|
|
1437
1437
|
})
|
|
1438
1438
|
] }), ce && /* @__PURE__ */ n("label", {
|
|
1439
|
-
className:
|
|
1439
|
+
className: Y.timeLabel,
|
|
1440
1440
|
children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
|
|
1441
|
-
className:
|
|
1441
|
+
className: Y.timeInput,
|
|
1442
1442
|
type: "time",
|
|
1443
1443
|
value: B,
|
|
1444
|
-
onChange: (e) =>
|
|
1444
|
+
onChange: (e) => fe(e.target.value)
|
|
1445
1445
|
})]
|
|
1446
1446
|
})]
|
|
1447
1447
|
}) : null;
|
|
1448
1448
|
return /* @__PURE__ */ n("div", {
|
|
1449
1449
|
ref: j,
|
|
1450
|
-
className: `${
|
|
1450
|
+
className: `${Y.wrapper} ${E}`,
|
|
1451
1451
|
children: [
|
|
1452
1452
|
o && /* @__PURE__ */ t(ee, {
|
|
1453
1453
|
htmlFor: O,
|
|
@@ -1456,15 +1456,15 @@ var M = {
|
|
|
1456
1456
|
children: o
|
|
1457
1457
|
}),
|
|
1458
1458
|
se ? /* @__PURE__ */ n("div", {
|
|
1459
|
-
className: `${
|
|
1459
|
+
className: `${Y.trigger} ${Y[C]} ${u ? Y.error : ""} ${v ? Y.disabled : ""}`,
|
|
1460
1460
|
children: [
|
|
1461
1461
|
/* @__PURE__ */ t("input", {
|
|
1462
1462
|
ref: M,
|
|
1463
1463
|
id: O,
|
|
1464
1464
|
name: T,
|
|
1465
|
-
className:
|
|
1465
|
+
className: Y.dateInput,
|
|
1466
1466
|
value: H,
|
|
1467
|
-
placeholder:
|
|
1467
|
+
placeholder: pe.split(" ")[0],
|
|
1468
1468
|
inputMode: "numeric",
|
|
1469
1469
|
autoComplete: "off",
|
|
1470
1470
|
maxLength: 10,
|
|
@@ -1472,7 +1472,7 @@ var M = {
|
|
|
1472
1472
|
readOnly: y,
|
|
1473
1473
|
"aria-expanded": I,
|
|
1474
1474
|
"aria-haspopup": "dialog",
|
|
1475
|
-
"aria-describedby":
|
|
1475
|
+
"aria-describedby": K,
|
|
1476
1476
|
"aria-invalid": !!(u || W) || void 0,
|
|
1477
1477
|
onFocus: () => {
|
|
1478
1478
|
y || L(!0);
|
|
@@ -1483,12 +1483,12 @@ var M = {
|
|
|
1483
1483
|
onChange: (e) => de(e.target.value)
|
|
1484
1484
|
}),
|
|
1485
1485
|
a === "datetime" && B && /* @__PURE__ */ t("span", {
|
|
1486
|
-
className:
|
|
1486
|
+
className: Y.timeValue,
|
|
1487
1487
|
children: B
|
|
1488
1488
|
}),
|
|
1489
1489
|
/* @__PURE__ */ t("button", {
|
|
1490
1490
|
type: "button",
|
|
1491
|
-
className:
|
|
1491
|
+
className: Y.chevronButton,
|
|
1492
1492
|
disabled: v || y,
|
|
1493
1493
|
"aria-label": I ? "Закрыть календарь" : "Открыть календарь",
|
|
1494
1494
|
tabIndex: -1,
|
|
@@ -1497,9 +1497,9 @@ var M = {
|
|
|
1497
1497
|
L((e) => !e), M.current?.focus();
|
|
1498
1498
|
},
|
|
1499
1499
|
children: /* @__PURE__ */ t("span", {
|
|
1500
|
-
className: `${
|
|
1500
|
+
className: `${Y.chevron} ${he ? Y.chevronOpen : ""}`,
|
|
1501
1501
|
"aria-hidden": "true",
|
|
1502
|
-
children: /* @__PURE__ */ t(
|
|
1502
|
+
children: /* @__PURE__ */ t(J, {
|
|
1503
1503
|
name: "IconChevron",
|
|
1504
1504
|
width: 20,
|
|
1505
1505
|
height: 20
|
|
@@ -1512,22 +1512,22 @@ var M = {
|
|
|
1512
1512
|
id: O,
|
|
1513
1513
|
name: T,
|
|
1514
1514
|
type: "button",
|
|
1515
|
-
className: `${
|
|
1515
|
+
className: `${Y.trigger} ${Y[C]} ${u ? Y.error : ""}`,
|
|
1516
1516
|
disabled: v,
|
|
1517
1517
|
"aria-readonly": y || void 0,
|
|
1518
1518
|
"aria-expanded": I,
|
|
1519
1519
|
"aria-haspopup": "dialog",
|
|
1520
|
-
"aria-describedby":
|
|
1520
|
+
"aria-describedby": K,
|
|
1521
1521
|
onClick: () => {
|
|
1522
1522
|
y || L((e) => !e);
|
|
1523
1523
|
},
|
|
1524
1524
|
children: [/* @__PURE__ */ t("span", {
|
|
1525
|
-
className: r ?
|
|
1526
|
-
children: qe(r, a) ||
|
|
1525
|
+
className: r ? Y.value : Y.placeholder,
|
|
1526
|
+
children: qe(r, a) || pe
|
|
1527
1527
|
}), /* @__PURE__ */ t("span", {
|
|
1528
|
-
className: `${
|
|
1528
|
+
className: `${Y.chevron} ${he ? Y.chevronOpen : ""}`,
|
|
1529
1529
|
"aria-hidden": "true",
|
|
1530
|
-
children: /* @__PURE__ */ t(
|
|
1530
|
+
children: /* @__PURE__ */ t(J, {
|
|
1531
1531
|
name: "IconChevron",
|
|
1532
1532
|
width: 20,
|
|
1533
1533
|
height: 20
|
|
@@ -1535,8 +1535,8 @@ var M = {
|
|
|
1535
1535
|
})]
|
|
1536
1536
|
}),
|
|
1537
1537
|
W && /* @__PURE__ */ t("span", {
|
|
1538
|
-
id:
|
|
1539
|
-
className:
|
|
1538
|
+
id: me,
|
|
1539
|
+
className: Y.validationTooltip,
|
|
1540
1540
|
role: "status",
|
|
1541
1541
|
"aria-live": "polite",
|
|
1542
1542
|
children: W
|
|
@@ -1742,7 +1742,7 @@ var M = {
|
|
|
1742
1742
|
}
|
|
1743
1743
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), W(i));
|
|
1744
1744
|
},
|
|
1745
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(
|
|
1745
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(J, {
|
|
1746
1746
|
name: "IconCheck",
|
|
1747
1747
|
width: 16,
|
|
1748
1748
|
height: 16
|
|
@@ -1806,7 +1806,7 @@ var M = {
|
|
|
1806
1806
|
}), /* @__PURE__ */ t("span", {
|
|
1807
1807
|
className: [Z.chevron, k ? Z.chevronOpen : ""].filter(Boolean).join(" "),
|
|
1808
1808
|
"aria-hidden": "true",
|
|
1809
|
-
children: /* @__PURE__ */ t(
|
|
1809
|
+
children: /* @__PURE__ */ t(J, {
|
|
1810
1810
|
name: "IconChevron",
|
|
1811
1811
|
width: 20,
|
|
1812
1812
|
height: 20
|
|
@@ -1922,7 +1922,7 @@ var M = {
|
|
|
1922
1922
|
"aria-label": j ? w : T,
|
|
1923
1923
|
"aria-pressed": j,
|
|
1924
1924
|
onClick: () => M((e) => !e),
|
|
1925
|
-
children: /* @__PURE__ */ t(
|
|
1925
|
+
children: /* @__PURE__ */ t(J, {
|
|
1926
1926
|
name: j ? "IconEyeOff" : "IconEye",
|
|
1927
1927
|
width: 20,
|
|
1928
1928
|
height: 20
|
|
@@ -1936,7 +1936,7 @@ var M = {
|
|
|
1936
1936
|
let e = A.current;
|
|
1937
1937
|
e && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
|
|
1938
1938
|
},
|
|
1939
|
-
children: /* @__PURE__ */ t(
|
|
1939
|
+
children: /* @__PURE__ */ t(J, {
|
|
1940
1940
|
name: "IconCross",
|
|
1941
1941
|
width: 20,
|
|
1942
1942
|
height: 20
|
|
@@ -2058,7 +2058,7 @@ var M = {
|
|
|
2058
2058
|
}
|
|
2059
2059
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), te(i)), t.key === "Tab" && j(!1);
|
|
2060
2060
|
},
|
|
2061
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t(
|
|
2061
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t(J, {
|
|
2062
2062
|
name: "IconCheck",
|
|
2063
2063
|
width: 16,
|
|
2064
2064
|
height: 16
|
|
@@ -2114,7 +2114,7 @@ var M = {
|
|
|
2114
2114
|
}), /* @__PURE__ */ t("span", {
|
|
2115
2115
|
className: [Z.chevron, A ? Z.chevronOpen : ""].filter(Boolean).join(" "),
|
|
2116
2116
|
"aria-hidden": "true",
|
|
2117
|
-
children: /* @__PURE__ */ t(
|
|
2117
|
+
children: /* @__PURE__ */ t(J, {
|
|
2118
2118
|
name: "IconChevron",
|
|
2119
2119
|
width: 20,
|
|
2120
2120
|
height: 20
|
|
@@ -2240,11 +2240,14 @@ var M = {
|
|
|
2240
2240
|
30,
|
|
2241
2241
|
50,
|
|
2242
2242
|
-1
|
|
2243
|
-
];
|
|
2244
|
-
function
|
|
2243
|
+
], wt = 30, Tt = 8;
|
|
2244
|
+
function Et(e, t) {
|
|
2245
2245
|
return t.includes(e) ? e : t.includes(30) ? 30 : t.find((e) => Number.isSafeInteger(e) && e > 0) ?? 30;
|
|
2246
2246
|
}
|
|
2247
|
-
|
|
2247
|
+
function Dt(e) {
|
|
2248
|
+
return e === void 0 || !Number.isFinite(e) || e <= 0 ? wt : Math.max(1, Math.floor(e));
|
|
2249
|
+
}
|
|
2250
|
+
var Ot = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
2248
2251
|
let o = e.type === "multi-select" ? e.options : void 0, [s, c] = g(Array.isArray(o) ? o : []), [l, u] = g(!1);
|
|
2249
2252
|
return d(() => {
|
|
2250
2253
|
if (o === void 0) return;
|
|
@@ -2287,20 +2290,20 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2287
2290
|
error: a,
|
|
2288
2291
|
onChange: (e) => r(e)
|
|
2289
2292
|
});
|
|
2290
|
-
},
|
|
2293
|
+
}, kt = (e, t, n) => {
|
|
2291
2294
|
let r = new Set(e);
|
|
2292
2295
|
return t.forEach((e) => {
|
|
2293
2296
|
n ? r.add(e) : r.delete(e);
|
|
2294
2297
|
}), Array.from(r);
|
|
2295
|
-
},
|
|
2298
|
+
}, At = (e) => {
|
|
2296
2299
|
if (!(!e || e.width === void 0 && e.minWidth === void 0 && e.maxWidth === void 0)) return {
|
|
2297
2300
|
width: e.width,
|
|
2298
2301
|
minWidth: e.minWidth,
|
|
2299
2302
|
maxWidth: e.maxWidth
|
|
2300
2303
|
};
|
|
2301
|
-
},
|
|
2304
|
+
}, jt = (e) => {
|
|
2302
2305
|
if (e?.sticky) return e.sticky === "start" ? { insetInlineStart: e.stickyOffset ?? 0 } : { insetInlineEnd: e.stickyOffset ?? 0 };
|
|
2303
|
-
},
|
|
2306
|
+
}, Mt = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
|
|
2304
2307
|
0,
|
|
2305
2308
|
1,
|
|
2306
2309
|
2,
|
|
@@ -2324,7 +2327,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2324
2327
|
e + 1,
|
|
2325
2328
|
"ellipsis-end",
|
|
2326
2329
|
t - 1
|
|
2327
|
-
],
|
|
2330
|
+
], Nt = (e, t) => {
|
|
2328
2331
|
let n = /* @__PURE__ */ new Set();
|
|
2329
2332
|
for (let t of e) {
|
|
2330
2333
|
if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
|
|
@@ -2336,36 +2339,36 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2336
2339
|
for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
|
|
2337
2340
|
}
|
|
2338
2341
|
return null;
|
|
2339
|
-
},
|
|
2342
|
+
}, Pt = (e, t) => typeof e == "function" ? e(t) : t[e], Ft = (e) => {
|
|
2340
2343
|
if (e == null || e === "") return null;
|
|
2341
2344
|
let t = Date.parse(String(e));
|
|
2342
2345
|
return Number.isNaN(t) ? null : t;
|
|
2343
|
-
},
|
|
2344
|
-
let r =
|
|
2346
|
+
}, It = (e, t, n) => {
|
|
2347
|
+
let r = Ft(e.getValue(n)), i = Ft(t.getValue(n));
|
|
2345
2348
|
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
2346
|
-
},
|
|
2349
|
+
}, Lt = (e, t, n) => {
|
|
2347
2350
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2348
2351
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
2349
|
-
},
|
|
2352
|
+
}, Rt = (e, t, n) => {
|
|
2350
2353
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2351
2354
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
2352
|
-
},
|
|
2355
|
+
}, zt = (e, t, n) => {
|
|
2353
2356
|
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
2354
2357
|
return r.localeCompare(i, void 0, {
|
|
2355
2358
|
numeric: !0,
|
|
2356
2359
|
sensitivity: "base"
|
|
2357
2360
|
});
|
|
2358
|
-
},
|
|
2361
|
+
}, Bt = (e) => {
|
|
2359
2362
|
switch (e) {
|
|
2360
|
-
case "date": return
|
|
2361
|
-
case "number": return
|
|
2362
|
-
case "boolean": return
|
|
2363
|
+
case "date": return It;
|
|
2364
|
+
case "number": return Lt;
|
|
2365
|
+
case "boolean": return Rt;
|
|
2363
2366
|
case "text":
|
|
2364
|
-
case void 0: return
|
|
2367
|
+
case void 0: return zt;
|
|
2365
2368
|
case "custom": return;
|
|
2366
2369
|
}
|
|
2367
|
-
},
|
|
2368
|
-
let t = (t) =>
|
|
2370
|
+
}, Vt = (e) => {
|
|
2371
|
+
let t = (t) => Pt(e.accessor, t), n = e.sortFn ?? Bt(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
|
|
2369
2372
|
id: e.id,
|
|
2370
2373
|
accessorFn: t,
|
|
2371
2374
|
header: () => e.header,
|
|
@@ -2377,40 +2380,94 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2377
2380
|
sortDescFirst: e.sortDescFirst
|
|
2378
2381
|
};
|
|
2379
2382
|
return n !== void 0 && (i.sortFn = n), i;
|
|
2380
|
-
},
|
|
2381
|
-
let [
|
|
2382
|
-
if (
|
|
2383
|
-
let
|
|
2384
|
-
return
|
|
2385
|
-
}, [
|
|
2383
|
+
}, Ht = ({ columns: i, data: a, virtualizationThreshold: o = wt, tableOnMobile: s = !1, mobileView: c, breakpoint: l = "default", sorting: u, onSortingChange: f, renderMobileCard: p, getRowId: _, getRowClassName: v, getRowStyle: y, toolbarContent: b, totalCountVariant: S = "default", totalCountLabel: C = "Всего", caption: w, ariaLabel: T, loading: E = !1, error: D, emptyState: O = "Нет данных", stickyHeader: k = !1, maxHeight: A, className: M = "", onRowClick: ee, selectable: N = !1, selectedRowIds: P, onSelectedRowIdsChange: F, onRowDoubleClick: I, getRowSelectionLabel: L, selectAllRowsLabel: R = "Выбрать все строки на этой странице", resetSelectionLabel: z = "Сбросить выбор", openRowLabel: B = "Открыть строку", pagination: V = !1, paginationMode: H = "client", page: U = 1, pageSize: W = 30, onPageSizeChange: te, pageSizeOptions: ne = Ct, pageSizeDraft: re, onPageSizeDraftChange: ie, pageSizeApplyMode: ae = "table", totalCount: oe, onPageChange: se, visibleColumnIds: ce, density: le = "comfortable", renderBulkActions: ue, renderExpandedRow: G, expandedRowIds: de, onExpandedRowIdsChange: fe, getRowExpansionLabel: pe, resultsAnnouncement: me, filterBar: K }) => {
|
|
2384
|
+
let [he, ge] = g([]), [_e, ve] = g([]), [ye, be] = g([]), [xe, Se] = g(0), [Ce, we] = g(() => Et(W, ne)), Te = Dt(o), Ee = u ?? he, De = Ee.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), Oe = W === -1, ke = Oe ? Math.max(1, (H === "server" ? Number(oe) : a.length) || a.length || 1) : Number.isFinite(W) && W > 0 ? Math.floor(W) : 30, Ae = V && H === "server", q = m(() => {
|
|
2385
|
+
if (ce === void 0) return i;
|
|
2386
|
+
let e = new Set(ce);
|
|
2387
|
+
return i.filter((t) => e.has(t.id));
|
|
2388
|
+
}, [i, ce]), je = m(() => q.length === 0 ? "Должна быть видима хотя бы одна колонка" : Nt(q, a), [a, q]), Me = m(() => q.map(Vt), [q]), Ne = q.some((e) => At(e) !== void 0), Y = x({
|
|
2386
2389
|
features: St,
|
|
2387
|
-
columns:
|
|
2388
|
-
data:
|
|
2389
|
-
state: { sorting:
|
|
2390
|
+
columns: Me,
|
|
2391
|
+
data: a,
|
|
2392
|
+
state: { sorting: Ee },
|
|
2390
2393
|
onSortingChange: (e) => {
|
|
2391
|
-
let t = typeof e == "function" ? e(
|
|
2392
|
-
|
|
2394
|
+
let t = typeof e == "function" ? e(Ee) : e;
|
|
2395
|
+
u === void 0 && ge(t), Se(0), f?.(t);
|
|
2393
2396
|
},
|
|
2394
|
-
getRowId:
|
|
2395
|
-
}),
|
|
2396
|
-
|
|
2397
|
+
getRowId: _
|
|
2398
|
+
}), Fe = Y.getRowModel().rows, Ie = Ae && Number.isFinite(oe) && Number(oe) >= 0 ? Math.floor(Number(oe)) : Fe.length, Le = V ? Math.max(1, Math.ceil(Ie / ke)) : 1, Re = Number.isFinite(U) && U > 0 ? Math.floor(U) - 1 : 0, ze = Math.min(Ae ? Re : xe, Le - 1), X = m(() => V && !Ae ? Fe.slice(ze * ke, (ze + 1) * ke) : Fe, [
|
|
2399
|
+
Ae,
|
|
2400
|
+
ke,
|
|
2401
|
+
V,
|
|
2402
|
+
ze,
|
|
2403
|
+
Fe
|
|
2404
|
+
]), Be = X.length > Te, Ve = m(() => ({
|
|
2405
|
+
data: a,
|
|
2406
|
+
sortingKey: De,
|
|
2407
|
+
safePageIndex: ze,
|
|
2408
|
+
normalizedPageSize: ke,
|
|
2409
|
+
pagination: V,
|
|
2410
|
+
isServerPagination: Ae,
|
|
2411
|
+
normalizedVirtualizationThreshold: Te
|
|
2412
|
+
}), [
|
|
2413
|
+
a,
|
|
2414
|
+
De,
|
|
2415
|
+
ze,
|
|
2416
|
+
ke,
|
|
2417
|
+
V,
|
|
2418
|
+
Ae,
|
|
2419
|
+
Te
|
|
2420
|
+
]), [He, Ue] = g({
|
|
2421
|
+
context: Ve,
|
|
2422
|
+
count: Te
|
|
2423
|
+
}), We = He.context === Ve ? He.count : Te;
|
|
2424
|
+
He.context !== Ve && Ue({
|
|
2425
|
+
context: Ve,
|
|
2426
|
+
count: Te
|
|
2427
|
+
});
|
|
2428
|
+
let Ge = m(() => X.slice(0, We), [X, We]), Ke = Be && We < X.length, qe = Ke ? Math.max(0, Ge.length - Tt) : -1, Je = h(/* @__PURE__ */ new Map()), Ye = h(/* @__PURE__ */ new Map());
|
|
2429
|
+
d(() => {
|
|
2430
|
+
if (!Ke || E || je || D) return;
|
|
2431
|
+
let e = [...Je.current.values(), ...Ye.current.values()], t = !0, n = new IntersectionObserver((e) => {
|
|
2432
|
+
!t || !e.some((e) => e.isIntersecting) || (t = !1, n.disconnect(), Ue((e) => e.context === Ve ? {
|
|
2433
|
+
context: Ve,
|
|
2434
|
+
count: Math.min(e.count + Te, X.length)
|
|
2435
|
+
} : e));
|
|
2436
|
+
}, {
|
|
2437
|
+
root: null,
|
|
2438
|
+
threshold: 0
|
|
2439
|
+
});
|
|
2440
|
+
return e.forEach((e) => {
|
|
2441
|
+
e && n.observe(e);
|
|
2442
|
+
}), () => {
|
|
2443
|
+
t = !1, n.disconnect();
|
|
2444
|
+
};
|
|
2445
|
+
}, [
|
|
2446
|
+
Ve,
|
|
2447
|
+
We,
|
|
2397
2448
|
Te,
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2449
|
+
X.length,
|
|
2450
|
+
Ke,
|
|
2451
|
+
E,
|
|
2452
|
+
je,
|
|
2453
|
+
D,
|
|
2454
|
+
c,
|
|
2455
|
+
s,
|
|
2456
|
+
p
|
|
2457
|
+
]);
|
|
2458
|
+
let Xe = P ?? _e, Ze = m(() => new Set(Xe), [Xe]), Qe = de ?? ye, $e = m(() => new Set(Qe), [Qe]), et = m(() => X.map((e) => e.id), [X]), tt = et.filter((e) => Ze.has(e)).length, nt = et.length > 0 && tt === et.length, rt = tt > 0 && !nt, Z = m(() => q.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
2402
2459
|
id: e.id,
|
|
2403
2460
|
label: typeof e.header == "string" ? e.header : e.id
|
|
2404
|
-
})), [q]),
|
|
2461
|
+
})), [q]), at = m(() => Mt(ze, Le), [Le, ze]), ot = c === void 0 ? s : c === "table", st = [
|
|
2405
2462
|
Q.root,
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
].filter(Boolean).join(" "),
|
|
2411
|
-
|
|
2412
|
-
},
|
|
2413
|
-
let i =
|
|
2463
|
+
l === "wide" ? Q.wide : Q.default,
|
|
2464
|
+
ot ? Q.tableOnMobile : "",
|
|
2465
|
+
le === "compact" ? Q.compact : "",
|
|
2466
|
+
M
|
|
2467
|
+
].filter(Boolean).join(" "), ct = je ?? D, lt = V && !Oe && !ct && Ie > ke && (!E || Ae), ut = V && !!(te || ie || K), dt = re ?? Ce, pt = K ? (typeof K.validation == "function" ? K.validation(K.draftValues) : K.validation) ?? {} : {}, mt = K ? JSON.stringify(K.draftValues) !== JSON.stringify(K.appliedValues) || dt !== W : !1, ht = Object.values(pt).some(Boolean), gt = Ie === 0 ? 0 : ze * ke + 1, _t = Math.min((ze + 1) * ke, Ie), vt = () => {
|
|
2468
|
+
dt !== W && (Se(0), se?.(1), te?.(dt));
|
|
2469
|
+
}, yt = (e, r = !1) => {
|
|
2470
|
+
let i = dt !== W, a = `ds-data-table-page-size-warning-${e}`;
|
|
2414
2471
|
return /* @__PURE__ */ n("div", {
|
|
2415
2472
|
className: `${Q.pageSizePanel} ${Q[e]} ${r ? Q.embedded : ""}`,
|
|
2416
2473
|
children: [
|
|
@@ -2418,24 +2475,24 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2418
2475
|
className: Q.pageSizeMain,
|
|
2419
2476
|
children: [/* @__PURE__ */ n("fieldset", {
|
|
2420
2477
|
className: Q.pageSizeFieldset,
|
|
2421
|
-
disabled:
|
|
2478
|
+
disabled: E || K?.applying,
|
|
2422
2479
|
children: [/* @__PURE__ */ t("legend", { children: "На странице" }), /* @__PURE__ */ t("div", {
|
|
2423
2480
|
className: Q.pageSizeOptions,
|
|
2424
|
-
children:
|
|
2481
|
+
children: ne.map((e) => /* @__PURE__ */ t("button", {
|
|
2425
2482
|
type: "button",
|
|
2426
|
-
className: `${Q.pageSizeOption} ${
|
|
2427
|
-
"aria-pressed":
|
|
2483
|
+
className: `${Q.pageSizeOption} ${dt === e ? Q.pageSizeOptionActive : ""}`,
|
|
2484
|
+
"aria-pressed": dt === e,
|
|
2428
2485
|
onClick: () => {
|
|
2429
|
-
|
|
2486
|
+
re === void 0 && we(e), ie?.(e);
|
|
2430
2487
|
},
|
|
2431
2488
|
children: e === -1 ? "Все" : e
|
|
2432
2489
|
}, e))
|
|
2433
2490
|
})]
|
|
2434
|
-
}),
|
|
2491
|
+
}), ae === "table" && !K && /* @__PURE__ */ t(j, {
|
|
2435
2492
|
size: "sm",
|
|
2436
|
-
disabled:
|
|
2437
|
-
"aria-describedby":
|
|
2438
|
-
onClick:
|
|
2493
|
+
disabled: E || !i,
|
|
2494
|
+
"aria-describedby": dt === -1 && i && e === "top" ? a : void 0,
|
|
2495
|
+
onClick: vt,
|
|
2439
2496
|
children: "Применить"
|
|
2440
2497
|
})]
|
|
2441
2498
|
}),
|
|
@@ -2443,90 +2500,93 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2443
2500
|
className: Q.paginationRange,
|
|
2444
2501
|
children: [
|
|
2445
2502
|
"Показано ",
|
|
2446
|
-
|
|
2503
|
+
gt,
|
|
2447
2504
|
"–",
|
|
2448
|
-
|
|
2449
|
-
" из
|
|
2450
|
-
|
|
2505
|
+
_t,
|
|
2506
|
+
" из",
|
|
2507
|
+
" ",
|
|
2508
|
+
Ie
|
|
2451
2509
|
]
|
|
2452
2510
|
}),
|
|
2453
|
-
|
|
2511
|
+
mt && e === "top" && /* @__PURE__ */ t("span", {
|
|
2454
2512
|
className: Q.pendingChanges,
|
|
2455
2513
|
role: "status",
|
|
2456
2514
|
children: "Есть неприменённые изменения"
|
|
2457
2515
|
}),
|
|
2458
|
-
|
|
2516
|
+
Ae && dt === -1 && i && /* @__PURE__ */ n("span", {
|
|
2459
2517
|
id: a,
|
|
2460
2518
|
className: Q.pageSizeWarning,
|
|
2461
2519
|
"aria-hidden": e === "bottom" || void 0,
|
|
2462
2520
|
children: [
|
|
2463
|
-
"Будут загружены все
|
|
2464
|
-
|
|
2465
|
-
|
|
2521
|
+
"Будут загружены все",
|
|
2522
|
+
" ",
|
|
2523
|
+
Ie,
|
|
2524
|
+
" ",
|
|
2525
|
+
"записей"
|
|
2466
2526
|
]
|
|
2467
2527
|
})
|
|
2468
2528
|
]
|
|
2469
2529
|
});
|
|
2470
|
-
},
|
|
2471
|
-
let t = Math.max(0, Math.min(
|
|
2472
|
-
if (
|
|
2473
|
-
t !==
|
|
2530
|
+
}, bt = (e) => {
|
|
2531
|
+
let t = Math.max(0, Math.min(Le - 1, e));
|
|
2532
|
+
if (Ae) {
|
|
2533
|
+
t !== ze && se?.(t + 1);
|
|
2474
2534
|
return;
|
|
2475
2535
|
}
|
|
2476
|
-
|
|
2477
|
-
},
|
|
2536
|
+
Se(t);
|
|
2537
|
+
}, xt = (e) => {
|
|
2478
2538
|
let t = Array.from(e);
|
|
2479
|
-
|
|
2480
|
-
},
|
|
2481
|
-
let t = new Set(
|
|
2482
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
2483
|
-
},
|
|
2484
|
-
let e =
|
|
2485
|
-
|
|
2486
|
-
},
|
|
2487
|
-
let t = new Set(
|
|
2539
|
+
P === void 0 && ve(t), F?.(t);
|
|
2540
|
+
}, Ft = (e) => {
|
|
2541
|
+
let t = new Set(Ze);
|
|
2542
|
+
t.has(e) ? t.delete(e) : t.add(e), xt(t);
|
|
2543
|
+
}, It = () => {
|
|
2544
|
+
let e = kt(Ze, et, !nt);
|
|
2545
|
+
P === void 0 && ve(e), F?.(e);
|
|
2546
|
+
}, Lt = () => xt(/* @__PURE__ */ new Set()), Rt = (e) => {
|
|
2547
|
+
let t = new Set($e);
|
|
2488
2548
|
t.has(e) ? t.delete(e) : t.add(e);
|
|
2489
2549
|
let n = Array.from(t);
|
|
2490
|
-
|
|
2491
|
-
},
|
|
2492
|
-
visibleCount:
|
|
2493
|
-
totalCount:
|
|
2494
|
-
selectedCount:
|
|
2495
|
-
}) ?? `Показано строк: ${
|
|
2550
|
+
de === void 0 && be(n), fe?.(n);
|
|
2551
|
+
}, zt = a.filter((e, t) => Ze.has(_?.(e, t) ?? String(t))), Bt = me?.({
|
|
2552
|
+
visibleCount: X.length,
|
|
2553
|
+
totalCount: Ie,
|
|
2554
|
+
selectedCount: Ze.size
|
|
2555
|
+
}) ?? `Показано строк: ${X.length} из ${Ie}. Выбрано: ${Ze.size}.`;
|
|
2496
2556
|
return d(() => {
|
|
2497
|
-
|
|
2557
|
+
Ae || Se(0);
|
|
2498
2558
|
}, [
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2559
|
+
a,
|
|
2560
|
+
Ae,
|
|
2561
|
+
ke,
|
|
2562
|
+
V,
|
|
2563
|
+
De
|
|
2504
2564
|
]), d(() => {
|
|
2505
|
-
!
|
|
2565
|
+
!Ae && xe >= Le && Se(Le - 1);
|
|
2506
2566
|
}, [
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2567
|
+
Ae,
|
|
2568
|
+
Le,
|
|
2569
|
+
xe
|
|
2510
2570
|
]), d(() => {
|
|
2511
|
-
|
|
2512
|
-
}, [
|
|
2513
|
-
className:
|
|
2514
|
-
"aria-busy":
|
|
2571
|
+
we(Et(W, ne));
|
|
2572
|
+
}, [W, ne]), /* @__PURE__ */ n("section", {
|
|
2573
|
+
className: st,
|
|
2574
|
+
"aria-busy": E,
|
|
2515
2575
|
children: [
|
|
2516
2576
|
/* @__PURE__ */ t("div", {
|
|
2517
2577
|
className: Q.srOnly,
|
|
2518
2578
|
"aria-live": "polite",
|
|
2519
2579
|
"aria-atomic": "true",
|
|
2520
|
-
children:
|
|
2580
|
+
children: Bt
|
|
2521
2581
|
}),
|
|
2522
|
-
|
|
2582
|
+
ue && Ze.size > 0 && /* @__PURE__ */ t("div", {
|
|
2523
2583
|
className: Q.bulkActions,
|
|
2524
2584
|
role: "region",
|
|
2525
2585
|
"aria-label": "Действия с выбранными строками",
|
|
2526
|
-
children:
|
|
2527
|
-
selectedRowIds: Array.from(
|
|
2528
|
-
selectedRows:
|
|
2529
|
-
clearSelection:
|
|
2586
|
+
children: ue({
|
|
2587
|
+
selectedRowIds: Array.from(Ze),
|
|
2588
|
+
selectedRows: zt,
|
|
2589
|
+
clearSelection: Lt
|
|
2530
2590
|
})
|
|
2531
2591
|
}),
|
|
2532
2592
|
K && /* @__PURE__ */ n("form", {
|
|
@@ -2534,36 +2594,36 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2534
2594
|
role: "search",
|
|
2535
2595
|
"aria-label": "Фильтры таблицы",
|
|
2536
2596
|
onSubmit: (e) => {
|
|
2537
|
-
e.preventDefault(), !(
|
|
2597
|
+
e.preventDefault(), !(!mt || ht || K.applying || E) && (Se(0), se?.(1), K.onApply({
|
|
2538
2598
|
filters: K.draftValues,
|
|
2539
|
-
pageSize:
|
|
2599
|
+
pageSize: dt
|
|
2540
2600
|
}));
|
|
2541
2601
|
},
|
|
2542
2602
|
children: [
|
|
2543
2603
|
/* @__PURE__ */ t("div", {
|
|
2544
2604
|
className: Q.filterFields,
|
|
2545
|
-
children: K.fields.map((e) => /* @__PURE__ */ t(
|
|
2605
|
+
children: K.fields.map((e) => /* @__PURE__ */ t(Ot, {
|
|
2546
2606
|
field: e,
|
|
2547
2607
|
value: K.draftValues[e.key],
|
|
2548
|
-
disabled: !!(e.disabled || K.applying ||
|
|
2549
|
-
error:
|
|
2608
|
+
disabled: !!(e.disabled || K.applying || E),
|
|
2609
|
+
error: pt[e.key],
|
|
2550
2610
|
setValue: (t) => K.onDraftValuesChange({
|
|
2551
2611
|
...K.draftValues,
|
|
2552
2612
|
[e.key]: t
|
|
2553
2613
|
})
|
|
2554
2614
|
}, e.key))
|
|
2555
2615
|
}),
|
|
2556
|
-
|
|
2616
|
+
ut && yt("top", !0),
|
|
2557
2617
|
/* @__PURE__ */ n("div", {
|
|
2558
2618
|
className: Q.filterActions,
|
|
2559
2619
|
children: [/* @__PURE__ */ t(j, {
|
|
2560
2620
|
variant: "empty",
|
|
2561
|
-
disabled: K.applying ||
|
|
2621
|
+
disabled: K.applying || E,
|
|
2562
2622
|
onClick: () => {
|
|
2563
2623
|
let e = K.resetValues ?? K.appliedValues;
|
|
2564
2624
|
K.onDraftValuesChange(e);
|
|
2565
|
-
let t = K.resetPageSize ??
|
|
2566
|
-
|
|
2625
|
+
let t = K.resetPageSize ?? ne[0] ?? 30;
|
|
2626
|
+
re === void 0 && we(t), ie?.(t), K.onReset?.({
|
|
2567
2627
|
filters: e,
|
|
2568
2628
|
pageSize: t
|
|
2569
2629
|
});
|
|
@@ -2572,56 +2632,56 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2572
2632
|
}), /* @__PURE__ */ t(j, {
|
|
2573
2633
|
type: "submit",
|
|
2574
2634
|
isLoading: K.applying,
|
|
2575
|
-
disabled:
|
|
2635
|
+
disabled: !mt || ht || E,
|
|
2576
2636
|
children: K.applyLabel ?? "Применить"
|
|
2577
2637
|
})]
|
|
2578
2638
|
})
|
|
2579
2639
|
]
|
|
2580
2640
|
}),
|
|
2581
|
-
|
|
2582
|
-
(
|
|
2641
|
+
ut && !K && yt("top"),
|
|
2642
|
+
(S === "highlighted" || b != null) && /* @__PURE__ */ n("div", {
|
|
2583
2643
|
className: Q.toolbar,
|
|
2584
|
-
children: [
|
|
2644
|
+
children: [S === "highlighted" && /* @__PURE__ */ n("div", {
|
|
2585
2645
|
className: Q.totalWidget,
|
|
2586
|
-
"aria-label": `${
|
|
2646
|
+
"aria-label": `${C}: ${Ie}`,
|
|
2587
2647
|
children: [/* @__PURE__ */ t("span", {
|
|
2588
2648
|
className: Q.totalLabel,
|
|
2589
|
-
children:
|
|
2649
|
+
children: C
|
|
2590
2650
|
}), /* @__PURE__ */ t("strong", {
|
|
2591
2651
|
className: Q.totalValue,
|
|
2592
|
-
children:
|
|
2652
|
+
children: Ie
|
|
2593
2653
|
})]
|
|
2594
|
-
}),
|
|
2654
|
+
}), b]
|
|
2595
2655
|
}),
|
|
2596
|
-
!
|
|
2656
|
+
!ot && !E && !ct && X.length > 0 && Z.length > 0 && /* @__PURE__ */ t(ft, {
|
|
2597
2657
|
className: Q.mobileSort,
|
|
2598
|
-
options:
|
|
2599
|
-
value:
|
|
2600
|
-
id:
|
|
2601
|
-
direction:
|
|
2658
|
+
options: Z,
|
|
2659
|
+
value: Ee[0] ? {
|
|
2660
|
+
id: Ee[0].id,
|
|
2661
|
+
direction: Ee[0].desc ? "desc" : "asc"
|
|
2602
2662
|
} : null,
|
|
2603
|
-
onChange: (e) =>
|
|
2663
|
+
onChange: (e) => Y.setSorting([{
|
|
2604
2664
|
id: e.id,
|
|
2605
2665
|
desc: e.direction === "desc"
|
|
2606
2666
|
}])
|
|
2607
2667
|
}),
|
|
2608
2668
|
/* @__PURE__ */ t("div", {
|
|
2609
2669
|
className: Q.tableWrap,
|
|
2610
|
-
style: { maxHeight:
|
|
2670
|
+
style: { maxHeight: A },
|
|
2611
2671
|
children: /* @__PURE__ */ n("table", {
|
|
2612
2672
|
className: Q.table,
|
|
2613
|
-
"aria-label":
|
|
2673
|
+
"aria-label": T,
|
|
2614
2674
|
children: [
|
|
2615
|
-
|
|
2616
|
-
(
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
q.map((e) => /* @__PURE__ */ t("col", { style:
|
|
2675
|
+
w && /* @__PURE__ */ t("caption", { children: w }),
|
|
2676
|
+
(Ne || N || !!G) && /* @__PURE__ */ n("colgroup", { children: [
|
|
2677
|
+
G && /* @__PURE__ */ t("col", { className: Q.expansionColumn }),
|
|
2678
|
+
N && /* @__PURE__ */ t("col", { className: Q.selectionColumn }),
|
|
2679
|
+
q.map((e) => /* @__PURE__ */ t("col", { style: At(e) }, e.id))
|
|
2620
2680
|
] }),
|
|
2621
2681
|
/* @__PURE__ */ t("thead", {
|
|
2622
|
-
className:
|
|
2623
|
-
children:
|
|
2624
|
-
|
|
2682
|
+
className: k ? Q.sticky : "",
|
|
2683
|
+
children: Y.getHeaderGroups().map((e) => /* @__PURE__ */ n("tr", { children: [
|
|
2684
|
+
G && /* @__PURE__ */ t("th", {
|
|
2625
2685
|
className: Q.expansionCell,
|
|
2626
2686
|
scope: "col",
|
|
2627
2687
|
children: /* @__PURE__ */ t("span", {
|
|
@@ -2629,25 +2689,25 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2629
2689
|
children: "Подробности"
|
|
2630
2690
|
})
|
|
2631
2691
|
}),
|
|
2632
|
-
|
|
2692
|
+
N && /* @__PURE__ */ t("th", {
|
|
2633
2693
|
className: Q.selectionHeaderCell,
|
|
2634
2694
|
scope: "col",
|
|
2635
2695
|
children: /* @__PURE__ */ n("div", {
|
|
2636
2696
|
className: Q.selectionHeaderControls,
|
|
2637
|
-
children: [/* @__PURE__ */ t(
|
|
2638
|
-
checked:
|
|
2639
|
-
indeterminate:
|
|
2640
|
-
disabled:
|
|
2641
|
-
ariaLabel:
|
|
2642
|
-
onChange:
|
|
2697
|
+
children: [/* @__PURE__ */ t(Pe, {
|
|
2698
|
+
checked: nt,
|
|
2699
|
+
indeterminate: rt,
|
|
2700
|
+
disabled: E || et.length === 0,
|
|
2701
|
+
ariaLabel: R,
|
|
2702
|
+
onChange: It
|
|
2643
2703
|
}), /* @__PURE__ */ t(j, {
|
|
2644
2704
|
size: "sm",
|
|
2645
2705
|
variant: "empty",
|
|
2646
|
-
disabled:
|
|
2647
|
-
"aria-label":
|
|
2648
|
-
title:
|
|
2649
|
-
onClick:
|
|
2650
|
-
children: /* @__PURE__ */ t(
|
|
2706
|
+
disabled: Ze.size === 0,
|
|
2707
|
+
"aria-label": z,
|
|
2708
|
+
title: z,
|
|
2709
|
+
onClick: Lt,
|
|
2710
|
+
children: /* @__PURE__ */ t(J, {
|
|
2651
2711
|
name: "IconX",
|
|
2652
2712
|
width: 16,
|
|
2653
2713
|
height: 16
|
|
@@ -2656,21 +2716,21 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2656
2716
|
})
|
|
2657
2717
|
}),
|
|
2658
2718
|
e.headers.map((e) => {
|
|
2659
|
-
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
|
|
2719
|
+
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler(), o = q.find((t) => t.id === e.column.id);
|
|
2660
2720
|
return /* @__PURE__ */ t("th", {
|
|
2661
2721
|
scope: "col",
|
|
2662
2722
|
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
2663
|
-
className:
|
|
2723
|
+
className: o?.sticky ? Q.stickyColumn : void 0,
|
|
2664
2724
|
style: {
|
|
2665
|
-
...
|
|
2666
|
-
...
|
|
2725
|
+
...At(o),
|
|
2726
|
+
...jt(o)
|
|
2667
2727
|
},
|
|
2668
2728
|
children: /* @__PURE__ */ n("button", {
|
|
2669
2729
|
type: "button",
|
|
2670
2730
|
className: Q.sortButton,
|
|
2671
2731
|
disabled: !i,
|
|
2672
2732
|
onClick: a,
|
|
2673
|
-
children: [/* @__PURE__ */ t(
|
|
2733
|
+
children: [/* @__PURE__ */ t(Y.FlexRender, { header: e }), /* @__PURE__ */ t(J, {
|
|
2674
2734
|
name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
|
|
2675
2735
|
width: 16,
|
|
2676
2736
|
height: 16
|
|
@@ -2680,239 +2740,252 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2680
2740
|
})
|
|
2681
2741
|
] }, e.id))
|
|
2682
2742
|
}),
|
|
2683
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2684
|
-
colSpan: q.length + +!!
|
|
2743
|
+
/* @__PURE__ */ t("tbody", { children: E ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2744
|
+
colSpan: q.length + +!!N + +!!G,
|
|
2685
2745
|
children: /* @__PURE__ */ t(it, {
|
|
2686
2746
|
lines: 3,
|
|
2687
2747
|
height: 65
|
|
2688
2748
|
})
|
|
2689
|
-
}) }) :
|
|
2749
|
+
}) }) : ct ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2690
2750
|
className: Q.state,
|
|
2691
|
-
colSpan: q.length + +!!
|
|
2692
|
-
children:
|
|
2693
|
-
}) }) :
|
|
2751
|
+
colSpan: q.length + +!!N + +!!G,
|
|
2752
|
+
children: ct
|
|
2753
|
+
}) }) : X.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2694
2754
|
className: Q.state,
|
|
2695
|
-
colSpan: q.length + +!!
|
|
2696
|
-
children:
|
|
2697
|
-
}) }) :
|
|
2698
|
-
let
|
|
2755
|
+
colSpan: q.length + +!!N + +!!G,
|
|
2756
|
+
children: O
|
|
2757
|
+
}) }) : /* @__PURE__ */ t(e, { children: Ge.map((e, i) => {
|
|
2758
|
+
let a = Ze.has(e.id), o = L?.(e.original) ?? `Выбрать строку ${e.index + 1}`, s = $e.has(e.id);
|
|
2699
2759
|
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ n("tr", {
|
|
2760
|
+
ref: qe >= 0 && i >= qe ? (e) => {
|
|
2761
|
+
e ? Je.current.set(i, e) : Je.current.delete(i);
|
|
2762
|
+
} : void 0,
|
|
2700
2763
|
className: [
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2764
|
+
ee || N ? Q.clickableRow : "",
|
|
2765
|
+
a ? Q.selectedRow : "",
|
|
2766
|
+
v?.(e.original)
|
|
2704
2767
|
].filter(Boolean).join(" "),
|
|
2705
|
-
style:
|
|
2706
|
-
"aria-selected":
|
|
2768
|
+
style: y?.(e.original),
|
|
2769
|
+
"aria-selected": N ? a : void 0,
|
|
2707
2770
|
onClick: () => {
|
|
2708
|
-
|
|
2771
|
+
N ? Ft(e.id) : ee?.(e.original);
|
|
2709
2772
|
},
|
|
2710
2773
|
onDoubleClick: () => {
|
|
2711
|
-
|
|
2774
|
+
N && I?.(e.original);
|
|
2712
2775
|
},
|
|
2713
2776
|
onKeyDown: (t) => {
|
|
2714
|
-
t.key === "Enter" ? (t.preventDefault(),
|
|
2777
|
+
t.key === "Enter" ? (t.preventDefault(), N ? I?.(e.original) : ee?.(e.original)) : t.key === " " && N && (t.preventDefault(), Ft(e.id));
|
|
2715
2778
|
},
|
|
2716
|
-
tabIndex:
|
|
2717
|
-
role: !
|
|
2779
|
+
tabIndex: ee || N || I ? 0 : void 0,
|
|
2780
|
+
role: !N && ee ? "button" : void 0,
|
|
2718
2781
|
children: [
|
|
2719
|
-
|
|
2782
|
+
G && /* @__PURE__ */ t("td", {
|
|
2720
2783
|
className: Q.expansionCell,
|
|
2721
2784
|
onClick: (e) => e.stopPropagation(),
|
|
2722
2785
|
children: /* @__PURE__ */ t(j, {
|
|
2723
2786
|
size: "sm",
|
|
2724
2787
|
variant: "empty",
|
|
2725
|
-
"aria-expanded":
|
|
2726
|
-
"aria-label":
|
|
2727
|
-
onClick: () =>
|
|
2728
|
-
children: /* @__PURE__ */ t(
|
|
2788
|
+
"aria-expanded": s,
|
|
2789
|
+
"aria-label": pe?.(e.original, s) ?? (s ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2790
|
+
onClick: () => Rt(e.id),
|
|
2791
|
+
children: /* @__PURE__ */ t(J, {
|
|
2729
2792
|
name: "IconChevron",
|
|
2730
2793
|
width: 16,
|
|
2731
2794
|
height: 16,
|
|
2732
|
-
className:
|
|
2795
|
+
className: s ? Q.expansionIconOpen : Q.expansionIcon
|
|
2733
2796
|
})
|
|
2734
2797
|
})
|
|
2735
2798
|
}),
|
|
2736
|
-
|
|
2799
|
+
N && /* @__PURE__ */ t("td", {
|
|
2737
2800
|
className: Q.selectionCell,
|
|
2738
2801
|
children: /* @__PURE__ */ t("div", {
|
|
2739
2802
|
onClick: (e) => e.stopPropagation(),
|
|
2740
|
-
children: /* @__PURE__ */ t(
|
|
2741
|
-
checked:
|
|
2742
|
-
ariaLabel:
|
|
2743
|
-
onChange: () =>
|
|
2803
|
+
children: /* @__PURE__ */ t(Pe, {
|
|
2804
|
+
checked: a,
|
|
2805
|
+
ariaLabel: o,
|
|
2806
|
+
onChange: () => Ft(e.id)
|
|
2744
2807
|
})
|
|
2745
2808
|
})
|
|
2746
2809
|
}),
|
|
2747
|
-
e.getAllCells().map((e) =>
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2810
|
+
e.getAllCells().map((e) => {
|
|
2811
|
+
let n = q.find((t) => t.id === e.column.id);
|
|
2812
|
+
return /* @__PURE__ */ t("td", {
|
|
2813
|
+
className: n?.sticky ? Q.stickyColumn : void 0,
|
|
2814
|
+
style: {
|
|
2815
|
+
...At(n),
|
|
2816
|
+
...jt(n)
|
|
2817
|
+
},
|
|
2818
|
+
children: /* @__PURE__ */ t(Y.FlexRender, { cell: e })
|
|
2819
|
+
}, e.id);
|
|
2820
|
+
})
|
|
2755
2821
|
]
|
|
2756
|
-
}),
|
|
2822
|
+
}), s && G && /* @__PURE__ */ t("tr", {
|
|
2757
2823
|
className: Q.detailRow,
|
|
2758
2824
|
children: /* @__PURE__ */ t("td", {
|
|
2759
|
-
colSpan: q.length + +!!
|
|
2760
|
-
children:
|
|
2825
|
+
colSpan: q.length + +!!N + 1,
|
|
2826
|
+
children: G({
|
|
2761
2827
|
row: e.original,
|
|
2762
2828
|
rowId: e.id,
|
|
2763
|
-
collapse: () =>
|
|
2829
|
+
collapse: () => Rt(e.id)
|
|
2764
2830
|
})
|
|
2765
2831
|
})
|
|
2766
2832
|
})] }, e.id);
|
|
2767
|
-
}) })
|
|
2833
|
+
}) }) })
|
|
2768
2834
|
]
|
|
2769
2835
|
})
|
|
2770
2836
|
}),
|
|
2771
|
-
!
|
|
2837
|
+
!ot && /* @__PURE__ */ n("div", {
|
|
2772
2838
|
className: Q.cards,
|
|
2773
2839
|
role: "list",
|
|
2774
|
-
"aria-label":
|
|
2775
|
-
children: [
|
|
2840
|
+
"aria-label": T ?? w,
|
|
2841
|
+
children: [N && !E && !ct && X.length > 0 && /* @__PURE__ */ n("div", {
|
|
2776
2842
|
className: Q.mobileSelectionControls,
|
|
2777
|
-
children: [/* @__PURE__ */ t(
|
|
2778
|
-
checked:
|
|
2779
|
-
indeterminate:
|
|
2780
|
-
ariaLabel:
|
|
2781
|
-
label:
|
|
2782
|
-
onChange:
|
|
2843
|
+
children: [/* @__PURE__ */ t(Pe, {
|
|
2844
|
+
checked: nt,
|
|
2845
|
+
indeterminate: rt,
|
|
2846
|
+
ariaLabel: R,
|
|
2847
|
+
label: R,
|
|
2848
|
+
onChange: It
|
|
2783
2849
|
}), /* @__PURE__ */ t(j, {
|
|
2784
2850
|
size: "sm",
|
|
2785
2851
|
variant: "empty",
|
|
2786
|
-
disabled:
|
|
2787
|
-
onClick:
|
|
2788
|
-
children:
|
|
2852
|
+
disabled: Ze.size === 0,
|
|
2853
|
+
onClick: Lt,
|
|
2854
|
+
children: z
|
|
2789
2855
|
})]
|
|
2790
|
-
}),
|
|
2856
|
+
}), E ? /* @__PURE__ */ t(it, {
|
|
2791
2857
|
lines: 4,
|
|
2792
2858
|
height: 65
|
|
2793
|
-
}) :
|
|
2859
|
+
}) : ct ? /* @__PURE__ */ t("div", {
|
|
2794
2860
|
className: Q.state,
|
|
2795
|
-
children:
|
|
2796
|
-
}) :
|
|
2861
|
+
children: ct
|
|
2862
|
+
}) : X.length === 0 ? /* @__PURE__ */ t("div", {
|
|
2797
2863
|
className: Q.state,
|
|
2798
|
-
children:
|
|
2799
|
-
}) :
|
|
2800
|
-
let
|
|
2864
|
+
children: O
|
|
2865
|
+
}) : /* @__PURE__ */ t(e, { children: Ge.map((e, r) => {
|
|
2866
|
+
let i = Ze.has(e.id), a = $e.has(e.id), o = L?.(e.original) ?? `Выбрать строку ${e.index + 1}`, s = N && /* @__PURE__ */ n("div", {
|
|
2801
2867
|
className: Q.cardSelectionControls,
|
|
2802
2868
|
onClick: (e) => e.stopPropagation(),
|
|
2803
|
-
children: [/* @__PURE__ */ t(
|
|
2804
|
-
checked:
|
|
2805
|
-
ariaLabel:
|
|
2806
|
-
onChange: () =>
|
|
2807
|
-
}),
|
|
2869
|
+
children: [/* @__PURE__ */ t(Pe, {
|
|
2870
|
+
checked: i,
|
|
2871
|
+
ariaLabel: o,
|
|
2872
|
+
onChange: () => Ft(e.id)
|
|
2873
|
+
}), I && /* @__PURE__ */ t(j, {
|
|
2808
2874
|
size: "sm",
|
|
2809
2875
|
variant: "empty",
|
|
2810
|
-
onClick: () =>
|
|
2811
|
-
children:
|
|
2876
|
+
onClick: () => I(e.original),
|
|
2877
|
+
children: B
|
|
2812
2878
|
})]
|
|
2813
|
-
}),
|
|
2879
|
+
}), c = G && /* @__PURE__ */ t(j, {
|
|
2814
2880
|
size: "sm",
|
|
2815
2881
|
variant: "empty",
|
|
2816
|
-
"aria-expanded":
|
|
2817
|
-
"aria-label":
|
|
2882
|
+
"aria-expanded": a,
|
|
2883
|
+
"aria-label": pe?.(e.original, a) ?? (a ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2818
2884
|
onClick: (t) => {
|
|
2819
|
-
t.stopPropagation(),
|
|
2885
|
+
t.stopPropagation(), Rt(e.id);
|
|
2820
2886
|
},
|
|
2821
|
-
children: /* @__PURE__ */ t(
|
|
2887
|
+
children: /* @__PURE__ */ t(J, {
|
|
2822
2888
|
name: "IconChevron",
|
|
2823
2889
|
width: 16,
|
|
2824
2890
|
height: 16,
|
|
2825
|
-
className:
|
|
2891
|
+
className: a ? Q.expansionIconOpen : Q.expansionIcon
|
|
2826
2892
|
})
|
|
2827
2893
|
});
|
|
2828
|
-
if (
|
|
2894
|
+
if (p) return /* @__PURE__ */ n("div", {
|
|
2895
|
+
ref: qe >= 0 && r >= qe ? (e) => {
|
|
2896
|
+
e ? Ye.current.set(r, e) : Ye.current.delete(r);
|
|
2897
|
+
} : void 0,
|
|
2829
2898
|
role: "listitem",
|
|
2830
2899
|
className: [
|
|
2831
2900
|
Q.customCardShell,
|
|
2832
|
-
|
|
2833
|
-
|
|
2901
|
+
i ? Q.selectedCard : "",
|
|
2902
|
+
v?.(e.original)
|
|
2834
2903
|
].filter(Boolean).join(" "),
|
|
2835
|
-
style:
|
|
2836
|
-
"aria-selected":
|
|
2904
|
+
style: y?.(e.original),
|
|
2905
|
+
"aria-selected": N ? i : void 0,
|
|
2837
2906
|
onClick: () => {
|
|
2838
|
-
|
|
2907
|
+
N && Ft(e.id);
|
|
2839
2908
|
},
|
|
2840
2909
|
children: [
|
|
2841
|
-
|
|
2842
|
-
|
|
2910
|
+
s,
|
|
2911
|
+
p({
|
|
2843
2912
|
row: e.original,
|
|
2844
2913
|
columns: q
|
|
2845
2914
|
}),
|
|
2846
|
-
|
|
2847
|
-
|
|
2915
|
+
c,
|
|
2916
|
+
a && /* @__PURE__ */ t("div", {
|
|
2848
2917
|
className: Q.cardDetail,
|
|
2849
|
-
children:
|
|
2918
|
+
children: G?.({
|
|
2850
2919
|
row: e.original,
|
|
2851
2920
|
rowId: e.id,
|
|
2852
|
-
collapse: () =>
|
|
2921
|
+
collapse: () => Rt(e.id)
|
|
2853
2922
|
})
|
|
2854
2923
|
})
|
|
2855
2924
|
]
|
|
2856
2925
|
}, e.id);
|
|
2857
|
-
let
|
|
2926
|
+
let l = q.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), u = l.find((e) => e.mobile?.primary) ?? l.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => Pt(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
|
|
2858
2927
|
return /* @__PURE__ */ n("article", {
|
|
2928
|
+
ref: qe >= 0 && r >= qe ? (e) => {
|
|
2929
|
+
e ? Ye.current.set(r, e) : Ye.current.delete(r);
|
|
2930
|
+
} : void 0,
|
|
2859
2931
|
role: "listitem",
|
|
2860
2932
|
className: [
|
|
2861
2933
|
Q.card,
|
|
2862
|
-
|
|
2863
|
-
|
|
2934
|
+
i ? Q.selectedCard : "",
|
|
2935
|
+
v?.(e.original)
|
|
2864
2936
|
].filter(Boolean).join(" "),
|
|
2865
|
-
style:
|
|
2866
|
-
"aria-selected":
|
|
2937
|
+
style: y?.(e.original),
|
|
2938
|
+
"aria-selected": N ? i : void 0,
|
|
2867
2939
|
onClick: () => {
|
|
2868
|
-
|
|
2940
|
+
N && Ft(e.id);
|
|
2869
2941
|
},
|
|
2870
2942
|
children: [
|
|
2871
|
-
o,
|
|
2872
2943
|
s,
|
|
2873
|
-
|
|
2874
|
-
/* @__PURE__ */ t("
|
|
2944
|
+
c,
|
|
2945
|
+
/* @__PURE__ */ t("h3", { children: u ? f(u) : `Строка ${e.index + 1}` }),
|
|
2946
|
+
/* @__PURE__ */ t("dl", { children: l.filter((e) => e !== u && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
|
|
2875
2947
|
className: e.mobile?.mobileSpan === 2 ? Q.spanTwo : "",
|
|
2876
2948
|
children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: f(e) })]
|
|
2877
2949
|
}, e.id)) }),
|
|
2878
|
-
|
|
2879
|
-
|
|
2950
|
+
l.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: f(e) }, e.id)),
|
|
2951
|
+
a && /* @__PURE__ */ t("div", {
|
|
2880
2952
|
className: Q.cardDetail,
|
|
2881
|
-
children:
|
|
2953
|
+
children: G?.({
|
|
2882
2954
|
row: e.original,
|
|
2883
2955
|
rowId: e.id,
|
|
2884
|
-
collapse: () =>
|
|
2956
|
+
collapse: () => Rt(e.id)
|
|
2885
2957
|
})
|
|
2886
2958
|
})
|
|
2887
2959
|
]
|
|
2888
2960
|
}, e.id);
|
|
2889
|
-
})]
|
|
2961
|
+
}) })]
|
|
2890
2962
|
}),
|
|
2891
|
-
(
|
|
2963
|
+
(lt || ut && !E && !ct && X.length > 0) && /* @__PURE__ */ n("nav", {
|
|
2892
2964
|
className: Q.pagination,
|
|
2893
2965
|
"aria-label": "Пагинация таблицы",
|
|
2894
|
-
children: [
|
|
2966
|
+
children: [ut ? yt("bottom") : /* @__PURE__ */ n("span", {
|
|
2895
2967
|
className: Q.paginationRange,
|
|
2896
2968
|
"aria-live": "polite",
|
|
2897
2969
|
children: [
|
|
2898
|
-
|
|
2970
|
+
gt,
|
|
2899
2971
|
"–",
|
|
2900
|
-
|
|
2901
|
-
" из
|
|
2902
|
-
|
|
2972
|
+
_t,
|
|
2973
|
+
" из",
|
|
2974
|
+
" ",
|
|
2975
|
+
Ie
|
|
2903
2976
|
]
|
|
2904
|
-
}),
|
|
2977
|
+
}), lt && /* @__PURE__ */ n("div", {
|
|
2905
2978
|
className: Q.paginationControls,
|
|
2906
2979
|
children: [
|
|
2907
2980
|
/* @__PURE__ */ n(j, {
|
|
2908
2981
|
variant: "empty",
|
|
2909
2982
|
size: "md",
|
|
2910
|
-
disabled:
|
|
2983
|
+
disabled: E || ze === 0,
|
|
2911
2984
|
"aria-label": "Предыдущая страница",
|
|
2912
2985
|
onClick: () => {
|
|
2913
|
-
|
|
2986
|
+
bt(ze - 1);
|
|
2914
2987
|
},
|
|
2915
|
-
children: [/* @__PURE__ */ t(
|
|
2988
|
+
children: [/* @__PURE__ */ t(J, {
|
|
2916
2989
|
name: "IconChevron",
|
|
2917
2990
|
width: 18,
|
|
2918
2991
|
height: 18,
|
|
@@ -2924,15 +2997,15 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2924
2997
|
}),
|
|
2925
2998
|
/* @__PURE__ */ t("div", {
|
|
2926
2999
|
className: Q.pageNumbers,
|
|
2927
|
-
children:
|
|
2928
|
-
variant: e ===
|
|
3000
|
+
children: at.map((e) => typeof e == "number" ? /* @__PURE__ */ t(j, {
|
|
3001
|
+
variant: e === ze ? "secondary" : "empty",
|
|
2929
3002
|
size: "md",
|
|
2930
3003
|
className: Q.pageButton,
|
|
2931
3004
|
"aria-label": `Перейти на страницу ${e + 1}`,
|
|
2932
|
-
"aria-current": e ===
|
|
2933
|
-
disabled:
|
|
3005
|
+
"aria-current": e === ze ? "page" : void 0,
|
|
3006
|
+
disabled: E,
|
|
2934
3007
|
onClick: () => {
|
|
2935
|
-
|
|
3008
|
+
bt(e);
|
|
2936
3009
|
},
|
|
2937
3010
|
children: e + 1
|
|
2938
3011
|
}, e) : /* @__PURE__ */ t("span", {
|
|
@@ -2944,15 +3017,15 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2944
3017
|
/* @__PURE__ */ n(j, {
|
|
2945
3018
|
variant: "empty",
|
|
2946
3019
|
size: "md",
|
|
2947
|
-
disabled:
|
|
3020
|
+
disabled: E || ze === Le - 1,
|
|
2948
3021
|
"aria-label": "Следующая страница",
|
|
2949
3022
|
onClick: () => {
|
|
2950
|
-
|
|
3023
|
+
bt(ze + 1);
|
|
2951
3024
|
},
|
|
2952
3025
|
children: [/* @__PURE__ */ t("span", {
|
|
2953
3026
|
className: Q.paginationButtonLabel,
|
|
2954
3027
|
children: "Вперёд"
|
|
2955
|
-
}), /* @__PURE__ */ t(
|
|
3028
|
+
}), /* @__PURE__ */ t(J, {
|
|
2956
3029
|
name: "IconChevron",
|
|
2957
3030
|
width: 18,
|
|
2958
3031
|
height: 18,
|
|
@@ -2964,17 +3037,17 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2964
3037
|
})
|
|
2965
3038
|
]
|
|
2966
3039
|
});
|
|
2967
|
-
},
|
|
3040
|
+
}, Ut = (e, t) => {
|
|
2968
3041
|
let n = t.trim().toLocaleLowerCase();
|
|
2969
3042
|
return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
|
|
2970
|
-
},
|
|
3043
|
+
}, Wt = (e, t, n) => {
|
|
2971
3044
|
if (!e.length) return -1;
|
|
2972
3045
|
for (let r = 0; r < e.length; r += 1) {
|
|
2973
3046
|
let i = (t + r * n + e.length) % e.length;
|
|
2974
3047
|
if (!e[i]?.disabled) return i;
|
|
2975
3048
|
}
|
|
2976
3049
|
return -1;
|
|
2977
|
-
},
|
|
3050
|
+
}, Gt = {
|
|
2978
3051
|
wrapper: "_wrapper_1os84_1",
|
|
2979
3052
|
control: "_control_1os84_17",
|
|
2980
3053
|
inputHost: "_inputHost_1os84_25",
|
|
@@ -2993,23 +3066,23 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2993
3066
|
active: "_active_1os84_321",
|
|
2994
3067
|
actionOption: "_actionOption_1os84_341",
|
|
2995
3068
|
visuallyHidden: "_visuallyHidden_1os84_375"
|
|
2996
|
-
},
|
|
3069
|
+
}, Kt = 8, qt = 6, Jt = 5, Yt = 10, Xt = {
|
|
2997
3070
|
sm: 30,
|
|
2998
3071
|
md: 40,
|
|
2999
3072
|
lg: 50
|
|
3000
|
-
},
|
|
3073
|
+
}, Zt = ({ 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 }) => {
|
|
3001
3074
|
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 = [
|
|
3002
3075
|
A,
|
|
3003
3076
|
j,
|
|
3004
3077
|
M
|
|
3005
|
-
].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(() =>
|
|
3078
|
+
].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(() => Ut(e, B), [e, B]), ie = s && u, ae = H >= 0 ? re[H] : void 0;
|
|
3006
3079
|
d(() => V(ne?.label ?? ""), [ne?.label, r]);
|
|
3007
|
-
let oe = l(() => F.current?.querySelector("input") ?? null, []), se = l((e, t) =>
|
|
3080
|
+
let oe = l(() => F.current?.querySelector("input") ?? null, []), se = l((e, t) => Wt(re, e, t), [re]), ce = l((e) => {
|
|
3008
3081
|
U(e), !(e < 0) && requestAnimationFrame(() => L.current[e]?.scrollIntoView({ block: "nearest" }));
|
|
3009
|
-
}, []),
|
|
3082
|
+
}, []), le = l(() => {
|
|
3010
3083
|
let e = oe();
|
|
3011
3084
|
if (!e) return;
|
|
3012
|
-
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(re.length,
|
|
3085
|
+
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(re.length, Jt)) * Xt[x] + Yt, r = window.innerHeight - t.bottom - Kt, i = t.top - Kt, a = r < n && i > r, o = a ? i : r, s = Math.max(Xt[x] + Yt, Math.min(n, o)), c = window.innerWidth - t.width - Kt, l = Math.max(Kt, Math.min(t.left, c)), u = a ? Math.max(Kt, t.top - s - qt) : t.bottom + qt;
|
|
3013
3086
|
te({
|
|
3014
3087
|
top: u,
|
|
3015
3088
|
left: l,
|
|
@@ -3026,10 +3099,10 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3026
3099
|
te(null);
|
|
3027
3100
|
return;
|
|
3028
3101
|
}
|
|
3029
|
-
return
|
|
3030
|
-
window.removeEventListener("resize",
|
|
3102
|
+
return le(), window.addEventListener("resize", le), window.addEventListener("scroll", le, !0), () => {
|
|
3103
|
+
window.removeEventListener("resize", le), window.removeEventListener("scroll", le, !0);
|
|
3031
3104
|
};
|
|
3032
|
-
}, [R,
|
|
3105
|
+
}, [R, le]), d(() => {
|
|
3033
3106
|
if (!R) return;
|
|
3034
3107
|
let e = (e) => {
|
|
3035
3108
|
let t = e.target;
|
|
@@ -3037,14 +3110,14 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3037
3110
|
};
|
|
3038
3111
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
3039
3112
|
}, [R]);
|
|
3040
|
-
let
|
|
3113
|
+
let ue = () => {
|
|
3041
3114
|
s || c || (z(!0), U(se(0, 1)));
|
|
3042
|
-
},
|
|
3115
|
+
}, G = (e) => {
|
|
3043
3116
|
e.disabled || (V(e.label), z(!1), U(-1), i?.(e.value, e), oe()?.focus());
|
|
3044
3117
|
}, de = R ? /* @__PURE__ */ t("ul", {
|
|
3045
3118
|
ref: I,
|
|
3046
3119
|
id: k,
|
|
3047
|
-
className: `${
|
|
3120
|
+
className: `${Gt.menu} ${re.length === 0 ? Gt.menuEmpty : ""}`,
|
|
3048
3121
|
role: "listbox",
|
|
3049
3122
|
"aria-label": v,
|
|
3050
3123
|
style: W ? {
|
|
@@ -3059,7 +3132,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3059
3132
|
maxHeight: 0
|
|
3060
3133
|
},
|
|
3061
3134
|
children: re.length === 0 ? /* @__PURE__ */ t("li", {
|
|
3062
|
-
className: `${
|
|
3135
|
+
className: `${Gt.empty} ${Gt[x]}`,
|
|
3063
3136
|
children: o
|
|
3064
3137
|
}) : re.map((e, i) => {
|
|
3065
3138
|
let a = e.value === r, o = i === H;
|
|
@@ -3078,17 +3151,17 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3078
3151
|
"aria-selected": a,
|
|
3079
3152
|
"data-option-variant": e.variant ?? "default",
|
|
3080
3153
|
className: [
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
e.variant === "action" ?
|
|
3084
|
-
a ?
|
|
3085
|
-
o ?
|
|
3154
|
+
Gt.option,
|
|
3155
|
+
Gt[x],
|
|
3156
|
+
e.variant === "action" ? Gt.actionOption : "",
|
|
3157
|
+
a ? Gt.selected : "",
|
|
3158
|
+
o ? Gt.active : ""
|
|
3086
3159
|
].filter(Boolean).join(" "),
|
|
3087
3160
|
onPointerMove: () => {
|
|
3088
3161
|
e.disabled || U(i);
|
|
3089
3162
|
},
|
|
3090
|
-
onClick: () =>
|
|
3091
|
-
children: [/* @__PURE__ */ t("span", { children: e.label }), a && E && /* @__PURE__ */ t(
|
|
3163
|
+
onClick: () => G(e),
|
|
3164
|
+
children: [/* @__PURE__ */ t("span", { children: e.label }), a && E && /* @__PURE__ */ t(J, {
|
|
3092
3165
|
name: "IconCheck",
|
|
3093
3166
|
width: 16,
|
|
3094
3167
|
height: 16
|
|
@@ -3100,8 +3173,8 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3100
3173
|
return /* @__PURE__ */ n("div", {
|
|
3101
3174
|
ref: F,
|
|
3102
3175
|
className: [
|
|
3103
|
-
|
|
3104
|
-
y ?
|
|
3176
|
+
Gt.wrapper,
|
|
3177
|
+
y ? Gt.errorState : "",
|
|
3105
3178
|
C
|
|
3106
3179
|
].filter(Boolean).join(" "),
|
|
3107
3180
|
children: [
|
|
@@ -3112,10 +3185,10 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3112
3185
|
children: v
|
|
3113
3186
|
}),
|
|
3114
3187
|
ie ? /* @__PURE__ */ t("div", {
|
|
3115
|
-
className: `${
|
|
3188
|
+
className: `${Gt.disabledText} ${Gt[x]}`,
|
|
3116
3189
|
children: ne?.label ?? a
|
|
3117
3190
|
}) : /* @__PURE__ */ n("div", {
|
|
3118
|
-
className:
|
|
3191
|
+
className: Gt.control,
|
|
3119
3192
|
children: [/* @__PURE__ */ t(mt, {
|
|
3120
3193
|
id: O,
|
|
3121
3194
|
name: w,
|
|
@@ -3127,11 +3200,11 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3127
3200
|
size: x,
|
|
3128
3201
|
clearable: !1,
|
|
3129
3202
|
autoComplete: "off",
|
|
3130
|
-
className: `${
|
|
3131
|
-
onFocus:
|
|
3203
|
+
className: `${Gt.inputHost} ${Gt[x]}`,
|
|
3204
|
+
onFocus: ue,
|
|
3132
3205
|
onChange: (t) => {
|
|
3133
|
-
let n = String(t), r =
|
|
3134
|
-
V(n), z(!0), U(
|
|
3206
|
+
let n = String(t), r = Ut(e, n);
|
|
3207
|
+
V(n), z(!0), U(Wt(r, 0, 1));
|
|
3135
3208
|
},
|
|
3136
3209
|
role: "combobox",
|
|
3137
3210
|
"aria-autocomplete": "list",
|
|
@@ -3140,7 +3213,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3140
3213
|
"aria-activedescendant": ae ? `${O}-option-${H}` : void 0,
|
|
3141
3214
|
"aria-invalid": !!y,
|
|
3142
3215
|
"aria-describedby": P,
|
|
3143
|
-
onClick:
|
|
3216
|
+
onClick: ue,
|
|
3144
3217
|
onKeyDown: (e) => {
|
|
3145
3218
|
if (!(s || c)) {
|
|
3146
3219
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
@@ -3152,13 +3225,13 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3152
3225
|
e.preventDefault();
|
|
3153
3226
|
let t = e.key === "Home" ? 1 : -1;
|
|
3154
3227
|
ce(se(e.key === "Home" ? 0 : re.length - 1, t));
|
|
3155
|
-
} else e.key === "Enter" && R && ae ? (e.preventDefault(),
|
|
3228
|
+
} else e.key === "Enter" && R && ae ? (e.preventDefault(), G(ae)) : e.key === "Escape" && R ? (e.preventDefault(), z(!1), U(-1)) : e.key === "Tab" && (z(!1), U(-1));
|
|
3156
3229
|
}
|
|
3157
3230
|
}
|
|
3158
3231
|
}), /* @__PURE__ */ t("span", {
|
|
3159
|
-
className: `${
|
|
3232
|
+
className: `${Gt.chevron} ${R ? Gt.chevronOpen : ""}`,
|
|
3160
3233
|
"aria-hidden": "true",
|
|
3161
|
-
children: /* @__PURE__ */ t(
|
|
3234
|
+
children: /* @__PURE__ */ t(J, {
|
|
3162
3235
|
name: "IconChevron",
|
|
3163
3236
|
width: 20,
|
|
3164
3237
|
height: 20
|
|
@@ -3168,7 +3241,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3168
3241
|
R && typeof document < "u" && _(de, document.body),
|
|
3169
3242
|
/* @__PURE__ */ n("span", {
|
|
3170
3243
|
id: A,
|
|
3171
|
-
className:
|
|
3244
|
+
className: Gt.visuallyHidden,
|
|
3172
3245
|
"aria-live": "polite",
|
|
3173
3246
|
children: ["Найдено вариантов: ", re.length]
|
|
3174
3247
|
}),
|
|
@@ -3183,44 +3256,44 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3183
3256
|
})
|
|
3184
3257
|
]
|
|
3185
3258
|
});
|
|
3186
|
-
},
|
|
3259
|
+
}, Qt = {
|
|
3187
3260
|
root: "_root_11adi_1",
|
|
3188
3261
|
header: "_header_11adi_21",
|
|
3189
3262
|
title: "_title_11adi_41",
|
|
3190
3263
|
dismiss: "_dismiss_11adi_55",
|
|
3191
3264
|
content: "_content_11adi_65"
|
|
3192
|
-
},
|
|
3265
|
+
}, $t = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: c = "" }) => {
|
|
3193
3266
|
let l = `ds-info-block-${f()}`;
|
|
3194
3267
|
return /* @__PURE__ */ n("section", {
|
|
3195
|
-
className: `${
|
|
3268
|
+
className: `${Qt.root} ${c}`,
|
|
3196
3269
|
"aria-labelledby": l,
|
|
3197
3270
|
children: [/* @__PURE__ */ n("header", {
|
|
3198
|
-
className:
|
|
3271
|
+
className: Qt.header,
|
|
3199
3272
|
children: [/* @__PURE__ */ t(s, {
|
|
3200
3273
|
id: l,
|
|
3201
|
-
className:
|
|
3274
|
+
className: Qt.title,
|
|
3202
3275
|
children: e
|
|
3203
3276
|
}), i && /* @__PURE__ */ t(j, {
|
|
3204
|
-
className:
|
|
3277
|
+
className: Qt.dismiss,
|
|
3205
3278
|
variant: "empty",
|
|
3206
3279
|
onClick: a,
|
|
3207
3280
|
"aria-label": o,
|
|
3208
|
-
children: /* @__PURE__ */ t(
|
|
3281
|
+
children: /* @__PURE__ */ t(J, {
|
|
3209
3282
|
name: "IconCross",
|
|
3210
3283
|
width: 20,
|
|
3211
3284
|
height: 20
|
|
3212
3285
|
})
|
|
3213
3286
|
})]
|
|
3214
3287
|
}), /* @__PURE__ */ t("div", {
|
|
3215
|
-
className:
|
|
3288
|
+
className: Qt.content,
|
|
3216
3289
|
children: r
|
|
3217
3290
|
})]
|
|
3218
3291
|
});
|
|
3219
|
-
},
|
|
3292
|
+
}, en = {
|
|
3220
3293
|
root: "_root_1ecm3_1",
|
|
3221
3294
|
grid: "_grid_1ecm3_13",
|
|
3222
3295
|
actions: "_actions_1ecm3_27"
|
|
3223
|
-
},
|
|
3296
|
+
}, tn = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
|
|
3224
3297
|
let d = (e, t) => {
|
|
3225
3298
|
let n = {
|
|
3226
3299
|
...r,
|
|
@@ -3229,11 +3302,11 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3229
3302
|
i?.(n, e), s === "instant" && a?.(n);
|
|
3230
3303
|
};
|
|
3231
3304
|
return /* @__PURE__ */ n("section", {
|
|
3232
|
-
className: `${
|
|
3305
|
+
className: `${en.root} ${u}`,
|
|
3233
3306
|
"aria-label": "Фильтры",
|
|
3234
3307
|
"aria-busy": c,
|
|
3235
3308
|
children: [/* @__PURE__ */ t("div", {
|
|
3236
|
-
className:
|
|
3309
|
+
className: en.grid,
|
|
3237
3310
|
children: e.filter((e) => !e.hidden).map((e) => {
|
|
3238
3311
|
let n = l || c || e.disabled, i = r[e.id];
|
|
3239
3312
|
if (e.type === "input") {
|
|
@@ -3273,7 +3346,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3273
3346
|
disabled: n,
|
|
3274
3347
|
onChange: (t) => d(e.id, t)
|
|
3275
3348
|
}, e.id);
|
|
3276
|
-
if (e.type === "checkbox") return /* @__PURE__ */ t(
|
|
3349
|
+
if (e.type === "checkbox") return /* @__PURE__ */ t(Pe, {
|
|
3277
3350
|
label: e.label,
|
|
3278
3351
|
hint: e.hint,
|
|
3279
3352
|
checked: !!i,
|
|
@@ -3301,7 +3374,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3301
3374
|
}, e.id);
|
|
3302
3375
|
})
|
|
3303
3376
|
}), (o || s === "manual") && /* @__PURE__ */ n("div", {
|
|
3304
|
-
className:
|
|
3377
|
+
className: en.actions,
|
|
3305
3378
|
children: [o && /* @__PURE__ */ t(j, {
|
|
3306
3379
|
variant: "destructiveOutline",
|
|
3307
3380
|
disabled: l || c,
|
|
@@ -3315,7 +3388,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3315
3388
|
})]
|
|
3316
3389
|
})]
|
|
3317
3390
|
});
|
|
3318
|
-
},
|
|
3391
|
+
}, nn = {
|
|
3319
3392
|
grid: "_grid_1q540_1",
|
|
3320
3393
|
comfortable: "_comfortable_1q540_11",
|
|
3321
3394
|
compact: "_compact_1q540_19",
|
|
@@ -3332,23 +3405,23 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3332
3405
|
summary: "_summary_1q540_101",
|
|
3333
3406
|
summaryTitle: "_summaryTitle_1q540_137",
|
|
3334
3407
|
summaryList: "_summaryList_1q540_145"
|
|
3335
|
-
},
|
|
3408
|
+
}, rn = ({ columns: e = 2, density: n = "comfortable", className: r = "", ...i }) => /* @__PURE__ */ t("div", {
|
|
3336
3409
|
...i,
|
|
3337
|
-
className: `${
|
|
3338
|
-
}),
|
|
3410
|
+
className: `${nn.grid} ${nn[`columns${e}`]} ${nn[n]} ${r}`
|
|
3411
|
+
}), an = ({ span: e = 1, className: n = "", ...r }) => /* @__PURE__ */ t("div", {
|
|
3339
3412
|
...r,
|
|
3340
|
-
className: `${
|
|
3341
|
-
}),
|
|
3413
|
+
className: `${nn.item} ${nn[`span${e}`]} ${n}`
|
|
3414
|
+
}), on = ({ title: e = "Проверьте заполнение формы", items: r, focusField: i, className: a = "", ...o }) => r.length === 0 ? null : /* @__PURE__ */ n("div", {
|
|
3342
3415
|
...o,
|
|
3343
|
-
className: `${
|
|
3416
|
+
className: `${nn.summary} ${a}`,
|
|
3344
3417
|
role: "alert",
|
|
3345
3418
|
"aria-atomic": "true",
|
|
3346
3419
|
tabIndex: -1,
|
|
3347
3420
|
children: [/* @__PURE__ */ t("strong", {
|
|
3348
|
-
className:
|
|
3421
|
+
className: nn.summaryTitle,
|
|
3349
3422
|
children: e
|
|
3350
3423
|
}), /* @__PURE__ */ t("ul", {
|
|
3351
|
-
className:
|
|
3424
|
+
className: nn.summaryList,
|
|
3352
3425
|
children: r.map((e) => /* @__PURE__ */ t("li", { children: e.fieldId ? /* @__PURE__ */ t("a", {
|
|
3353
3426
|
href: `#${e.fieldId}`,
|
|
3354
3427
|
onClick: (t) => {
|
|
@@ -3357,7 +3430,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3357
3430
|
children: e.message
|
|
3358
3431
|
}) : e.message }, e.id))
|
|
3359
3432
|
})]
|
|
3360
|
-
}),
|
|
3433
|
+
}), sn = {
|
|
3361
3434
|
wrapper: "_wrapper_i20hz_1",
|
|
3362
3435
|
dropzone: "_dropzone_i20hz_15",
|
|
3363
3436
|
dragActive: "_dragActive_i20hz_45",
|
|
@@ -3370,12 +3443,12 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3370
3443
|
file: "_file_i20hz_133",
|
|
3371
3444
|
fileName: "_fileName_i20hz_175",
|
|
3372
3445
|
fileSize: "_fileSize_i20hz_187"
|
|
3373
|
-
},
|
|
3446
|
+
}, cn = (e) => `${e.name}:${e.size}:${e.lastModified}`, ln = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, un = (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), dn = ({ 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 }) => {
|
|
3374
3447
|
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) => {
|
|
3375
|
-
let t = [], n = new Set(r.map(
|
|
3448
|
+
let t = [], n = new Set(r.map(cn)), l = e.filter((e) => un(e, o) ? s !== void 0 && e.size > s ? (t.push({
|
|
3376
3449
|
file: e,
|
|
3377
3450
|
reason: "maxSize"
|
|
3378
|
-
}), !1) : !n.has(
|
|
3451
|
+
}), !1) : !n.has(cn(e)) && (n.add(cn(e)), !0) : (t.push({
|
|
3379
3452
|
file: e,
|
|
3380
3453
|
reason: "accept"
|
|
3381
3454
|
}), !1)), u = a ? c : 1, d = a ? [...r, ...l] : l.slice(-1);
|
|
@@ -3385,7 +3458,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3385
3458
|
})), d = d.slice(0, u)), t.length && w?.(t), l.length && i?.(d), D.current && (D.current.value = "");
|
|
3386
3459
|
};
|
|
3387
3460
|
return /* @__PURE__ */ n("div", {
|
|
3388
|
-
className: `${
|
|
3461
|
+
className: `${sn.wrapper} ${b}`,
|
|
3389
3462
|
children: [
|
|
3390
3463
|
l && /* @__PURE__ */ t(ee, {
|
|
3391
3464
|
htmlFor: E,
|
|
@@ -3394,7 +3467,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3394
3467
|
children: l
|
|
3395
3468
|
}),
|
|
3396
3469
|
/* @__PURE__ */ n("div", {
|
|
3397
|
-
className: `${
|
|
3470
|
+
className: `${sn.dropzone} ${k ? sn.dragActive : ""} ${m ? sn.disabled : ""} ${d ? sn.error : ""}`,
|
|
3398
3471
|
onDragEnter: (e) => {
|
|
3399
3472
|
e.preventDefault(), I && ++O.current === 1 && A(!0);
|
|
3400
3473
|
},
|
|
@@ -3409,7 +3482,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3409
3482
|
ref: D,
|
|
3410
3483
|
id: E,
|
|
3411
3484
|
name: v,
|
|
3412
|
-
className:
|
|
3485
|
+
className: sn.nativeInput,
|
|
3413
3486
|
type: "file",
|
|
3414
3487
|
multiple: a,
|
|
3415
3488
|
accept: o,
|
|
@@ -3420,53 +3493,53 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3420
3493
|
onChange: (e) => L(Array.from(e.target.files ?? []))
|
|
3421
3494
|
}), r.length ? /* @__PURE__ */ n(e, { children: [
|
|
3422
3495
|
/* @__PURE__ */ t("ul", {
|
|
3423
|
-
className:
|
|
3496
|
+
className: sn.files,
|
|
3424
3497
|
"aria-live": "polite",
|
|
3425
3498
|
children: r.map((e, a) => /* @__PURE__ */ n("li", {
|
|
3426
|
-
className:
|
|
3499
|
+
className: sn.file,
|
|
3427
3500
|
children: [
|
|
3428
3501
|
/* @__PURE__ */ t("span", {
|
|
3429
|
-
className:
|
|
3502
|
+
className: sn.fileName,
|
|
3430
3503
|
title: e.name,
|
|
3431
3504
|
children: e.name
|
|
3432
3505
|
}),
|
|
3433
3506
|
/* @__PURE__ */ t("span", {
|
|
3434
|
-
className:
|
|
3435
|
-
children:
|
|
3507
|
+
className: sn.fileSize,
|
|
3508
|
+
children: ln(e.size)
|
|
3436
3509
|
}),
|
|
3437
3510
|
I && /* @__PURE__ */ t(j, {
|
|
3438
3511
|
variant: "empty",
|
|
3439
3512
|
size: "sm",
|
|
3440
3513
|
"aria-label": `Удалить файл ${e.name}`,
|
|
3441
3514
|
onClick: () => i?.(r.filter((e, t) => t !== a)),
|
|
3442
|
-
children: /* @__PURE__ */ t(
|
|
3515
|
+
children: /* @__PURE__ */ t(J, {
|
|
3443
3516
|
name: "IconCross",
|
|
3444
3517
|
width: 16,
|
|
3445
3518
|
height: 16
|
|
3446
3519
|
})
|
|
3447
3520
|
})
|
|
3448
3521
|
]
|
|
3449
|
-
},
|
|
3522
|
+
}, cn(e)))
|
|
3450
3523
|
}),
|
|
3451
3524
|
I && (a || r.length === 0) && /* @__PURE__ */ t(j, {
|
|
3452
|
-
className:
|
|
3525
|
+
className: sn.browseButton,
|
|
3453
3526
|
size: "sm",
|
|
3454
3527
|
onClick: () => D.current?.click(),
|
|
3455
3528
|
children: C
|
|
3456
3529
|
}),
|
|
3457
3530
|
I && !a && /* @__PURE__ */ t(j, {
|
|
3458
|
-
className:
|
|
3531
|
+
className: sn.browseButton,
|
|
3459
3532
|
size: "sm",
|
|
3460
3533
|
onClick: () => D.current?.click(),
|
|
3461
3534
|
children: S
|
|
3462
3535
|
})
|
|
3463
3536
|
] }) : /* @__PURE__ */ n("div", {
|
|
3464
|
-
className:
|
|
3537
|
+
className: sn.empty,
|
|
3465
3538
|
children: [
|
|
3466
3539
|
/* @__PURE__ */ t("span", {
|
|
3467
|
-
className:
|
|
3540
|
+
className: sn.uploadIcon,
|
|
3468
3541
|
"aria-hidden": "true",
|
|
3469
|
-
children: /* @__PURE__ */ t(
|
|
3542
|
+
children: /* @__PURE__ */ t(J, {
|
|
3470
3543
|
name: "IconUpload",
|
|
3471
3544
|
width: 24,
|
|
3472
3545
|
height: 24
|
|
@@ -3492,7 +3565,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3492
3565
|
})
|
|
3493
3566
|
]
|
|
3494
3567
|
});
|
|
3495
|
-
},
|
|
3568
|
+
}, fn = ({ children: e, containerId: t = "overlay-root" }) => {
|
|
3496
3569
|
let [n, r] = g(null);
|
|
3497
3570
|
return d(() => {
|
|
3498
3571
|
let e = document.getElementById(t);
|
|
@@ -3505,7 +3578,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3505
3578
|
n.childElementCount === 0 && n.parentElement && n.remove();
|
|
3506
3579
|
};
|
|
3507
3580
|
}, [t]), n ? _(e, n) : null;
|
|
3508
|
-
},
|
|
3581
|
+
}, pn = typeof window > "u" ? d : p, mn = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
|
|
3509
3582
|
let [o, s] = g(null), [c, u] = g({
|
|
3510
3583
|
position: "fixed",
|
|
3511
3584
|
visibility: "hidden",
|
|
@@ -3528,7 +3601,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3528
3601
|
o,
|
|
3529
3602
|
i
|
|
3530
3603
|
]);
|
|
3531
|
-
return
|
|
3604
|
+
return pn(() => {
|
|
3532
3605
|
if (!o) return;
|
|
3533
3606
|
d(), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0);
|
|
3534
3607
|
let t = typeof ResizeObserver > "u" ? null : new ResizeObserver(d);
|
|
@@ -3539,13 +3612,13 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3539
3612
|
e,
|
|
3540
3613
|
o,
|
|
3541
3614
|
d
|
|
3542
|
-
]), /* @__PURE__ */ t(
|
|
3615
|
+
]), /* @__PURE__ */ t(fn, { children: /* @__PURE__ */ t("div", {
|
|
3543
3616
|
ref: s,
|
|
3544
3617
|
className: a,
|
|
3545
3618
|
style: c,
|
|
3546
3619
|
children: n
|
|
3547
3620
|
}) });
|
|
3548
|
-
},
|
|
3621
|
+
}, hn = {
|
|
3549
3622
|
wrapper: "_wrapper_x2gki_1",
|
|
3550
3623
|
control: "_control_x2gki_15",
|
|
3551
3624
|
textarea: "_textarea_x2gki_25",
|
|
@@ -3559,12 +3632,12 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3559
3632
|
clearAction: "_clearAction_x2gki_171",
|
|
3560
3633
|
messages: "_messages_x2gki_251",
|
|
3561
3634
|
counter: "_counter_x2gki_265"
|
|
3562
|
-
},
|
|
3563
|
-
function
|
|
3635
|
+
}, gn = 2;
|
|
3636
|
+
function _n(e) {
|
|
3564
3637
|
let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
|
|
3565
3638
|
return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
|
|
3566
3639
|
}
|
|
3567
|
-
function
|
|
3640
|
+
function vn({ 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 = gn, maxRows: w, autoResize: T = !0, ...E }) {
|
|
3568
3641
|
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 = [
|
|
3569
3642
|
A,
|
|
3570
3643
|
j,
|
|
@@ -3572,7 +3645,7 @@ function hn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3572
3645
|
].filter(Boolean).join(" ") || void 0, F = Math.max(1, C), I = w === void 0 ? void 0 : Math.max(F, w), L = l(() => {
|
|
3573
3646
|
let e = k.current;
|
|
3574
3647
|
if (!e || !T) return;
|
|
3575
|
-
let t = window.getComputedStyle(e), n =
|
|
3648
|
+
let t = window.getComputedStyle(e), n = _n(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;
|
|
3576
3649
|
e.style.height = "auto";
|
|
3577
3650
|
let o = Math.min(Math.max(e.scrollHeight, i), a);
|
|
3578
3651
|
e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
|
|
@@ -3604,7 +3677,7 @@ function hn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3604
3677
|
e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), L());
|
|
3605
3678
|
}, B = { "--ds-textarea-min-rows": F };
|
|
3606
3679
|
return /* @__PURE__ */ n("div", {
|
|
3607
|
-
className: `${
|
|
3680
|
+
className: `${hn.wrapper} ${m}`,
|
|
3608
3681
|
children: [
|
|
3609
3682
|
c && /* @__PURE__ */ t(ee, {
|
|
3610
3683
|
htmlFor: O,
|
|
@@ -3614,12 +3687,12 @@ function hn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3614
3687
|
}),
|
|
3615
3688
|
a && s ? /* @__PURE__ */ t("div", {
|
|
3616
3689
|
id: O,
|
|
3617
|
-
className: `${
|
|
3690
|
+
className: `${hn.disabledText} ${hn[v]}`,
|
|
3618
3691
|
style: B,
|
|
3619
3692
|
"aria-describedby": P,
|
|
3620
3693
|
children: e || i
|
|
3621
3694
|
}) : /* @__PURE__ */ n("div", {
|
|
3622
|
-
className:
|
|
3695
|
+
className: hn.control,
|
|
3623
3696
|
children: [/* @__PURE__ */ t("textarea", {
|
|
3624
3697
|
ref: k,
|
|
3625
3698
|
id: O,
|
|
@@ -3634,15 +3707,15 @@ function hn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3634
3707
|
style: B,
|
|
3635
3708
|
"aria-invalid": !!u,
|
|
3636
3709
|
"aria-describedby": P,
|
|
3637
|
-
className: `${
|
|
3710
|
+
className: `${hn.textarea} ${hn[v]} ${T ? hn.autoResize : hn.manualResize} ${u ? hn.textareaError : ""}`,
|
|
3638
3711
|
onChange: R,
|
|
3639
3712
|
...E
|
|
3640
3713
|
}), y && e && !a && !o && /* @__PURE__ */ t("button", {
|
|
3641
3714
|
type: "button",
|
|
3642
|
-
className:
|
|
3715
|
+
className: hn.clearAction,
|
|
3643
3716
|
"aria-label": "Очистить поле",
|
|
3644
3717
|
onClick: z,
|
|
3645
|
-
children: /* @__PURE__ */ t(
|
|
3718
|
+
children: /* @__PURE__ */ t(J, {
|
|
3646
3719
|
name: "IconCross",
|
|
3647
3720
|
width: 20,
|
|
3648
3721
|
height: 20
|
|
@@ -3650,7 +3723,7 @@ function hn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3650
3723
|
})]
|
|
3651
3724
|
}),
|
|
3652
3725
|
(p || u || M) && /* @__PURE__ */ n("div", {
|
|
3653
|
-
className:
|
|
3726
|
+
className: hn.messages,
|
|
3654
3727
|
children: [
|
|
3655
3728
|
p && !u && /* @__PURE__ */ t(N, {
|
|
3656
3729
|
id: A,
|
|
@@ -3663,7 +3736,7 @@ function hn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3663
3736
|
}),
|
|
3664
3737
|
M && /* @__PURE__ */ n("span", {
|
|
3665
3738
|
id: M,
|
|
3666
|
-
className:
|
|
3739
|
+
className: hn.counter,
|
|
3667
3740
|
children: [
|
|
3668
3741
|
e.length,
|
|
3669
3742
|
" / ",
|
|
@@ -3677,11 +3750,11 @@ function hn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3677
3750
|
}
|
|
3678
3751
|
//#endregion
|
|
3679
3752
|
//#region src/components/DSModal/modal.store.ts
|
|
3680
|
-
var
|
|
3753
|
+
var yn = 0, bn = S((e, t) => ({
|
|
3681
3754
|
modals: [],
|
|
3682
3755
|
openModal: (t, n = {}, r = {}) => {
|
|
3683
|
-
|
|
3684
|
-
let i = `ds-modal-${
|
|
3756
|
+
yn += 1;
|
|
3757
|
+
let i = `ds-modal-${yn}`;
|
|
3685
3758
|
return e((e) => ({ modals: [...e.modals, {
|
|
3686
3759
|
id: i,
|
|
3687
3760
|
name: t,
|
|
@@ -3705,10 +3778,10 @@ var gn = 0, _n = S((e, t) => ({
|
|
|
3705
3778
|
let n = t().modals;
|
|
3706
3779
|
n.length && (e({ modals: [] }), n.forEach((e) => e.onClose?.()));
|
|
3707
3780
|
}
|
|
3708
|
-
})),
|
|
3709
|
-
|
|
3710
|
-
},
|
|
3711
|
-
function
|
|
3781
|
+
})), xn = () => {
|
|
3782
|
+
bn.getState().closeAllModals(), yn = 0;
|
|
3783
|
+
}, Sn = 8, Cn = 96, wn = .55;
|
|
3784
|
+
function Tn(e, t, n) {
|
|
3712
3785
|
return {
|
|
3713
3786
|
startX: e,
|
|
3714
3787
|
startY: t,
|
|
@@ -3716,16 +3789,16 @@ function Sn(e, t, n) {
|
|
|
3716
3789
|
intent: "pending"
|
|
3717
3790
|
};
|
|
3718
3791
|
}
|
|
3719
|
-
function
|
|
3792
|
+
function En(e, t, n) {
|
|
3720
3793
|
let r = t - e.startX, i = n - e.startY;
|
|
3721
|
-
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >=
|
|
3794
|
+
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >= Sn && (e.intent = Math.abs(i) > Math.abs(r) ? "vertical" : "horizontal"), e.intent === "vertical" ? Math.max(0, i) : 0;
|
|
3722
3795
|
}
|
|
3723
|
-
function
|
|
3796
|
+
function Dn(e, t, n) {
|
|
3724
3797
|
if (e.intent !== "vertical") return !1;
|
|
3725
3798
|
let r = Math.max(0, t - e.startY), i = Math.max(1, n - e.startTime);
|
|
3726
|
-
return r >=
|
|
3799
|
+
return r >= Cn || r >= 32 && r / i >= wn;
|
|
3727
3800
|
}
|
|
3728
|
-
var
|
|
3801
|
+
var On = {
|
|
3729
3802
|
layer: "_layer_w9isk_1",
|
|
3730
3803
|
backdrop: "_backdrop_w9isk_15",
|
|
3731
3804
|
"backdrop-enter": "_backdrop-enter_w9isk_1",
|
|
@@ -3738,10 +3811,10 @@ var Tn = {
|
|
|
3738
3811
|
close: "_close_w9isk_141",
|
|
3739
3812
|
dragHandle: "_dragHandle_w9isk_149",
|
|
3740
3813
|
"sheet-enter": "_sheet-enter_w9isk_1"
|
|
3741
|
-
},
|
|
3742
|
-
function
|
|
3814
|
+
}, kn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", An = a({});
|
|
3815
|
+
function jn(e) {
|
|
3743
3816
|
if (e.key !== "Tab") return;
|
|
3744
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
3817
|
+
let t = Array.from(e.currentTarget.querySelectorAll(kn));
|
|
3745
3818
|
if (!t.length) {
|
|
3746
3819
|
e.preventDefault();
|
|
3747
3820
|
return;
|
|
@@ -3749,18 +3822,18 @@ function On(e) {
|
|
|
3749
3822
|
let n = t[0], r = t.at(-1);
|
|
3750
3823
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
|
|
3751
3824
|
}
|
|
3752
|
-
var
|
|
3753
|
-
let l = u(
|
|
3825
|
+
var Mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
|
|
3826
|
+
let l = u(An), 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 = bn((e) => e.closeModal), D = l.requestClose ?? (() => E(a)), O = p != null, k = m != null;
|
|
3754
3827
|
d(() => {
|
|
3755
3828
|
let e = document.activeElement, t = y.current;
|
|
3756
|
-
return (t?.querySelector(
|
|
3829
|
+
return (t?.querySelector(kn) ?? t)?.focus(), () => e?.focus();
|
|
3757
3830
|
}, []);
|
|
3758
3831
|
let A = (e) => {
|
|
3759
3832
|
e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, T(!1), C(0);
|
|
3760
3833
|
};
|
|
3761
3834
|
return /* @__PURE__ */ n("div", {
|
|
3762
3835
|
ref: y,
|
|
3763
|
-
className: `${
|
|
3836
|
+
className: `${On.panel} ${s}`,
|
|
3764
3837
|
"data-closing": l.closing || void 0,
|
|
3765
3838
|
"data-dragging": w || void 0,
|
|
3766
3839
|
style: { "--ds-modal-drag-offset": `${S}px` },
|
|
@@ -3769,41 +3842,41 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3769
3842
|
"aria-labelledby": O ? _ : void 0,
|
|
3770
3843
|
"aria-describedby": k ? v : void 0,
|
|
3771
3844
|
tabIndex: -1,
|
|
3772
|
-
onKeyDown:
|
|
3845
|
+
onKeyDown: jn,
|
|
3773
3846
|
children: [
|
|
3774
3847
|
/* @__PURE__ */ t("button", {
|
|
3775
3848
|
type: "button",
|
|
3776
|
-
className:
|
|
3849
|
+
className: On.dragHandle,
|
|
3777
3850
|
"aria-label": "Потяните вниз, чтобы закрыть модальное окно",
|
|
3778
3851
|
onPointerDown: (e) => {
|
|
3779
|
-
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current =
|
|
3852
|
+
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current = Tn(e.clientX, e.clientY, e.timeStamp), e.currentTarget.setPointerCapture(e.pointerId));
|
|
3780
3853
|
},
|
|
3781
3854
|
onPointerMove: (e) => {
|
|
3782
3855
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3783
|
-
let t =
|
|
3856
|
+
let t = En(b.current, e.clientX, e.clientY);
|
|
3784
3857
|
b.current.intent === "vertical" && (e.preventDefault(), T(!0), C(t));
|
|
3785
3858
|
},
|
|
3786
3859
|
onPointerUp: (e) => {
|
|
3787
3860
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3788
|
-
let t =
|
|
3861
|
+
let t = Dn(b.current, e.clientY, e.timeStamp);
|
|
3789
3862
|
A(e.currentTarget), t && D();
|
|
3790
3863
|
},
|
|
3791
3864
|
onPointerCancel: (e) => A(e.currentTarget),
|
|
3792
3865
|
children: /* @__PURE__ */ t("span", {})
|
|
3793
3866
|
}),
|
|
3794
3867
|
(O || o) && /* @__PURE__ */ n("header", {
|
|
3795
|
-
className:
|
|
3868
|
+
className: On.header,
|
|
3796
3869
|
children: [O && /* @__PURE__ */ t("h2", {
|
|
3797
3870
|
id: _,
|
|
3798
|
-
className:
|
|
3871
|
+
className: On.title,
|
|
3799
3872
|
children: p
|
|
3800
3873
|
}), /* @__PURE__ */ t(j, {
|
|
3801
|
-
className:
|
|
3874
|
+
className: On.close,
|
|
3802
3875
|
variant: "empty",
|
|
3803
3876
|
size: "sm",
|
|
3804
3877
|
"aria-label": o,
|
|
3805
3878
|
onClick: D,
|
|
3806
|
-
children: /* @__PURE__ */ t(
|
|
3879
|
+
children: /* @__PURE__ */ t(J, {
|
|
3807
3880
|
name: "IconCross",
|
|
3808
3881
|
width: 24,
|
|
3809
3882
|
height: 24
|
|
@@ -3812,17 +3885,17 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3812
3885
|
}),
|
|
3813
3886
|
k && /* @__PURE__ */ t("p", {
|
|
3814
3887
|
id: v,
|
|
3815
|
-
className:
|
|
3888
|
+
className: On.description,
|
|
3816
3889
|
children: m
|
|
3817
3890
|
}),
|
|
3818
3891
|
/* @__PURE__ */ t("div", {
|
|
3819
|
-
className:
|
|
3892
|
+
className: On.content,
|
|
3820
3893
|
children: e
|
|
3821
3894
|
})
|
|
3822
3895
|
]
|
|
3823
3896
|
});
|
|
3824
|
-
},
|
|
3825
|
-
let n =
|
|
3897
|
+
}, Nn = ({ registry: e }) => {
|
|
3898
|
+
let n = bn((e) => e.modals), r = bn((e) => e.closeModal), [i, a] = g(() => /* @__PURE__ */ new Set()), o = h(/* @__PURE__ */ new Map()), s = (e) => {
|
|
3826
3899
|
if (o.current.has(e)) return;
|
|
3827
3900
|
a((t) => new Set(t).add(e));
|
|
3828
3901
|
let t = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -3838,7 +3911,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3838
3911
|
return () => e.forEach((e) => window.clearTimeout(e));
|
|
3839
3912
|
}, []), d(() => {
|
|
3840
3913
|
let e = (e) => {
|
|
3841
|
-
let t =
|
|
3914
|
+
let t = bn.getState().modals.at(-1);
|
|
3842
3915
|
e.key === "Escape" && t?.closeOnEscape && s(t.id);
|
|
3843
3916
|
};
|
|
3844
3917
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
@@ -3851,21 +3924,21 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3851
3924
|
n,
|
|
3852
3925
|
e
|
|
3853
3926
|
]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
3854
|
-
className:
|
|
3927
|
+
className: On.layer,
|
|
3855
3928
|
"aria-label": "Модальные окна",
|
|
3856
3929
|
children: n.map((r, a) => {
|
|
3857
3930
|
let o = e[r.name];
|
|
3858
3931
|
if (!o) return null;
|
|
3859
3932
|
let c = i.has(r.id);
|
|
3860
3933
|
return /* @__PURE__ */ t("div", {
|
|
3861
|
-
className:
|
|
3934
|
+
className: On.backdrop,
|
|
3862
3935
|
"data-closing": c || void 0,
|
|
3863
3936
|
"aria-hidden": a !== n.length - 1 || void 0,
|
|
3864
3937
|
inert: a !== n.length - 1 || void 0,
|
|
3865
3938
|
onMouseDown: (e) => {
|
|
3866
3939
|
e.target === e.currentTarget && r.closeOnBackdrop && s(r.id);
|
|
3867
3940
|
},
|
|
3868
|
-
children: /* @__PURE__ */ t(
|
|
3941
|
+
children: /* @__PURE__ */ t(An.Provider, {
|
|
3869
3942
|
value: {
|
|
3870
3943
|
title: r.title ?? r.payload.title,
|
|
3871
3944
|
description: r.description ?? r.payload.description,
|
|
@@ -3882,31 +3955,31 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3882
3955
|
}, r.id);
|
|
3883
3956
|
})
|
|
3884
3957
|
}), document.body);
|
|
3885
|
-
},
|
|
3886
|
-
let o =
|
|
3958
|
+
}, Pn = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
|
|
3959
|
+
let o = bn((e) => e.modals.length);
|
|
3887
3960
|
return d(() => {
|
|
3888
3961
|
if (!a || o === 0) return;
|
|
3889
3962
|
let e = document.body.style.overflow;
|
|
3890
3963
|
return document.body.style.overflow = "hidden", () => {
|
|
3891
3964
|
document.body.style.overflow = e;
|
|
3892
3965
|
};
|
|
3893
|
-
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(
|
|
3894
|
-
},
|
|
3966
|
+
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Nn, { registry: r })] });
|
|
3967
|
+
}, Fn = (e) => e, In = {
|
|
3895
3968
|
message: "_message_c23ie_1",
|
|
3896
3969
|
actions: "_actions_c23ie_13"
|
|
3897
|
-
},
|
|
3970
|
+
}, Ln = /* @__PURE__ */ new Map(), Rn = 0, zn = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
|
|
3898
3971
|
let u = (e) => {
|
|
3899
|
-
|
|
3972
|
+
Ln.get(l)?.(e), Ln.delete(l), r();
|
|
3900
3973
|
};
|
|
3901
|
-
return /* @__PURE__ */ n(
|
|
3974
|
+
return /* @__PURE__ */ n(Mn, {
|
|
3902
3975
|
modalId: e,
|
|
3903
3976
|
title: i,
|
|
3904
3977
|
role: "alertdialog",
|
|
3905
3978
|
children: [/* @__PURE__ */ t("p", {
|
|
3906
|
-
className:
|
|
3979
|
+
className: In.message,
|
|
3907
3980
|
children: a
|
|
3908
3981
|
}), /* @__PURE__ */ n("div", {
|
|
3909
|
-
className:
|
|
3982
|
+
className: In.actions,
|
|
3910
3983
|
children: [/* @__PURE__ */ t(j, {
|
|
3911
3984
|
variant: "outline",
|
|
3912
3985
|
onClick: () => u(!1),
|
|
@@ -3918,46 +3991,46 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3918
3991
|
})]
|
|
3919
3992
|
})]
|
|
3920
3993
|
});
|
|
3921
|
-
},
|
|
3994
|
+
}, Bn = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Mn, {
|
|
3922
3995
|
modalId: e,
|
|
3923
3996
|
title: i,
|
|
3924
3997
|
role: "alertdialog",
|
|
3925
3998
|
children: [/* @__PURE__ */ t("p", {
|
|
3926
|
-
className:
|
|
3999
|
+
className: In.message,
|
|
3927
4000
|
children: a
|
|
3928
4001
|
}), /* @__PURE__ */ t("div", {
|
|
3929
|
-
className:
|
|
4002
|
+
className: In.actions,
|
|
3930
4003
|
children: /* @__PURE__ */ t(j, {
|
|
3931
4004
|
onClick: r,
|
|
3932
4005
|
children: o
|
|
3933
4006
|
})
|
|
3934
4007
|
})]
|
|
3935
|
-
}),
|
|
3936
|
-
ConfirmModal:
|
|
3937
|
-
ErrorModal:
|
|
3938
|
-
}),
|
|
3939
|
-
let e =
|
|
4008
|
+
}), Vn = Fn({
|
|
4009
|
+
ConfirmModal: zn,
|
|
4010
|
+
ErrorModal: Bn
|
|
4011
|
+
}), Hn = () => {
|
|
4012
|
+
let e = bn((e) => e.openModal);
|
|
3940
4013
|
return (t = {}) => new Promise((n) => {
|
|
3941
|
-
|
|
3942
|
-
let r = `confirm-${
|
|
3943
|
-
|
|
4014
|
+
Rn += 1;
|
|
4015
|
+
let r = `confirm-${Rn}`;
|
|
4016
|
+
Ln.set(r, n), e("ConfirmModal", {
|
|
3944
4017
|
...t,
|
|
3945
4018
|
requestId: r
|
|
3946
4019
|
}, {
|
|
3947
4020
|
closeOnEscape: !1,
|
|
3948
4021
|
onClose: () => {
|
|
3949
|
-
|
|
4022
|
+
Ln.get(r)?.(!1), Ln.delete(r);
|
|
3950
4023
|
}
|
|
3951
4024
|
});
|
|
3952
4025
|
});
|
|
3953
|
-
},
|
|
3954
|
-
let e =
|
|
4026
|
+
}, Un = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Wn = () => {
|
|
4027
|
+
let e = bn((e) => e.openModal);
|
|
3955
4028
|
return { showError: (t, n) => e("ErrorModal", {
|
|
3956
4029
|
title: n,
|
|
3957
|
-
message:
|
|
4030
|
+
message: Un(t)
|
|
3958
4031
|
}) };
|
|
3959
|
-
},
|
|
3960
|
-
let e =
|
|
4032
|
+
}, Gn = S(() => ({})), Kn = S(() => ({})), qn = () => {
|
|
4033
|
+
let e = bn((e) => e.modals), t = bn((e) => e.openModal), n = bn((e) => e.closeModal), r = bn((e) => e.closeTopModal), i = bn((e) => e.closeAllModals), a = l((e, n = {}, r) => t(e, n, r), [t]), o = l((t) => e.some((e) => e.name === t), [e]);
|
|
3961
4034
|
return m(() => ({
|
|
3962
4035
|
openModal: a,
|
|
3963
4036
|
closeModal: n,
|
|
@@ -3973,7 +4046,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3973
4046
|
e.length,
|
|
3974
4047
|
a
|
|
3975
4048
|
]);
|
|
3976
|
-
},
|
|
4049
|
+
}, Jn = {
|
|
3977
4050
|
layer: "_layer_ct7yp_1",
|
|
3978
4051
|
backdrop: "_backdrop_ct7yp_13",
|
|
3979
4052
|
panel: "_panel_ct7yp_27",
|
|
@@ -3993,16 +4066,16 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3993
4066
|
"enter-right": "_enter-right_ct7yp_1",
|
|
3994
4067
|
"enter-left": "_enter-left_ct7yp_1",
|
|
3995
4068
|
"enter-bottom": "_enter-bottom_ct7yp_1"
|
|
3996
|
-
},
|
|
4069
|
+
}, Yn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Xn = a(null), Zn = (e) => {
|
|
3997
4070
|
if (e.key !== "Tab") return;
|
|
3998
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
4071
|
+
let t = Array.from(e.currentTarget.querySelectorAll(Yn));
|
|
3999
4072
|
if (!t.length) {
|
|
4000
4073
|
e.preventDefault();
|
|
4001
4074
|
return;
|
|
4002
4075
|
}
|
|
4003
4076
|
let n = t[0], r = t.at(-1);
|
|
4004
4077
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
4005
|
-
},
|
|
4078
|
+
}, Qn = () => u(Xn), $n = ({ 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 = "" }) => {
|
|
4006
4079
|
let S = h(null), C = f(), w = f(), T = (e) => {
|
|
4007
4080
|
g || r(e);
|
|
4008
4081
|
};
|
|
@@ -4011,7 +4084,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4011
4084
|
let t = document.activeElement, n = b?.current, i = document.body.style.overflow;
|
|
4012
4085
|
document.body.style.overflow = "hidden";
|
|
4013
4086
|
let a = S.current;
|
|
4014
|
-
(y?.current ?? a?.querySelector(
|
|
4087
|
+
(y?.current ?? a?.querySelector(Yn) ?? a)?.focus();
|
|
4015
4088
|
let o = (e) => {
|
|
4016
4089
|
e.key === "Escape" && p && !g && r("escape");
|
|
4017
4090
|
};
|
|
@@ -4026,29 +4099,29 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4026
4099
|
g,
|
|
4027
4100
|
b
|
|
4028
4101
|
]), !e || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
4029
|
-
className:
|
|
4102
|
+
className: Jn.layer,
|
|
4030
4103
|
children: /* @__PURE__ */ t("div", {
|
|
4031
|
-
className:
|
|
4104
|
+
className: Jn.backdrop,
|
|
4032
4105
|
onMouseDown: (e) => {
|
|
4033
4106
|
e.target === e.currentTarget && m && T("backdrop");
|
|
4034
4107
|
},
|
|
4035
|
-
children: /* @__PURE__ */ t(
|
|
4108
|
+
children: /* @__PURE__ */ t(Xn.Provider, {
|
|
4036
4109
|
value: { requestClose: T },
|
|
4037
4110
|
children: /* @__PURE__ */ n("section", {
|
|
4038
4111
|
ref: S,
|
|
4039
|
-
className: `${
|
|
4112
|
+
className: `${Jn.panel} ${Jn[l]} ${Jn[u]} ${x}`,
|
|
4040
4113
|
role: "dialog",
|
|
4041
4114
|
"aria-modal": "true",
|
|
4042
4115
|
"aria-labelledby": a ? C : void 0,
|
|
4043
4116
|
"aria-describedby": o ? w : void 0,
|
|
4044
4117
|
tabIndex: -1,
|
|
4045
|
-
onKeyDown:
|
|
4118
|
+
onKeyDown: Zn,
|
|
4046
4119
|
children: [
|
|
4047
4120
|
/* @__PURE__ */ n("header", {
|
|
4048
|
-
className:
|
|
4121
|
+
className: Jn.header,
|
|
4049
4122
|
children: [
|
|
4050
4123
|
/* @__PURE__ */ n("div", {
|
|
4051
|
-
className:
|
|
4124
|
+
className: Jn.heading,
|
|
4052
4125
|
children: [a && /* @__PURE__ */ t("h2", {
|
|
4053
4126
|
id: C,
|
|
4054
4127
|
children: a
|
|
@@ -4058,7 +4131,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4058
4131
|
})]
|
|
4059
4132
|
}),
|
|
4060
4133
|
s && /* @__PURE__ */ t("div", {
|
|
4061
|
-
className:
|
|
4134
|
+
className: Jn.headerActions,
|
|
4062
4135
|
children: s
|
|
4063
4136
|
}),
|
|
4064
4137
|
/* @__PURE__ */ t(j, {
|
|
@@ -4067,7 +4140,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4067
4140
|
"aria-label": v,
|
|
4068
4141
|
disabled: g,
|
|
4069
4142
|
onClick: () => T("close-button"),
|
|
4070
|
-
children: /* @__PURE__ */ t(
|
|
4143
|
+
children: /* @__PURE__ */ t(J, {
|
|
4071
4144
|
name: "IconCross",
|
|
4072
4145
|
width: 20,
|
|
4073
4146
|
height: 20
|
|
@@ -4076,11 +4149,11 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4076
4149
|
]
|
|
4077
4150
|
}),
|
|
4078
4151
|
/* @__PURE__ */ t("div", {
|
|
4079
|
-
className:
|
|
4152
|
+
className: Jn.content,
|
|
4080
4153
|
children: i
|
|
4081
4154
|
}),
|
|
4082
4155
|
c && /* @__PURE__ */ t("footer", {
|
|
4083
|
-
className:
|
|
4156
|
+
className: Jn.footer,
|
|
4084
4157
|
children: c
|
|
4085
4158
|
})
|
|
4086
4159
|
]
|
|
@@ -4088,17 +4161,17 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4088
4161
|
})
|
|
4089
4162
|
})
|
|
4090
4163
|
}), document.body);
|
|
4091
|
-
},
|
|
4164
|
+
}, er = ({ placement: e = "right", ...n }) => /* @__PURE__ */ t($n, {
|
|
4092
4165
|
...n,
|
|
4093
4166
|
placement: e
|
|
4094
|
-
}),
|
|
4167
|
+
}), tr = (e) => /* @__PURE__ */ t($n, {
|
|
4095
4168
|
...e,
|
|
4096
4169
|
placement: "bottom"
|
|
4097
|
-
}),
|
|
4170
|
+
}), nr = (e) => /* @__PURE__ */ t($n, {
|
|
4098
4171
|
...e,
|
|
4099
4172
|
placement: "fullscreen",
|
|
4100
4173
|
size: "xl"
|
|
4101
|
-
}),
|
|
4174
|
+
}), rr = {
|
|
4102
4175
|
wrapper: "_wrapper_1hyyy_1",
|
|
4103
4176
|
container: "_container_1hyyy_15",
|
|
4104
4177
|
inner: "_inner_1hyyy_35",
|
|
@@ -4113,29 +4186,29 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4113
4186
|
empty: "_empty_1hyyy_153",
|
|
4114
4187
|
destructive: "_destructive_1hyyy_161",
|
|
4115
4188
|
destructiveOutline: "_destructiveOutline_1hyyy_169"
|
|
4116
|
-
},
|
|
4117
|
-
className:
|
|
4189
|
+
}, ir = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
|
|
4190
|
+
className: rr.wrapper,
|
|
4118
4191
|
children: /* @__PURE__ */ t("div", {
|
|
4119
|
-
className:
|
|
4192
|
+
className: rr.container,
|
|
4120
4193
|
children: /* @__PURE__ */ n("div", {
|
|
4121
|
-
className:
|
|
4194
|
+
className: rr.inner,
|
|
4122
4195
|
children: [
|
|
4123
4196
|
/* @__PURE__ */ t("div", {
|
|
4124
|
-
className:
|
|
4125
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4197
|
+
className: rr.cube,
|
|
4198
|
+
children: /* @__PURE__ */ t("div", { className: `${rr.cube__inner} ${rr[e]}` })
|
|
4126
4199
|
}),
|
|
4127
4200
|
/* @__PURE__ */ t("div", {
|
|
4128
|
-
className:
|
|
4129
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4201
|
+
className: rr.cube,
|
|
4202
|
+
children: /* @__PURE__ */ t("div", { className: `${rr.cube__inner} ${rr[e]}` })
|
|
4130
4203
|
}),
|
|
4131
4204
|
/* @__PURE__ */ t("div", {
|
|
4132
|
-
className:
|
|
4133
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4205
|
+
className: rr.cube,
|
|
4206
|
+
children: /* @__PURE__ */ t("div", { className: `${rr.cube__inner} ${rr[e]}` })
|
|
4134
4207
|
})
|
|
4135
4208
|
]
|
|
4136
4209
|
})
|
|
4137
4210
|
})
|
|
4138
|
-
}),
|
|
4211
|
+
}), ar = {
|
|
4139
4212
|
viewport: "_viewport_bu4eh_1",
|
|
4140
4213
|
"top-right": "_top-right_bu4eh_21",
|
|
4141
4214
|
"top-left": "_top-left_bu4eh_31",
|
|
@@ -4151,12 +4224,12 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4151
4224
|
success: "_success_bu4eh_195",
|
|
4152
4225
|
warning: "_warning_bu4eh_203",
|
|
4153
4226
|
error: "_error_bu4eh_211"
|
|
4154
|
-
},
|
|
4227
|
+
}, or = {
|
|
4155
4228
|
info: "IconInfoCircle",
|
|
4156
4229
|
success: "IconSuccessCircle",
|
|
4157
4230
|
warning: "IconWarning",
|
|
4158
4231
|
error: "IconWarning"
|
|
4159
|
-
},
|
|
4232
|
+
}, sr = ({ toast: e, onClose: r }) => {
|
|
4160
4233
|
let [i, a] = g(!1), [o, s] = g(() => typeof document < "u" && document.hidden), c = h(e.duration), l = h(Date.now());
|
|
4161
4234
|
return d(() => {
|
|
4162
4235
|
if (i || o || e.duration <= 0) return;
|
|
@@ -4176,7 +4249,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4176
4249
|
let e = () => s(document.hidden);
|
|
4177
4250
|
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
4178
4251
|
}, []), /* @__PURE__ */ n("article", {
|
|
4179
|
-
className: `${
|
|
4252
|
+
className: `${ar.toast} ${ar[e.variant]}`,
|
|
4180
4253
|
role: e.variant === "error" ? "alert" : "status",
|
|
4181
4254
|
"aria-live": e.variant === "error" ? "assertive" : "polite",
|
|
4182
4255
|
onMouseEnter: () => a(!0),
|
|
@@ -4185,24 +4258,24 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4185
4258
|
onBlur: () => a(!1),
|
|
4186
4259
|
children: [
|
|
4187
4260
|
/* @__PURE__ */ t("div", {
|
|
4188
|
-
className:
|
|
4261
|
+
className: ar.icon,
|
|
4189
4262
|
"aria-hidden": "true",
|
|
4190
|
-
children: /* @__PURE__ */ t(
|
|
4191
|
-
name:
|
|
4263
|
+
children: /* @__PURE__ */ t(J, {
|
|
4264
|
+
name: or[e.variant],
|
|
4192
4265
|
color: "var(--ds-toast-accent)",
|
|
4193
4266
|
width: 20,
|
|
4194
4267
|
height: 20
|
|
4195
4268
|
})
|
|
4196
4269
|
}),
|
|
4197
4270
|
/* @__PURE__ */ n("div", {
|
|
4198
|
-
className:
|
|
4271
|
+
className: ar.body,
|
|
4199
4272
|
children: [
|
|
4200
4273
|
e.title && /* @__PURE__ */ t("strong", {
|
|
4201
|
-
className:
|
|
4274
|
+
className: ar.title,
|
|
4202
4275
|
children: e.title
|
|
4203
4276
|
}),
|
|
4204
4277
|
/* @__PURE__ */ t("div", {
|
|
4205
|
-
className:
|
|
4278
|
+
className: ar.message,
|
|
4206
4279
|
children: e.message
|
|
4207
4280
|
}),
|
|
4208
4281
|
e.action && /* @__PURE__ */ t(j, {
|
|
@@ -4220,7 +4293,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4220
4293
|
size: "sm",
|
|
4221
4294
|
"aria-label": "Закрыть уведомление",
|
|
4222
4295
|
onClick: () => r(e.id),
|
|
4223
|
-
children: /* @__PURE__ */ t(
|
|
4296
|
+
children: /* @__PURE__ */ t(J, {
|
|
4224
4297
|
name: "IconCross",
|
|
4225
4298
|
width: 20,
|
|
4226
4299
|
height: 20
|
|
@@ -4228,15 +4301,15 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4228
4301
|
})
|
|
4229
4302
|
]
|
|
4230
4303
|
});
|
|
4231
|
-
},
|
|
4304
|
+
}, cr = 0, lr = S((e, t) => ({
|
|
4232
4305
|
toasts: [],
|
|
4233
4306
|
showToast: (n) => {
|
|
4234
4307
|
if (n.dedupeKey) {
|
|
4235
4308
|
let e = t().toasts.find((e) => e.dedupeKey === n.dedupeKey);
|
|
4236
4309
|
if (e) return e.id;
|
|
4237
4310
|
}
|
|
4238
|
-
|
|
4239
|
-
let r = `ds-toast-${
|
|
4311
|
+
cr += 1;
|
|
4312
|
+
let r = `ds-toast-${cr}`;
|
|
4240
4313
|
return e((e) => ({ toasts: [...e.toasts, {
|
|
4241
4314
|
variant: "info",
|
|
4242
4315
|
duration: 5e3,
|
|
@@ -4247,18 +4320,18 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4247
4320
|
},
|
|
4248
4321
|
removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
|
|
4249
4322
|
clearToasts: () => e({ toasts: [] })
|
|
4250
|
-
})),
|
|
4251
|
-
let r =
|
|
4323
|
+
})), ur = () => lr.setState({ toasts: [] }), dr = ({ position: e = "top-right", maxVisible: n }) => {
|
|
4324
|
+
let r = lr((e) => e.toasts), i = lr((e) => e.removeToast), a = n === void 0 ? r : r.slice(0, Math.max(0, Math.floor(n)));
|
|
4252
4325
|
return /* @__PURE__ */ t("div", {
|
|
4253
|
-
className: `${
|
|
4326
|
+
className: `${ar.viewport} ${ar[e]}`,
|
|
4254
4327
|
"aria-label": "Уведомления",
|
|
4255
|
-
children: a.map((e) => /* @__PURE__ */ t(
|
|
4328
|
+
children: a.map((e) => /* @__PURE__ */ t(sr, {
|
|
4256
4329
|
toast: e,
|
|
4257
4330
|
onClose: i
|
|
4258
4331
|
}, e.id))
|
|
4259
4332
|
});
|
|
4260
|
-
},
|
|
4261
|
-
let e =
|
|
4333
|
+
}, fr = () => {
|
|
4334
|
+
let e = lr((e) => e.showToast), t = lr((e) => e.removeToast), n = lr((e) => e.clearToasts), r = l((t) => e({
|
|
4262
4335
|
...t,
|
|
4263
4336
|
variant: "info"
|
|
4264
4337
|
}), [e]), i = l((t) => e({
|
|
@@ -4288,24 +4361,24 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4288
4361
|
i,
|
|
4289
4362
|
a
|
|
4290
4363
|
]);
|
|
4291
|
-
},
|
|
4364
|
+
}, pr = {
|
|
4292
4365
|
root: "_root_ncmxp_1",
|
|
4293
4366
|
tooltip: "_tooltip_ncmxp_11",
|
|
4294
4367
|
"ds-tooltip-in": "_ds-tooltip-in_ncmxp_1"
|
|
4295
|
-
},
|
|
4368
|
+
}, mr = 8, hr = 16, gr = {
|
|
4296
4369
|
top: "bottom",
|
|
4297
4370
|
right: "left",
|
|
4298
4371
|
bottom: "top",
|
|
4299
4372
|
left: "right"
|
|
4300
|
-
},
|
|
4373
|
+
}, _r = (e, t, n) => e === "top" ? t.top >= n.height + mr + hr : e === "bottom" ? window.innerHeight - t.bottom >= n.height + mr + hr : e === "left" ? t.left >= n.width + mr + hr : window.innerWidth - t.right >= n.width + mr + hr, vr = (e, t, n) => {
|
|
4301
4374
|
if (!(t.bottom > 0 && t.right > 0 && t.top < window.innerHeight && t.left < window.innerWidth)) return null;
|
|
4302
|
-
let r =
|
|
4303
|
-
return r === "top" && (a = t.top - n.height -
|
|
4375
|
+
let r = _r(e, t, n) ? e : _r(gr[e], t, n) ? gr[e] : e, i = t.left + (t.width - n.width) / 2, a = t.top + (t.height - n.height) / 2;
|
|
4376
|
+
return r === "top" && (a = t.top - n.height - mr), r === "bottom" && (a = t.bottom + mr), r === "left" && (i = t.left - n.width - mr), r === "right" && (i = t.right + mr), i = Math.min(Math.max(i, hr), Math.max(hr, window.innerWidth - n.width - hr)), a = Math.min(Math.max(a, hr), Math.max(hr, window.innerHeight - n.height - hr)), {
|
|
4304
4377
|
left: i,
|
|
4305
4378
|
top: a,
|
|
4306
4379
|
visibility: "visible"
|
|
4307
4380
|
};
|
|
4308
|
-
},
|
|
4381
|
+
}, yr = ({ content: e, children: r, placement: a = "top", delay: o = 450, disabled: s = !1, maxWidth: u = 280, className: p = "" }) => {
|
|
4309
4382
|
let m = f(), [_, v] = g(!1), [y, b] = g({ visibility: "hidden" }), [x, S] = g(null), C = h(null), w = h(null), T = l(() => {
|
|
4310
4383
|
C.current && clearTimeout(C.current), C.current = null, v(!1);
|
|
4311
4384
|
}, []), E = l(() => {
|
|
@@ -4323,7 +4396,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4323
4396
|
let e = () => {
|
|
4324
4397
|
let e = w.current;
|
|
4325
4398
|
if (!e || !x) return;
|
|
4326
|
-
let t =
|
|
4399
|
+
let t = vr(a, e.getBoundingClientRect(), x.getBoundingClientRect());
|
|
4327
4400
|
if (!t) {
|
|
4328
4401
|
T();
|
|
4329
4402
|
return;
|
|
@@ -4360,24 +4433,24 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4360
4433
|
});
|
|
4361
4434
|
return /* @__PURE__ */ n("span", {
|
|
4362
4435
|
ref: w,
|
|
4363
|
-
className: `${
|
|
4436
|
+
className: `${pr.root} ${p}`,
|
|
4364
4437
|
onPointerDown: _ ? T : E,
|
|
4365
|
-
children: [O, _ && /* @__PURE__ */ t(
|
|
4438
|
+
children: [O, _ && /* @__PURE__ */ t(fn, { children: /* @__PURE__ */ t("span", {
|
|
4366
4439
|
ref: S,
|
|
4367
4440
|
id: m,
|
|
4368
4441
|
role: "tooltip",
|
|
4369
|
-
className:
|
|
4442
|
+
className: pr.tooltip,
|
|
4370
4443
|
style: D,
|
|
4371
4444
|
children: e
|
|
4372
4445
|
}) })]
|
|
4373
4446
|
});
|
|
4374
|
-
},
|
|
4447
|
+
}, br = {
|
|
4375
4448
|
root: "_root_bs28m_1",
|
|
4376
4449
|
tabList: "_tabList_bs28m_11",
|
|
4377
4450
|
tab: "_tab_bs28m_11",
|
|
4378
4451
|
panels: "_panels_bs28m_127",
|
|
4379
4452
|
panel: "_panel_bs28m_127"
|
|
4380
|
-
},
|
|
4453
|
+
}, xr = ({ items: e, value: r, onChange: i, ariaLabel: a = "Вкладки", disabled: o = !1, loading: s = !1, className: c = "" }) => {
|
|
4381
4454
|
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) => {
|
|
4382
4455
|
let n = e[t];
|
|
4383
4456
|
!n || n.disabled || d || (i(n.id), u.current[t]?.focus(), u.current[t]?.scrollIntoView({
|
|
@@ -4407,10 +4480,10 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4407
4480
|
t.preventDefault(), _(a);
|
|
4408
4481
|
};
|
|
4409
4482
|
return /* @__PURE__ */ n("div", {
|
|
4410
|
-
className: `${
|
|
4483
|
+
className: `${br.root} ${c}`,
|
|
4411
4484
|
"aria-busy": s || void 0,
|
|
4412
4485
|
children: [/* @__PURE__ */ t("div", {
|
|
4413
|
-
className:
|
|
4486
|
+
className: br.tabList,
|
|
4414
4487
|
role: "tablist",
|
|
4415
4488
|
"aria-label": a,
|
|
4416
4489
|
"aria-orientation": "horizontal",
|
|
@@ -4422,7 +4495,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4422
4495
|
u.current[n] = e;
|
|
4423
4496
|
},
|
|
4424
4497
|
id: a,
|
|
4425
|
-
className:
|
|
4498
|
+
className: br.tab,
|
|
4426
4499
|
type: "button",
|
|
4427
4500
|
role: "tab",
|
|
4428
4501
|
"aria-selected": i,
|
|
@@ -4435,12 +4508,12 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4435
4508
|
}, e.id);
|
|
4436
4509
|
})
|
|
4437
4510
|
}), /* @__PURE__ */ t("div", {
|
|
4438
|
-
className:
|
|
4511
|
+
className: br.panels,
|
|
4439
4512
|
children: e.map((e, n) => {
|
|
4440
4513
|
let i = e.id === r;
|
|
4441
4514
|
return /* @__PURE__ */ t("div", {
|
|
4442
4515
|
id: `${l}-panel-${n}`,
|
|
4443
|
-
className:
|
|
4516
|
+
className: br.panel,
|
|
4444
4517
|
role: "tabpanel",
|
|
4445
4518
|
"aria-labelledby": `${l}-tab-${n}`,
|
|
4446
4519
|
tabIndex: 0,
|
|
@@ -4450,7 +4523,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4450
4523
|
})
|
|
4451
4524
|
})]
|
|
4452
4525
|
});
|
|
4453
|
-
},
|
|
4526
|
+
}, Sr = (e) => {
|
|
4454
4527
|
if (!Number.isFinite(e) || e < 0) return "00:00";
|
|
4455
4528
|
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")}`;
|
|
4456
4529
|
return n ? `${n}:${a}` : a;
|
|
@@ -4483,24 +4556,24 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4483
4556
|
settingsActionLabel: "_settingsActionLabel_14cqp_693",
|
|
4484
4557
|
caption: "_caption_14cqp_705",
|
|
4485
4558
|
fullscreen: "_fullscreen_14cqp_719"
|
|
4486
|
-
},
|
|
4559
|
+
}, Cr = 2500, wr = 5, Tr = .05, Er = [
|
|
4487
4560
|
.5,
|
|
4488
4561
|
.75,
|
|
4489
4562
|
1,
|
|
4490
4563
|
1.25,
|
|
4491
4564
|
1.5,
|
|
4492
4565
|
2
|
|
4493
|
-
],
|
|
4494
|
-
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,
|
|
4566
|
+
], Dr = ({ 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 }) => {
|
|
4567
|
+
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, le] = g(!0), [ue, G] = g(!1), [de, fe] = g(!1), pe = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), me = i.map((e, t) => ({
|
|
4495
4568
|
track: e,
|
|
4496
4569
|
index: t
|
|
4497
|
-
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"),
|
|
4498
|
-
|
|
4570
|
+
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), K = u ?? (C ? "Не удалось воспроизвести видео" : void 0), he = c || T && !K && r.length > 0, ge = !he && !K && r.length === 0, _e = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, ve = l(() => {
|
|
4571
|
+
le(!0), window.clearTimeout(S.current), A && !oe && (S.current = window.setTimeout(() => le(!1), Cr));
|
|
4499
4572
|
}, [A, oe]);
|
|
4500
4573
|
d(() => {
|
|
4501
4574
|
w(!1), E(r.length > 0), O(!1), M(!1), N(!1), F(0), L(0), z(0);
|
|
4502
|
-
}, [
|
|
4503
|
-
let e = () =>
|
|
4575
|
+
}, [pe, r.length]), d(() => (ve(), () => window.clearTimeout(S.current)), [ve]), d(() => {
|
|
4576
|
+
let e = () => G(document.fullscreenElement === b.current), t = () => fe(document.pictureInPictureElement === x.current);
|
|
4504
4577
|
return document.addEventListener("fullscreenchange", e), document.addEventListener("enterpictureinpicture", t), document.addEventListener("leavepictureinpicture", t), () => {
|
|
4505
4578
|
document.removeEventListener("fullscreenchange", e), document.removeEventListener("enterpictureinpicture", t), document.removeEventListener("leavepictureinpicture", t);
|
|
4506
4579
|
};
|
|
@@ -4513,7 +4586,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4513
4586
|
}, [oe]);
|
|
4514
4587
|
let ye = async () => {
|
|
4515
4588
|
let e = x.current;
|
|
4516
|
-
if (!(!e ||
|
|
4589
|
+
if (!(!e || K || he)) {
|
|
4517
4590
|
if (e.paused || e.ended) {
|
|
4518
4591
|
e.ended && (e.currentTime = 0);
|
|
4519
4592
|
try {
|
|
@@ -4536,14 +4609,14 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4536
4609
|
if (b.current) try {
|
|
4537
4610
|
document.fullscreenElement ? await document.exitFullscreen() : await b.current.requestFullscreen();
|
|
4538
4611
|
} catch {
|
|
4539
|
-
|
|
4612
|
+
G(!1);
|
|
4540
4613
|
}
|
|
4541
4614
|
}, we = async () => {
|
|
4542
4615
|
let e = x.current;
|
|
4543
4616
|
if (!(!e || !_e)) try {
|
|
4544
4617
|
document.pictureInPictureElement ? await document.exitPictureInPicture() : await e.requestPictureInPicture();
|
|
4545
4618
|
} catch {
|
|
4546
|
-
|
|
4619
|
+
fe(!1);
|
|
4547
4620
|
}
|
|
4548
4621
|
}, Te = (e) => {
|
|
4549
4622
|
let t = x.current;
|
|
@@ -4554,11 +4627,11 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4554
4627
|
let t = e.target;
|
|
4555
4628
|
if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
|
|
4556
4629
|
let n = e.key.toLowerCase();
|
|
4557
|
-
n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), be()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" &&
|
|
4558
|
-
},
|
|
4630
|
+
n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), be()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" && me.length ? (e.preventDefault(), Te(ie === -1 ? me[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Se(P + (e.key === "ArrowRight" ? wr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), xe(B + (e.key === "ArrowUp" ? Tr : -.05))) : e.key === "Escape" && se(!1), ve();
|
|
4631
|
+
}, De = () => {
|
|
4559
4632
|
let e = x.current;
|
|
4560
4633
|
w(!1), E(!0), e?.load();
|
|
4561
|
-
},
|
|
4634
|
+
}, Oe = {
|
|
4562
4635
|
"--video-progress": `${I ? P / I * 100 : 0}%`,
|
|
4563
4636
|
"--video-buffered": `${R * 100}%`
|
|
4564
4637
|
};
|
|
@@ -4568,7 +4641,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4568
4641
|
onKeyDown: Ee,
|
|
4569
4642
|
children: [/* @__PURE__ */ n("div", {
|
|
4570
4643
|
ref: b,
|
|
4571
|
-
className: `${$.frame} ${
|
|
4644
|
+
className: `${$.frame} ${ue ? $.fullscreen : ""}`,
|
|
4572
4645
|
style: { aspectRatio: o },
|
|
4573
4646
|
"aria-busy": he || void 0,
|
|
4574
4647
|
tabIndex: m && r.length ? 0 : void 0,
|
|
@@ -4576,7 +4649,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4576
4649
|
onPointerDown: ve,
|
|
4577
4650
|
onFocusCapture: ve,
|
|
4578
4651
|
onMouseLeave: () => {
|
|
4579
|
-
A && !oe &&
|
|
4652
|
+
A && !oe && le(!1);
|
|
4580
4653
|
},
|
|
4581
4654
|
children: [
|
|
4582
4655
|
r.length > 0 && /* @__PURE__ */ n("video", {
|
|
@@ -4599,7 +4672,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4599
4672
|
},
|
|
4600
4673
|
onLoadedMetadata: (e) => {
|
|
4601
4674
|
L(e.currentTarget.duration || 0);
|
|
4602
|
-
let t =
|
|
4675
|
+
let t = me.find(({ track: e }) => e.default);
|
|
4603
4676
|
Te(t?.index ?? -1), v.onLoadedMetadata?.(e);
|
|
4604
4677
|
},
|
|
4605
4678
|
onDurationChange: (e) => {
|
|
@@ -4631,7 +4704,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4631
4704
|
M(!1), v.onPause?.(e);
|
|
4632
4705
|
},
|
|
4633
4706
|
onEnded: (e) => {
|
|
4634
|
-
M(!1), N(!0),
|
|
4707
|
+
M(!1), N(!0), le(!0), v.onEnded?.(e);
|
|
4635
4708
|
},
|
|
4636
4709
|
onVolumeChange: (e) => {
|
|
4637
4710
|
V(e.currentTarget.volume), U(e.currentTarget.muted), v.onVolumeChange?.(e);
|
|
@@ -4653,11 +4726,11 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4653
4726
|
"aria-hidden": "true",
|
|
4654
4727
|
children: /* @__PURE__ */ t("div", {
|
|
4655
4728
|
className: $.loaderScale,
|
|
4656
|
-
children: /* @__PURE__ */ t(
|
|
4729
|
+
children: /* @__PURE__ */ t(ir, {})
|
|
4657
4730
|
})
|
|
4658
4731
|
}), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
|
|
4659
4732
|
}),
|
|
4660
|
-
!he && D && !
|
|
4733
|
+
!he && D && !K && /* @__PURE__ */ t("div", {
|
|
4661
4734
|
className: $.buffering,
|
|
4662
4735
|
role: "status",
|
|
4663
4736
|
"aria-label": "Буферизация видео",
|
|
@@ -4667,7 +4740,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4667
4740
|
className: `${$.state} ${$.empty}`,
|
|
4668
4741
|
role: "status",
|
|
4669
4742
|
children: [
|
|
4670
|
-
/* @__PURE__ */ t(
|
|
4743
|
+
/* @__PURE__ */ t(J, {
|
|
4671
4744
|
name: "IconInfoCircle",
|
|
4672
4745
|
className: $.stateIcon,
|
|
4673
4746
|
width: 40,
|
|
@@ -4677,37 +4750,37 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4677
4750
|
f ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
|
|
4678
4751
|
]
|
|
4679
4752
|
}),
|
|
4680
|
-
!he &&
|
|
4753
|
+
!he && K && /* @__PURE__ */ n("div", {
|
|
4681
4754
|
className: `${$.state} ${$.error}`,
|
|
4682
4755
|
role: "alert",
|
|
4683
4756
|
children: [
|
|
4684
|
-
/* @__PURE__ */ t(
|
|
4757
|
+
/* @__PURE__ */ t(J, {
|
|
4685
4758
|
name: "IconWarning",
|
|
4686
4759
|
className: $.stateIcon,
|
|
4687
4760
|
width: 40,
|
|
4688
4761
|
height: 40
|
|
4689
4762
|
}),
|
|
4690
|
-
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children:
|
|
4763
|
+
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: K })] }),
|
|
4691
4764
|
r.length > 0 && /* @__PURE__ */ t(j, {
|
|
4692
4765
|
size: "sm",
|
|
4693
4766
|
variant: "secondary",
|
|
4694
|
-
onClick:
|
|
4767
|
+
onClick: De,
|
|
4695
4768
|
children: "Повторить"
|
|
4696
4769
|
})
|
|
4697
4770
|
]
|
|
4698
4771
|
}),
|
|
4699
|
-
!he && !
|
|
4772
|
+
!he && !K && ee && /* @__PURE__ */ t("button", {
|
|
4700
4773
|
type: "button",
|
|
4701
4774
|
className: $.replay,
|
|
4702
4775
|
"aria-label": "Воспроизвести заново",
|
|
4703
4776
|
onClick: () => void ye(),
|
|
4704
|
-
children: /* @__PURE__ */ t(
|
|
4777
|
+
children: /* @__PURE__ */ t(J, {
|
|
4705
4778
|
name: "IconReplay",
|
|
4706
4779
|
width: 28,
|
|
4707
4780
|
height: 28
|
|
4708
4781
|
})
|
|
4709
4782
|
}),
|
|
4710
|
-
m && r.length > 0 && !he && !
|
|
4783
|
+
m && r.length > 0 && !he && !K && /* @__PURE__ */ n("div", {
|
|
4711
4784
|
className: `${$.controlsLayer} ${ce || !A ? $.controlsVisible : ""}`,
|
|
4712
4785
|
onClick: (e) => e.stopPropagation(),
|
|
4713
4786
|
children: [oe && /* @__PURE__ */ n("div", {
|
|
@@ -4721,18 +4794,18 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4721
4794
|
let t = Number(e.target.value);
|
|
4722
4795
|
x.current && (x.current.playbackRate = t);
|
|
4723
4796
|
},
|
|
4724
|
-
children:
|
|
4797
|
+
children: Er.map((e) => /* @__PURE__ */ n("option", {
|
|
4725
4798
|
value: e,
|
|
4726
4799
|
children: [e, "×"]
|
|
4727
4800
|
}, e))
|
|
4728
4801
|
})] }),
|
|
4729
|
-
|
|
4802
|
+
me.length > 0 && /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Субтитры" }), /* @__PURE__ */ n("select", {
|
|
4730
4803
|
value: ie,
|
|
4731
4804
|
onChange: (e) => Te(Number(e.target.value)),
|
|
4732
4805
|
children: [/* @__PURE__ */ t("option", {
|
|
4733
4806
|
value: -1,
|
|
4734
4807
|
children: "Выключены"
|
|
4735
|
-
}),
|
|
4808
|
+
}), me.map(({ track: e, index: n }) => /* @__PURE__ */ t("option", {
|
|
4736
4809
|
value: n,
|
|
4737
4810
|
children: e.label
|
|
4738
4811
|
}, `${e.srcLang}-${e.label}`))]
|
|
@@ -4751,7 +4824,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4751
4824
|
onClick: () => void we(),
|
|
4752
4825
|
children: /* @__PURE__ */ n("span", {
|
|
4753
4826
|
className: $.settingsActionLabel,
|
|
4754
|
-
children: [/* @__PURE__ */ t(
|
|
4827
|
+
children: [/* @__PURE__ */ t(J, {
|
|
4755
4828
|
name: "IconPictureInPicture",
|
|
4756
4829
|
width: 18,
|
|
4757
4830
|
height: 18
|
|
@@ -4770,7 +4843,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4770
4843
|
"aria-label": A ? "Пауза" : "Воспроизвести",
|
|
4771
4844
|
title: A ? "Пауза (K)" : "Воспроизвести (K)",
|
|
4772
4845
|
onClick: () => void ye(),
|
|
4773
|
-
children: /* @__PURE__ */ t(
|
|
4846
|
+
children: /* @__PURE__ */ t(J, {
|
|
4774
4847
|
name: A ? "IconPause" : "IconPlay",
|
|
4775
4848
|
width: 24,
|
|
4776
4849
|
height: 24
|
|
@@ -4786,7 +4859,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4786
4859
|
"aria-pressed": H,
|
|
4787
4860
|
title: "Звук (M)",
|
|
4788
4861
|
onClick: be,
|
|
4789
|
-
children: /* @__PURE__ */ t(
|
|
4862
|
+
children: /* @__PURE__ */ t(J, {
|
|
4790
4863
|
name: H || B === 0 ? "IconVolumeMuted" : "IconVolume",
|
|
4791
4864
|
width: 22,
|
|
4792
4865
|
height: 22
|
|
@@ -4808,23 +4881,23 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4808
4881
|
children: [
|
|
4809
4882
|
/* @__PURE__ */ t("span", {
|
|
4810
4883
|
className: $.time,
|
|
4811
|
-
children:
|
|
4884
|
+
children: Sr(P)
|
|
4812
4885
|
}),
|
|
4813
4886
|
/* @__PURE__ */ t("input", {
|
|
4814
4887
|
className: $.timeline,
|
|
4815
|
-
style:
|
|
4888
|
+
style: Oe,
|
|
4816
4889
|
type: "range",
|
|
4817
4890
|
min: 0,
|
|
4818
4891
|
max: I || 0,
|
|
4819
4892
|
step: .01,
|
|
4820
4893
|
value: Math.min(P, I || 0),
|
|
4821
4894
|
"aria-label": "Позиция воспроизведения",
|
|
4822
|
-
"aria-valuetext": `${
|
|
4895
|
+
"aria-valuetext": `${Sr(P)} из ${Sr(I)}`,
|
|
4823
4896
|
onChange: (e) => Se(Number(e.target.value))
|
|
4824
4897
|
}),
|
|
4825
4898
|
/* @__PURE__ */ t("span", {
|
|
4826
4899
|
className: $.time,
|
|
4827
|
-
children:
|
|
4900
|
+
children: Sr(I)
|
|
4828
4901
|
})
|
|
4829
4902
|
]
|
|
4830
4903
|
}),
|
|
@@ -4837,7 +4910,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4837
4910
|
"aria-expanded": oe,
|
|
4838
4911
|
title: "Настройки",
|
|
4839
4912
|
onClick: () => se((e) => !e),
|
|
4840
|
-
children: /* @__PURE__ */ t(
|
|
4913
|
+
children: /* @__PURE__ */ t(J, {
|
|
4841
4914
|
name: "IconSettings",
|
|
4842
4915
|
width: 22,
|
|
4843
4916
|
height: 22
|
|
@@ -4845,11 +4918,11 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4845
4918
|
}), /* @__PURE__ */ t("button", {
|
|
4846
4919
|
type: "button",
|
|
4847
4920
|
className: $.controlButton,
|
|
4848
|
-
"aria-label":
|
|
4921
|
+
"aria-label": ue ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
|
|
4849
4922
|
title: "Полноэкранный режим (F)",
|
|
4850
4923
|
onClick: () => void Ce(),
|
|
4851
|
-
children: /* @__PURE__ */ t(
|
|
4852
|
-
name:
|
|
4924
|
+
children: /* @__PURE__ */ t(J, {
|
|
4925
|
+
name: ue ? "IconFullscreenExit" : "IconFullscreen",
|
|
4853
4926
|
width: 22,
|
|
4854
4927
|
height: 22
|
|
4855
4928
|
})
|
|
@@ -4864,7 +4937,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4864
4937
|
children: a
|
|
4865
4938
|
})]
|
|
4866
4939
|
});
|
|
4867
|
-
},
|
|
4940
|
+
}, Or = {
|
|
4868
4941
|
root: "_root_ymidq_1",
|
|
4869
4942
|
trigger: "_trigger_ymidq_15",
|
|
4870
4943
|
heading: "_heading_ymidq_41",
|
|
@@ -4874,7 +4947,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4874
4947
|
open: "_open_ymidq_91",
|
|
4875
4948
|
content: "_content_ymidq_99",
|
|
4876
4949
|
contentInner: "_contentInner_ymidq_119"
|
|
4877
|
-
},
|
|
4950
|
+
}, kr = (e, t, n, r = 16) => {
|
|
4878
4951
|
if (t > Math.max(0, n - r * 2)) {
|
|
4879
4952
|
let t = e - r;
|
|
4880
4953
|
return Math.abs(t) <= 1 ? {
|
|
@@ -4896,7 +4969,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4896
4969
|
alignment: "none",
|
|
4897
4970
|
delta: 0
|
|
4898
4971
|
};
|
|
4899
|
-
},
|
|
4972
|
+
}, Ar = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, autoScrollOnOpen: c = !0, scrollOffset: l = 16, className: u = "" }) => {
|
|
4900
4973
|
let p = f(), [m, _] = g(a), v = o ?? m, y = h(null), b = h(null), x = h(v);
|
|
4901
4974
|
return d(() => {
|
|
4902
4975
|
let e = x.current;
|
|
@@ -4906,7 +4979,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4906
4979
|
let r = !1, i = () => {
|
|
4907
4980
|
if (r) return;
|
|
4908
4981
|
r = !0;
|
|
4909
|
-
let e = t.getBoundingClientRect(), n =
|
|
4982
|
+
let e = t.getBoundingClientRect(), n = kr(e.top, e.height, window.innerHeight, l);
|
|
4910
4983
|
if (n.alignment === "none") return;
|
|
4911
4984
|
let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
4912
4985
|
window.scrollBy({
|
|
@@ -4927,10 +5000,10 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4927
5000
|
l
|
|
4928
5001
|
]), /* @__PURE__ */ n("section", {
|
|
4929
5002
|
ref: y,
|
|
4930
|
-
className: `${
|
|
5003
|
+
className: `${Or.root} ${v ? Or.open : ""} ${u}`,
|
|
4931
5004
|
children: [/* @__PURE__ */ n("button", {
|
|
4932
5005
|
type: "button",
|
|
4933
|
-
className:
|
|
5006
|
+
className: Or.trigger,
|
|
4934
5007
|
"aria-expanded": v,
|
|
4935
5008
|
"aria-controls": p,
|
|
4936
5009
|
onClick: () => {
|
|
@@ -4938,18 +5011,18 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4938
5011
|
o === void 0 && _(e), s?.(e);
|
|
4939
5012
|
},
|
|
4940
5013
|
children: [/* @__PURE__ */ n("span", {
|
|
4941
|
-
className:
|
|
5014
|
+
className: Or.heading,
|
|
4942
5015
|
children: [/* @__PURE__ */ t("span", {
|
|
4943
|
-
className:
|
|
5016
|
+
className: Or.title,
|
|
4944
5017
|
children: e
|
|
4945
5018
|
}), r && /* @__PURE__ */ t("span", {
|
|
4946
|
-
className:
|
|
5019
|
+
className: Or.subtitle,
|
|
4947
5020
|
children: r
|
|
4948
5021
|
})]
|
|
4949
5022
|
}), /* @__PURE__ */ t("span", {
|
|
4950
|
-
className:
|
|
5023
|
+
className: Or.icon,
|
|
4951
5024
|
"aria-hidden": "true",
|
|
4952
|
-
children: /* @__PURE__ */ t(
|
|
5025
|
+
children: /* @__PURE__ */ t(J, {
|
|
4953
5026
|
name: "IconChevron",
|
|
4954
5027
|
width: 20,
|
|
4955
5028
|
height: 20
|
|
@@ -4958,15 +5031,15 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4958
5031
|
}), /* @__PURE__ */ t("div", {
|
|
4959
5032
|
ref: b,
|
|
4960
5033
|
id: p,
|
|
4961
|
-
className:
|
|
5034
|
+
className: Or.content,
|
|
4962
5035
|
"aria-hidden": !v,
|
|
4963
5036
|
children: /* @__PURE__ */ t("div", {
|
|
4964
|
-
className:
|
|
5037
|
+
className: Or.contentInner,
|
|
4965
5038
|
children: i
|
|
4966
5039
|
})
|
|
4967
5040
|
})]
|
|
4968
5041
|
});
|
|
4969
|
-
},
|
|
5042
|
+
}, jr = {
|
|
4970
5043
|
root: "_root_14ewt_1",
|
|
4971
5044
|
topSlot: "_topSlot_14ewt_29",
|
|
4972
5045
|
searchSlot: "_searchSlot_14ewt_31",
|
|
@@ -4984,14 +5057,14 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4984
5057
|
description: "_description_14ewt_235",
|
|
4985
5058
|
badge: "_badge_14ewt_269",
|
|
4986
5059
|
empty: "_empty_14ewt_281"
|
|
4987
|
-
},
|
|
5060
|
+
}, Mr = (e, t, n) => {
|
|
4988
5061
|
if (e.length === 0) return -1;
|
|
4989
5062
|
for (let r = 1; r <= e.length; r += 1) {
|
|
4990
5063
|
let i = (t + n * r + e.length) % e.length;
|
|
4991
5064
|
if (!e[i]?.disabled) return i;
|
|
4992
5065
|
}
|
|
4993
5066
|
return -1;
|
|
4994
|
-
},
|
|
5067
|
+
}, Nr = ({ groups: r, currentItemId: i, ariaLabel: a = "Основная навигация", searchSlot: o, topSlot: s, bottomSlot: c, emptyState: l, renderLink: u, onItemSelect: d, className: p = "" }) => {
|
|
4995
5068
|
let m = f(), g = h(null), _ = h({
|
|
4996
5069
|
value: "",
|
|
4997
5070
|
time: 0
|
|
@@ -5003,7 +5076,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5003
5076
|
let n = v.findIndex((e) => e.id === t.id);
|
|
5004
5077
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
5005
5078
|
e.preventDefault();
|
|
5006
|
-
let t =
|
|
5079
|
+
let t = Mr(v, n, e.key === "ArrowDown" ? 1 : -1);
|
|
5007
5080
|
x(v[t]);
|
|
5008
5081
|
return;
|
|
5009
5082
|
}
|
|
@@ -5023,26 +5096,26 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5023
5096
|
let a = r.id === i, o = {
|
|
5024
5097
|
children: /* @__PURE__ */ n(e, { children: [
|
|
5025
5098
|
r.icon && /* @__PURE__ */ t("span", {
|
|
5026
|
-
className:
|
|
5099
|
+
className: jr.icon,
|
|
5027
5100
|
"aria-hidden": "true",
|
|
5028
5101
|
children: r.icon
|
|
5029
5102
|
}),
|
|
5030
5103
|
/* @__PURE__ */ n("span", {
|
|
5031
|
-
className:
|
|
5104
|
+
className: jr.copy,
|
|
5032
5105
|
children: [/* @__PURE__ */ t("span", {
|
|
5033
|
-
className:
|
|
5106
|
+
className: jr.label,
|
|
5034
5107
|
children: r.label
|
|
5035
5108
|
}), r.description && /* @__PURE__ */ t("span", {
|
|
5036
|
-
className:
|
|
5109
|
+
className: jr.description,
|
|
5037
5110
|
children: r.description
|
|
5038
5111
|
})]
|
|
5039
5112
|
}),
|
|
5040
5113
|
r.badge && /* @__PURE__ */ t("span", {
|
|
5041
|
-
className:
|
|
5114
|
+
className: jr.badge,
|
|
5042
5115
|
children: r.badge
|
|
5043
5116
|
})
|
|
5044
5117
|
] }),
|
|
5045
|
-
className: `${
|
|
5118
|
+
className: `${jr.link} ${a ? jr.current : ""}`,
|
|
5046
5119
|
tabIndex: r.id === b ? 0 : -1,
|
|
5047
5120
|
"aria-current": a ? "page" : void 0,
|
|
5048
5121
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5058,7 +5131,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5058
5131
|
onKeyDown: (e) => S(e, r)
|
|
5059
5132
|
};
|
|
5060
5133
|
return /* @__PURE__ */ t("li", {
|
|
5061
|
-
className:
|
|
5134
|
+
className: jr.item,
|
|
5062
5135
|
children: u ? u(r, o) : r.href ? /* @__PURE__ */ t("a", {
|
|
5063
5136
|
href: r.href,
|
|
5064
5137
|
...o,
|
|
@@ -5073,45 +5146,45 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5073
5146
|
};
|
|
5074
5147
|
return /* @__PURE__ */ n("nav", {
|
|
5075
5148
|
ref: g,
|
|
5076
|
-
className: `${
|
|
5149
|
+
className: `${jr.root} ${p}`,
|
|
5077
5150
|
"aria-label": a,
|
|
5078
5151
|
children: [
|
|
5079
5152
|
s && /* @__PURE__ */ t("div", {
|
|
5080
|
-
className:
|
|
5153
|
+
className: jr.topSlot,
|
|
5081
5154
|
children: s
|
|
5082
5155
|
}),
|
|
5083
5156
|
o && /* @__PURE__ */ t("div", {
|
|
5084
|
-
className:
|
|
5157
|
+
className: jr.searchSlot,
|
|
5085
5158
|
children: o
|
|
5086
5159
|
}),
|
|
5087
5160
|
/* @__PURE__ */ n("div", {
|
|
5088
|
-
className:
|
|
5161
|
+
className: jr.groups,
|
|
5089
5162
|
children: [r.map((e) => {
|
|
5090
5163
|
let r = `${m}-${e.id}`;
|
|
5091
5164
|
return /* @__PURE__ */ n("section", {
|
|
5092
|
-
className:
|
|
5165
|
+
className: jr.group,
|
|
5093
5166
|
"aria-labelledby": e.label ? r : void 0,
|
|
5094
5167
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
5095
5168
|
id: r,
|
|
5096
|
-
className:
|
|
5169
|
+
className: jr.groupLabel,
|
|
5097
5170
|
children: e.label
|
|
5098
5171
|
}), /* @__PURE__ */ t("ul", {
|
|
5099
|
-
className:
|
|
5172
|
+
className: jr.list,
|
|
5100
5173
|
children: e.items.map(C)
|
|
5101
5174
|
})]
|
|
5102
5175
|
}, e.id);
|
|
5103
5176
|
}), v.length === 0 && l && /* @__PURE__ */ t("div", {
|
|
5104
|
-
className:
|
|
5177
|
+
className: jr.empty,
|
|
5105
5178
|
children: l
|
|
5106
5179
|
})]
|
|
5107
5180
|
}),
|
|
5108
5181
|
c && /* @__PURE__ */ t("div", {
|
|
5109
|
-
className:
|
|
5182
|
+
className: jr.bottomSlot,
|
|
5110
5183
|
children: c
|
|
5111
5184
|
})
|
|
5112
5185
|
]
|
|
5113
5186
|
});
|
|
5114
|
-
},
|
|
5187
|
+
}, Pr = {
|
|
5115
5188
|
root: "_root_2mdgb_1",
|
|
5116
5189
|
list: "_list_2mdgb_19",
|
|
5117
5190
|
item: "_item_2mdgb_37",
|
|
@@ -5121,7 +5194,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5121
5194
|
icon: "_icon_2mdgb_141",
|
|
5122
5195
|
badge: "_badge_2mdgb_149",
|
|
5123
5196
|
label: "_label_2mdgb_163"
|
|
5124
|
-
},
|
|
5197
|
+
}, Fr = ({ items: r, currentItemId: i, ariaLabel: a = "Мобильная навигация", renderLink: o, onItemSelect: s, className: c = "" }) => {
|
|
5125
5198
|
let l = h(null), u = r.filter((e) => !e.disabled), d = u.some((e) => e.id === i) ? i : u[0]?.id, f = (e) => {
|
|
5126
5199
|
l.current?.querySelectorAll("[data-ds-navigation-item]")[e]?.focus();
|
|
5127
5200
|
}, p = (e, t) => {
|
|
@@ -5138,27 +5211,27 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5138
5211
|
};
|
|
5139
5212
|
return /* @__PURE__ */ t("nav", {
|
|
5140
5213
|
ref: l,
|
|
5141
|
-
className: `${
|
|
5214
|
+
className: `${Pr.root} ${c}`,
|
|
5142
5215
|
"aria-label": a,
|
|
5143
5216
|
children: /* @__PURE__ */ t("ul", {
|
|
5144
|
-
className:
|
|
5217
|
+
className: Pr.list,
|
|
5145
5218
|
children: r.map((r) => {
|
|
5146
5219
|
let a = r.id === i, c = {
|
|
5147
5220
|
children: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("span", {
|
|
5148
|
-
className:
|
|
5221
|
+
className: Pr.visual,
|
|
5149
5222
|
children: [r.icon && /* @__PURE__ */ t("span", {
|
|
5150
|
-
className:
|
|
5223
|
+
className: Pr.icon,
|
|
5151
5224
|
"aria-hidden": "true",
|
|
5152
5225
|
children: r.icon
|
|
5153
5226
|
}), r.badge && /* @__PURE__ */ t("span", {
|
|
5154
|
-
className:
|
|
5227
|
+
className: Pr.badge,
|
|
5155
5228
|
children: r.badge
|
|
5156
5229
|
})]
|
|
5157
5230
|
}), /* @__PURE__ */ t("span", {
|
|
5158
|
-
className:
|
|
5231
|
+
className: Pr.label,
|
|
5159
5232
|
children: r.label
|
|
5160
5233
|
})] }),
|
|
5161
|
-
className: `${
|
|
5234
|
+
className: `${Pr.link} ${a ? Pr.current : ""}`,
|
|
5162
5235
|
tabIndex: r.id === d ? 0 : -1,
|
|
5163
5236
|
"aria-current": a ? "page" : void 0,
|
|
5164
5237
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5174,7 +5247,7 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5174
5247
|
onKeyDown: (e) => p(e, r)
|
|
5175
5248
|
};
|
|
5176
5249
|
return /* @__PURE__ */ t("li", {
|
|
5177
|
-
className:
|
|
5250
|
+
className: Pr.item,
|
|
5178
5251
|
children: o ? o(r, c) : r.href ? /* @__PURE__ */ t("a", {
|
|
5179
5252
|
href: r.href,
|
|
5180
5253
|
...c,
|
|
@@ -5191,4 +5264,4 @@ var kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5191
5264
|
});
|
|
5192
5265
|
};
|
|
5193
5266
|
//#endregion
|
|
5194
|
-
export {
|
|
5267
|
+
export { zn as ConfirmModal, Ar as DSAccordion, w as DSBadge, Fr as DSBottomNavigation, tr as DSBottomSheet, j as DSButton, Pe as DSCheckbox, D as DSCounterBadge, Ht as DSDataTable, nt as DSDateRange, $e as DSDateTimePicker, er as DSDrawer, ut as DSDropDown, yt as DSDropDownMultiple, ee as DSFieldLabel, N as DSFieldMessage, dn as DSFileInput, tn as DSFilters, mn as DSFloatingMenu, rn as DSFormGrid, an as DSFormGridItem, nr as DSFullscreenDialog, J as DSIcon, Me as DSIconNames, $t as DSInfoBlock, mt as DSInput, k as DSLoader, Nn as DSModal, Mn as DSModalFrame, Nr as DSNavigationSurface, $n as DSOverlay, ir as DSPageLoader, fn as DSPortal, xt as DSRadioButton, Zt as DSSearchDropDown, it as DSSkeleton, ft as DSSort, xr as DSTabs, vn as DSTextarea, sr as DSToast, dr as DSToastProvider, yr as DSTooltip, on as DSValidationSummary, Dr as DSVideoPlayerFrame, Bn as ErrorModal, Pn as ModalSystemProvider, Vn as builtInModalRegistry, Fn as defineModalRegistry, E as formatDSCounterValue, X as formatDateInputValue, Ge as formatDateTimeLocalValue, kr as getDSAccordionScrollTarget, At as getDSDataTableColumnStyle, Mt as getDSDataTablePaginationItems, jt as getDSDataTableStickyColumnStyle, Un as getErrorMessage, kt as getNextDSDataTablePageSelection, ct as getNextEnabledOptionIndex, He as isValidDateInputPrefix, tt as isValidDateRange, Be as maskDateInputValue, Ue as parseDateInputValue, Ke as parseDateTimeLocalValue, xn as resetModalStore, ur as resetToastStore, Hn as useConfirmModal, Gn as useConfirmModalStore, Qn as useDSOverlay, Wn as useErrorModal, Kn as useErrorModalStore, qn as useModals, bn as useModalsStore, fr as useToast, lr as useToastStore, Nt as validateDSDataTableData };
|