@efficiency-point/design-system 0.1.36 → 0.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -0
- package/dist/components/DSDataTable/DSDataTable.d.ts +51 -1
- package/dist/components/DSDataTable/DSDataTable.d.ts.map +1 -1
- package/dist/components/DSIcon/source/IconBedDouble.d.ts +4 -0
- package/dist/components/DSIcon/source/IconBedDouble.d.ts.map +1 -0
- package/dist/components/DSIcon/source/index.d.ts +1 -0
- package/dist/components/DSIcon/source/index.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.es.js +1492 -1306
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -149,51 +149,55 @@ var M = {
|
|
|
149
149
|
}), F = (e) => /* @__PURE__ */ t(P, {
|
|
150
150
|
...e,
|
|
151
151
|
children: /* @__PURE__ */ t("path", { d: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3" })
|
|
152
|
-
}), I = (e) => /* @__PURE__ */
|
|
152
|
+
}), I = ({ strokeWidth: e = 2, ...r }) => /* @__PURE__ */ n(P, {
|
|
153
|
+
strokeWidth: e,
|
|
154
|
+
...r,
|
|
155
|
+
children: [/* @__PURE__ */ t("path", { d: "M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8" }), /* @__PURE__ */ t("path", { d: "M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4M12 4v6M2 18h20M5 18v2M19 18v2" })]
|
|
156
|
+
}), L = (e) => /* @__PURE__ */ t(P, {
|
|
153
157
|
...e,
|
|
154
158
|
children: /* @__PURE__ */ t("path", { d: "m5 12 4 4L19 6" })
|
|
155
|
-
}),
|
|
159
|
+
}), R = (e) => /* @__PURE__ */ t(P, {
|
|
156
160
|
viewBox: "0 0 20 20",
|
|
157
161
|
...e,
|
|
158
162
|
children: /* @__PURE__ */ t("path", { d: "M5 7.5L10 12.5L15 7.5" })
|
|
159
|
-
}),
|
|
163
|
+
}), z = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(P, {
|
|
160
164
|
strokeWidth: e,
|
|
161
165
|
...n,
|
|
162
166
|
children: /* @__PURE__ */ t("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
163
|
-
}),
|
|
167
|
+
}), B = (e) => /* @__PURE__ */ t(P, {
|
|
164
168
|
...e,
|
|
165
169
|
children: /* @__PURE__ */ t("path", { d: "M4 20h4L19 9l-4-4L4 16v4z" })
|
|
166
|
-
}),
|
|
170
|
+
}), te = (e) => /* @__PURE__ */ n(P, {
|
|
167
171
|
...e,
|
|
168
172
|
children: [/* @__PURE__ */ t("circle", {
|
|
169
173
|
cx: "12",
|
|
170
174
|
cy: "12",
|
|
171
175
|
r: "10"
|
|
172
176
|
}), /* @__PURE__ */ t("path", { d: "m15 9-6 6M9 9l6 6" })]
|
|
173
|
-
}),
|
|
177
|
+
}), V = (e) => /* @__PURE__ */ n(P, {
|
|
174
178
|
...e,
|
|
175
179
|
children: [/* @__PURE__ */ t("path", { d: "M3 12s3.5-5 9-5 9 5 9 5-3.5 5-9 5-9-5-9-5Z" }), /* @__PURE__ */ t("circle", {
|
|
176
180
|
cx: "12",
|
|
177
181
|
cy: "12",
|
|
178
182
|
r: "2.5"
|
|
179
183
|
})]
|
|
180
|
-
}),
|
|
184
|
+
}), H = (e) => /* @__PURE__ */ t(P, {
|
|
181
185
|
...e,
|
|
182
186
|
children: /* @__PURE__ */ t("path", { d: "M3 3l18 18M10.6 10.7a2 2 0 0 0 2.7 2.7M9.9 4.2A10.7 10.7 0 0 1 12 4c5.5 0 9 5.3 9 5.3a14 14 0 0 1-2.3 2.8M6.6 6.6C4.3 8.1 3 10 3 10s3.5 5 9 5c1 0 2-.2 2.8-.5" })
|
|
183
|
-
}),
|
|
187
|
+
}), U = (e) => /* @__PURE__ */ t(P, {
|
|
184
188
|
...e,
|
|
185
189
|
children: /* @__PURE__ */ t("path", { d: "M12 10v7m0-10v.01" })
|
|
186
|
-
}),
|
|
190
|
+
}), ne = (e) => /* @__PURE__ */ n(P, {
|
|
187
191
|
...e,
|
|
188
192
|
children: [/* @__PURE__ */ t("circle", {
|
|
189
193
|
cx: "12",
|
|
190
194
|
cy: "12",
|
|
191
195
|
r: "10"
|
|
192
196
|
}), /* @__PURE__ */ t("path", { d: "M12 16v-4M12 8v.01" })]
|
|
193
|
-
}),
|
|
197
|
+
}), re = (e) => /* @__PURE__ */ t(P, {
|
|
194
198
|
...e,
|
|
195
199
|
children: /* @__PURE__ */ t("path", { d: "M5 12h14" })
|
|
196
|
-
}),
|
|
200
|
+
}), W = (e) => /* @__PURE__ */ t(P, {
|
|
197
201
|
...e,
|
|
198
202
|
children: /* @__PURE__ */ t("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" })
|
|
199
203
|
}), ie = (e) => /* @__PURE__ */ n(P, {
|
|
@@ -218,35 +222,35 @@ var M = {
|
|
|
218
222
|
}), se = (e) => /* @__PURE__ */ t(P, {
|
|
219
223
|
...e,
|
|
220
224
|
children: /* @__PURE__ */ t("path", { d: "M3 5h18v14H3V5Zm10 7h6v5h-6v-5Z" })
|
|
221
|
-
}),
|
|
225
|
+
}), G = (e) => /* @__PURE__ */ t(P, {
|
|
222
226
|
...e,
|
|
223
227
|
children: /* @__PURE__ */ t("path", {
|
|
224
228
|
d: "m8 5 11 7-11 7V5Z",
|
|
225
229
|
fill: "currentColor",
|
|
226
230
|
stroke: "none"
|
|
227
231
|
})
|
|
228
|
-
}),
|
|
232
|
+
}), K = (e) => /* @__PURE__ */ t(P, {
|
|
229
233
|
...e,
|
|
230
234
|
children: /* @__PURE__ */ t("path", { d: "M4 7v5h5M5.5 11a7 7 0 1 1 1.3 6.3" })
|
|
231
|
-
}),
|
|
235
|
+
}), ce = (e) => /* @__PURE__ */ t(P, {
|
|
232
236
|
...e,
|
|
233
237
|
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" })
|
|
234
|
-
}),
|
|
238
|
+
}), le = (e) => /* @__PURE__ */ t(P, {
|
|
235
239
|
...e,
|
|
236
240
|
children: /* @__PURE__ */ t("path", { d: "M9 4H4v5m11-5h5v5M9 20H4v-5m11 5h5v-5" })
|
|
237
|
-
}),
|
|
241
|
+
}), ue = (e) => /* @__PURE__ */ t(P, {
|
|
238
242
|
...e,
|
|
239
243
|
children: /* @__PURE__ */ t("path", { d: "M4 9h5V4m6 5h5V4M4 15h5v5m6-5h5v5" })
|
|
240
|
-
}),
|
|
244
|
+
}), de = (e) => /* @__PURE__ */ t(P, {
|
|
241
245
|
...e,
|
|
242
246
|
children: /* @__PURE__ */ t("path", { d: "M4 6h16v12H4V6Zm7 4a2 2 0 1 0 0 4m7-4a2 2 0 1 0 0 4" })
|
|
243
|
-
}),
|
|
247
|
+
}), fe = (e) => /* @__PURE__ */ t(P, {
|
|
244
248
|
...e,
|
|
245
249
|
children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12-1c1.3 1.5 1.3 4.5 0 6m2.5-8.5c3 3 3 8 0 11" })
|
|
246
|
-
}),
|
|
250
|
+
}), pe = (e) => /* @__PURE__ */ t(P, {
|
|
247
251
|
...e,
|
|
248
252
|
children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12 0 4 4m0-4-4 4" })
|
|
249
|
-
}),
|
|
253
|
+
}), me = (e) => /* @__PURE__ */ t(P, {
|
|
250
254
|
...e,
|
|
251
255
|
children: /* @__PURE__ */ t("path", { d: "M8 17V5m-3 3 3-3 3 3M16 7v12m-3-3 3 3 3-3" })
|
|
252
256
|
}), he = (e) => /* @__PURE__ */ t(P, {
|
|
@@ -268,71 +272,72 @@ var M = {
|
|
|
268
272
|
}), ye = (e) => /* @__PURE__ */ n(P, {
|
|
269
273
|
...e,
|
|
270
274
|
children: [/* @__PURE__ */ t("path", { d: "M12 3.5L21 19H3L12 3.5Z" }), /* @__PURE__ */ t("path", { d: "M12 9v4.5M12 16.5v.01" })]
|
|
271
|
-
}),
|
|
275
|
+
}), q = (e) => (n) => /* @__PURE__ */ t(P, {
|
|
272
276
|
...n,
|
|
273
277
|
children: e.map(([e, t], n) => o(e, {
|
|
274
278
|
...t,
|
|
275
279
|
key: t.key ?? `${e}-${n}`
|
|
276
280
|
}))
|
|
277
281
|
}), be = {
|
|
278
|
-
IconActivity:
|
|
282
|
+
IconActivity: q([["path", {
|
|
279
283
|
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",
|
|
280
284
|
key: "169zse"
|
|
281
285
|
}]]),
|
|
282
|
-
IconAlertTriangle:
|
|
286
|
+
IconAlertTriangle: q([
|
|
283
287
|
["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" }],
|
|
284
288
|
["path", { d: "M12 9v4" }],
|
|
285
289
|
["path", { d: "M12 17h.01" }]
|
|
286
290
|
]),
|
|
287
|
-
IconArrowDown:
|
|
291
|
+
IconArrowDown: q([["path", {
|
|
288
292
|
d: "M12 5v14",
|
|
289
293
|
key: "s699le"
|
|
290
294
|
}], ["path", {
|
|
291
295
|
d: "m19 12-7 7-7-7",
|
|
292
296
|
key: "1idqje"
|
|
293
297
|
}]]),
|
|
294
|
-
IconArrowLeft:
|
|
298
|
+
IconArrowLeft: q([["path", {
|
|
295
299
|
d: "m12 19-7-7 7-7",
|
|
296
300
|
key: "1l729n"
|
|
297
301
|
}], ["path", {
|
|
298
302
|
d: "M19 12H5",
|
|
299
303
|
key: "x3x0zl"
|
|
300
304
|
}]]),
|
|
301
|
-
IconArrowRight:
|
|
305
|
+
IconArrowRight: q([["path", {
|
|
302
306
|
d: "M5 12h14",
|
|
303
307
|
key: "1ays0h"
|
|
304
308
|
}], ["path", {
|
|
305
309
|
d: "m12 5 7 7-7 7",
|
|
306
310
|
key: "xquz4c"
|
|
307
311
|
}]]),
|
|
308
|
-
IconArrowUp:
|
|
312
|
+
IconArrowUp: q([["path", {
|
|
309
313
|
d: "m5 12 7-7 7 7",
|
|
310
314
|
key: "hav0vg"
|
|
311
315
|
}], ["path", {
|
|
312
316
|
d: "M12 19V5",
|
|
313
317
|
key: "x0mq9r"
|
|
314
318
|
}]]),
|
|
315
|
-
IconArrowUpRight:
|
|
319
|
+
IconArrowUpRight: q([["path", {
|
|
316
320
|
d: "M7 7h10v10",
|
|
317
321
|
key: "1tivn9"
|
|
318
322
|
}], ["path", {
|
|
319
323
|
d: "M7 17 17 7",
|
|
320
324
|
key: "1vkiza"
|
|
321
325
|
}]]),
|
|
322
|
-
IconBarChart3:
|
|
326
|
+
IconBarChart3: q([
|
|
323
327
|
["path", { d: "M3 3v18h18" }],
|
|
324
328
|
["path", { d: "M18 17V9" }],
|
|
325
329
|
["path", { d: "M13 17V5" }],
|
|
326
330
|
["path", { d: "M8 17v-3" }]
|
|
327
331
|
]),
|
|
328
|
-
|
|
332
|
+
IconBedDouble: I,
|
|
333
|
+
IconBell: q([["path", {
|
|
329
334
|
d: "M10.268 21a2 2 0 0 0 3.464 0",
|
|
330
335
|
key: "vwvbt9"
|
|
331
336
|
}], ["path", {
|
|
332
337
|
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",
|
|
333
338
|
key: "11g9vi"
|
|
334
339
|
}]]),
|
|
335
|
-
IconBoxes:
|
|
340
|
+
IconBoxes: q([
|
|
336
341
|
["path", {
|
|
337
342
|
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",
|
|
338
343
|
key: "lc1i9w"
|
|
@@ -382,7 +387,7 @@ var M = {
|
|
|
382
387
|
key: "1io7kd"
|
|
383
388
|
}]
|
|
384
389
|
]),
|
|
385
|
-
IconBuilding2:
|
|
390
|
+
IconBuilding2: q([
|
|
386
391
|
["path", {
|
|
387
392
|
d: "M10 12h4",
|
|
388
393
|
key: "a56b0p"
|
|
@@ -404,7 +409,7 @@ var M = {
|
|
|
404
409
|
key: "16ra0t"
|
|
405
410
|
}]
|
|
406
411
|
]),
|
|
407
|
-
IconCamera:
|
|
412
|
+
IconCamera: q([["path", {
|
|
408
413
|
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",
|
|
409
414
|
key: "18u6gg"
|
|
410
415
|
}], ["circle", {
|
|
@@ -413,7 +418,7 @@ var M = {
|
|
|
413
418
|
r: "3",
|
|
414
419
|
key: "1vg3eu"
|
|
415
420
|
}]]),
|
|
416
|
-
IconChartNoAxesCombined:
|
|
421
|
+
IconChartNoAxesCombined: q([
|
|
417
422
|
["path", {
|
|
418
423
|
d: "M12 16v5",
|
|
419
424
|
key: "zza2cw"
|
|
@@ -439,11 +444,11 @@ var M = {
|
|
|
439
444
|
key: "1t2idw"
|
|
440
445
|
}]
|
|
441
446
|
]),
|
|
442
|
-
IconChevronRight:
|
|
447
|
+
IconChevronRight: q([["path", {
|
|
443
448
|
d: "m9 18 6-6-6-6",
|
|
444
449
|
key: "mthhwq"
|
|
445
450
|
}]]),
|
|
446
|
-
IconCircleAlert:
|
|
451
|
+
IconCircleAlert: q([
|
|
447
452
|
["circle", {
|
|
448
453
|
cx: "12",
|
|
449
454
|
cy: "12",
|
|
@@ -465,7 +470,7 @@ var M = {
|
|
|
465
470
|
key: "4dfq90"
|
|
466
471
|
}]
|
|
467
472
|
]),
|
|
468
|
-
IconClock3:
|
|
473
|
+
IconClock3: q([["circle", {
|
|
469
474
|
cx: "12",
|
|
470
475
|
cy: "12",
|
|
471
476
|
r: "10",
|
|
@@ -474,7 +479,7 @@ var M = {
|
|
|
474
479
|
d: "M12 6v6h4",
|
|
475
480
|
key: "135r8i"
|
|
476
481
|
}]]),
|
|
477
|
-
IconDownload:
|
|
482
|
+
IconDownload: q([
|
|
478
483
|
["path", {
|
|
479
484
|
d: "M12 15V3",
|
|
480
485
|
key: "m9g1x1"
|
|
@@ -488,7 +493,7 @@ var M = {
|
|
|
488
493
|
key: "brsn70"
|
|
489
494
|
}]
|
|
490
495
|
]),
|
|
491
|
-
IconExternalLink:
|
|
496
|
+
IconExternalLink: q([
|
|
492
497
|
["path", {
|
|
493
498
|
d: "M15 3h6v6",
|
|
494
499
|
key: "1q9fwt"
|
|
@@ -502,7 +507,7 @@ var M = {
|
|
|
502
507
|
key: "a6xqqp"
|
|
503
508
|
}]
|
|
504
509
|
]),
|
|
505
|
-
IconFactory:
|
|
510
|
+
IconFactory: q([
|
|
506
511
|
["path", {
|
|
507
512
|
d: "M12 16h.01",
|
|
508
513
|
key: "1drbdi"
|
|
@@ -520,14 +525,14 @@ var M = {
|
|
|
520
525
|
key: "18s6g9"
|
|
521
526
|
}]
|
|
522
527
|
]),
|
|
523
|
-
IconGauge:
|
|
528
|
+
IconGauge: q([["path", {
|
|
524
529
|
d: "m12 14 4-4",
|
|
525
530
|
key: "9kzdfg"
|
|
526
531
|
}], ["path", {
|
|
527
532
|
d: "M3.34 19a10 10 0 1 1 17.32 0",
|
|
528
533
|
key: "19p75a"
|
|
529
534
|
}]]),
|
|
530
|
-
IconGripVertical:
|
|
535
|
+
IconGripVertical: q([
|
|
531
536
|
["circle", {
|
|
532
537
|
cx: "9",
|
|
533
538
|
cy: "12",
|
|
@@ -565,7 +570,7 @@ var M = {
|
|
|
565
570
|
key: "f4zoj3"
|
|
566
571
|
}]
|
|
567
572
|
]),
|
|
568
|
-
IconLayoutDashboard:
|
|
573
|
+
IconLayoutDashboard: q([
|
|
569
574
|
["rect", {
|
|
570
575
|
width: "7",
|
|
571
576
|
height: "9",
|
|
@@ -599,7 +604,7 @@ var M = {
|
|
|
599
604
|
key: "ldoo1y"
|
|
600
605
|
}]
|
|
601
606
|
]),
|
|
602
|
-
IconLockKeyhole:
|
|
607
|
+
IconLockKeyhole: q([
|
|
603
608
|
["circle", {
|
|
604
609
|
cx: "12",
|
|
605
610
|
cy: "16",
|
|
@@ -619,7 +624,7 @@ var M = {
|
|
|
619
624
|
key: "1pqi11"
|
|
620
625
|
}]
|
|
621
626
|
]),
|
|
622
|
-
IconLogOut:
|
|
627
|
+
IconLogOut: q([
|
|
623
628
|
["path", {
|
|
624
629
|
d: "m16 17 5-5-5-5",
|
|
625
630
|
key: "1bji2h"
|
|
@@ -633,7 +638,7 @@ var M = {
|
|
|
633
638
|
key: "1uf3rs"
|
|
634
639
|
}]
|
|
635
640
|
]),
|
|
636
|
-
IconMaximize2:
|
|
641
|
+
IconMaximize2: q([
|
|
637
642
|
["path", {
|
|
638
643
|
d: "M15 3h6v6",
|
|
639
644
|
key: "1q9fwt"
|
|
@@ -651,7 +656,7 @@ var M = {
|
|
|
651
656
|
key: "wtvkvv"
|
|
652
657
|
}]
|
|
653
658
|
]),
|
|
654
|
-
IconMenu:
|
|
659
|
+
IconMenu: q([
|
|
655
660
|
["path", {
|
|
656
661
|
d: "M4 5h16",
|
|
657
662
|
key: "1tepv9"
|
|
@@ -665,7 +670,7 @@ var M = {
|
|
|
665
670
|
key: "1djgab"
|
|
666
671
|
}]
|
|
667
672
|
]),
|
|
668
|
-
IconPackageCheck:
|
|
673
|
+
IconPackageCheck: q([
|
|
669
674
|
["path", {
|
|
670
675
|
d: "M12 22V12",
|
|
671
676
|
key: "d0xqtd"
|
|
@@ -687,7 +692,7 @@ var M = {
|
|
|
687
692
|
key: "9yrvtv"
|
|
688
693
|
}]
|
|
689
694
|
]),
|
|
690
|
-
IconRefreshCw:
|
|
695
|
+
IconRefreshCw: q([
|
|
691
696
|
["path", {
|
|
692
697
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
693
698
|
key: "v9h5vc"
|
|
@@ -705,14 +710,14 @@ var M = {
|
|
|
705
710
|
key: "1cv678"
|
|
706
711
|
}]
|
|
707
712
|
]),
|
|
708
|
-
IconRotateCw:
|
|
713
|
+
IconRotateCw: q([["path", {
|
|
709
714
|
d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",
|
|
710
715
|
key: "1p45f6"
|
|
711
716
|
}], ["path", {
|
|
712
717
|
d: "M21 3v5h-5",
|
|
713
718
|
key: "1q7to0"
|
|
714
719
|
}]]),
|
|
715
|
-
IconSearch:
|
|
720
|
+
IconSearch: q([["path", {
|
|
716
721
|
d: "m21 21-4.34-4.34",
|
|
717
722
|
key: "14j7rj"
|
|
718
723
|
}], ["circle", {
|
|
@@ -721,7 +726,7 @@ var M = {
|
|
|
721
726
|
r: "8",
|
|
722
727
|
key: "4ej97u"
|
|
723
728
|
}]]),
|
|
724
|
-
IconSettings2:
|
|
729
|
+
IconSettings2: q([
|
|
725
730
|
["path", {
|
|
726
731
|
d: "M14 17H5",
|
|
727
732
|
key: "gfn3mx"
|
|
@@ -743,7 +748,7 @@ var M = {
|
|
|
743
748
|
key: "dfmy0x"
|
|
744
749
|
}]
|
|
745
750
|
]),
|
|
746
|
-
IconShieldAlert:
|
|
751
|
+
IconShieldAlert: q([
|
|
747
752
|
["path", {
|
|
748
753
|
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",
|
|
749
754
|
key: "oel41y"
|
|
@@ -757,14 +762,14 @@ var M = {
|
|
|
757
762
|
key: "1drbdi"
|
|
758
763
|
}]
|
|
759
764
|
]),
|
|
760
|
-
IconShieldCheck:
|
|
765
|
+
IconShieldCheck: q([["path", {
|
|
761
766
|
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",
|
|
762
767
|
key: "oel41y"
|
|
763
768
|
}], ["path", {
|
|
764
769
|
d: "m9 12 2 2 4-4",
|
|
765
770
|
key: "dzmm74"
|
|
766
771
|
}]]),
|
|
767
|
-
IconSmartphone:
|
|
772
|
+
IconSmartphone: q([["rect", {
|
|
768
773
|
width: "14",
|
|
769
774
|
height: "20",
|
|
770
775
|
x: "5",
|
|
@@ -776,7 +781,7 @@ var M = {
|
|
|
776
781
|
d: "M12 18h.01",
|
|
777
782
|
key: "mhygvu"
|
|
778
783
|
}]]),
|
|
779
|
-
IconSparkles:
|
|
784
|
+
IconSparkles: q([
|
|
780
785
|
["path", {
|
|
781
786
|
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",
|
|
782
787
|
key: "1s2grr"
|
|
@@ -796,22 +801,22 @@ var M = {
|
|
|
796
801
|
key: "6kqj1y"
|
|
797
802
|
}]
|
|
798
803
|
]),
|
|
799
|
-
IconTable2:
|
|
804
|
+
IconTable2: q([["path", {
|
|
800
805
|
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",
|
|
801
806
|
key: "gugj83"
|
|
802
807
|
}]]),
|
|
803
|
-
IconThermometer:
|
|
808
|
+
IconThermometer: q([["path", {
|
|
804
809
|
d: "M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",
|
|
805
810
|
key: "17jzev"
|
|
806
811
|
}]]),
|
|
807
|
-
IconTrendingUp:
|
|
812
|
+
IconTrendingUp: q([["path", {
|
|
808
813
|
d: "M16 7h6v6",
|
|
809
814
|
key: "box55l"
|
|
810
815
|
}], ["path", {
|
|
811
816
|
d: "m22 7-8.5 8.5-5-5L2 17",
|
|
812
817
|
key: "1t1m79"
|
|
813
818
|
}]]),
|
|
814
|
-
IconUserCheck:
|
|
819
|
+
IconUserCheck: q([
|
|
815
820
|
["path", {
|
|
816
821
|
d: "m16 11 2 2 4-4",
|
|
817
822
|
key: "9rsbq5"
|
|
@@ -827,7 +832,7 @@ var M = {
|
|
|
827
832
|
key: "nufk8"
|
|
828
833
|
}]
|
|
829
834
|
]),
|
|
830
|
-
IconUserRound:
|
|
835
|
+
IconUserRound: q([["circle", {
|
|
831
836
|
cx: "12",
|
|
832
837
|
cy: "8",
|
|
833
838
|
r: "5",
|
|
@@ -836,7 +841,7 @@ var M = {
|
|
|
836
841
|
d: "M20 21a8 8 0 0 0-16 0",
|
|
837
842
|
key: "rfgkzh"
|
|
838
843
|
}]]),
|
|
839
|
-
IconUsers:
|
|
844
|
+
IconUsers: q([
|
|
840
845
|
["path", {
|
|
841
846
|
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
842
847
|
key: "1yyitq"
|
|
@@ -856,7 +861,7 @@ var M = {
|
|
|
856
861
|
key: "nufk8"
|
|
857
862
|
}]
|
|
858
863
|
]),
|
|
859
|
-
IconUserX:
|
|
864
|
+
IconUserX: q([
|
|
860
865
|
["path", {
|
|
861
866
|
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
862
867
|
key: "1yyitq"
|
|
@@ -882,7 +887,7 @@ var M = {
|
|
|
882
887
|
key: "1swrse"
|
|
883
888
|
}]
|
|
884
889
|
]),
|
|
885
|
-
IconVideo:
|
|
890
|
+
IconVideo: q([["path", {
|
|
886
891
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
887
892
|
key: "ftymec"
|
|
888
893
|
}], ["rect", {
|
|
@@ -893,7 +898,7 @@ var M = {
|
|
|
893
898
|
rx: "2",
|
|
894
899
|
key: "158x01"
|
|
895
900
|
}]]),
|
|
896
|
-
IconVideoOff:
|
|
901
|
+
IconVideoOff: q([
|
|
897
902
|
["path", {
|
|
898
903
|
d: "M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196",
|
|
899
904
|
key: "w8jjjt"
|
|
@@ -907,7 +912,7 @@ var M = {
|
|
|
907
912
|
key: "1ooewy"
|
|
908
913
|
}]
|
|
909
914
|
]),
|
|
910
|
-
IconVolume2:
|
|
915
|
+
IconVolume2: q([
|
|
911
916
|
["path", {
|
|
912
917
|
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",
|
|
913
918
|
key: "uqj9uw"
|
|
@@ -921,7 +926,7 @@ var M = {
|
|
|
921
926
|
key: "ijwkga"
|
|
922
927
|
}]
|
|
923
928
|
]),
|
|
924
|
-
IconX:
|
|
929
|
+
IconX: q([["path", {
|
|
925
930
|
d: "M18 6 6 18",
|
|
926
931
|
key: "1bl5f8"
|
|
927
932
|
}], ["path", {
|
|
@@ -929,54 +934,54 @@ var M = {
|
|
|
929
934
|
key: "d8bk6v"
|
|
930
935
|
}]]),
|
|
931
936
|
IconBasket: F,
|
|
932
|
-
IconCheck:
|
|
933
|
-
IconChevron:
|
|
934
|
-
IconCross:
|
|
935
|
-
IconEdit:
|
|
936
|
-
IconErrorCircle:
|
|
937
|
-
IconEye:
|
|
938
|
-
IconEyeOff:
|
|
939
|
-
IconInfo:
|
|
940
|
-
IconInfoCircle:
|
|
941
|
-
IconMinus:
|
|
942
|
-
IconList:
|
|
937
|
+
IconCheck: L,
|
|
938
|
+
IconChevron: R,
|
|
939
|
+
IconCross: z,
|
|
940
|
+
IconEdit: B,
|
|
941
|
+
IconErrorCircle: te,
|
|
942
|
+
IconEye: V,
|
|
943
|
+
IconEyeOff: H,
|
|
944
|
+
IconInfo: U,
|
|
945
|
+
IconInfoCircle: ne,
|
|
946
|
+
IconMinus: re,
|
|
947
|
+
IconList: W,
|
|
943
948
|
IconPanelsTopLeft: ie,
|
|
944
949
|
IconPause: ae,
|
|
945
950
|
IconPlus: oe,
|
|
946
951
|
IconPictureInPicture: se,
|
|
947
|
-
IconPlay:
|
|
948
|
-
IconReplay:
|
|
949
|
-
IconSettings:
|
|
950
|
-
IconFullscreen:
|
|
951
|
-
IconFullscreenExit:
|
|
952
|
-
IconCaptions:
|
|
953
|
-
IconVolume:
|
|
954
|
-
IconVolumeMuted:
|
|
955
|
-
IconSort:
|
|
952
|
+
IconPlay: G,
|
|
953
|
+
IconReplay: K,
|
|
954
|
+
IconSettings: ce,
|
|
955
|
+
IconFullscreen: le,
|
|
956
|
+
IconFullscreenExit: ue,
|
|
957
|
+
IconCaptions: de,
|
|
958
|
+
IconVolume: fe,
|
|
959
|
+
IconVolumeMuted: pe,
|
|
960
|
+
IconSort: me,
|
|
956
961
|
IconSortAscending: he,
|
|
957
962
|
IconSortDescending: ge,
|
|
958
963
|
IconSuccessCircle: _e,
|
|
959
964
|
IconUpload: ve,
|
|
960
965
|
IconWarning: ye
|
|
961
|
-
},
|
|
966
|
+
}, J = ({ name: e, ...n }) => {
|
|
962
967
|
let r = be[e];
|
|
963
968
|
return /* @__PURE__ */ t(r, { ...n });
|
|
964
|
-
},
|
|
969
|
+
}, Y = {
|
|
965
970
|
wrapper: "_wrapper_1seon_1",
|
|
966
971
|
label: "_label_1seon_13",
|
|
967
972
|
input: "_input_1seon_35",
|
|
968
973
|
control: "_control_1seon_49",
|
|
969
974
|
disabled: "_disabled_1seon_95",
|
|
970
975
|
controlError: "_controlError_1seon_121"
|
|
971
|
-
},
|
|
976
|
+
}, xe = ({ 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, ..._ }) => {
|
|
972
977
|
let v = f(), y = p ?? `ds-checkbox-${u ?? v}`, b = h(null), x = a ? `${y}-hint` : void 0, S = o ? `${y}-error` : void 0;
|
|
973
978
|
return d(() => {
|
|
974
979
|
b.current && (b.current.indeterminate = m && !e);
|
|
975
980
|
}, [e, m]), /* @__PURE__ */ n("div", {
|
|
976
|
-
className: `${
|
|
981
|
+
className: `${Y.wrapper} ${l}`,
|
|
977
982
|
children: [
|
|
978
983
|
/* @__PURE__ */ n("label", {
|
|
979
|
-
className: `${
|
|
984
|
+
className: `${Y.label} ${s ? Y.disabled : ""}`,
|
|
980
985
|
htmlFor: y,
|
|
981
986
|
children: [
|
|
982
987
|
/* @__PURE__ */ t("input", {
|
|
@@ -990,20 +995,20 @@ var M = {
|
|
|
990
995
|
"aria-invalid": !!o,
|
|
991
996
|
"aria-describedby": [x, S].filter(Boolean).join(" ") || void 0,
|
|
992
997
|
"aria-label": g,
|
|
993
|
-
className:
|
|
998
|
+
className: Y.input,
|
|
994
999
|
onChange: (e) => {
|
|
995
1000
|
c || r?.(e.target.checked, e);
|
|
996
1001
|
},
|
|
997
1002
|
..._
|
|
998
1003
|
}),
|
|
999
1004
|
/* @__PURE__ */ n("span", {
|
|
1000
|
-
className: `${
|
|
1005
|
+
className: `${Y.control} ${o ? Y.controlError : ""}`,
|
|
1001
1006
|
"aria-hidden": "true",
|
|
1002
|
-
children: [m && !e && /* @__PURE__ */ t(
|
|
1007
|
+
children: [m && !e && /* @__PURE__ */ t(J, {
|
|
1003
1008
|
name: "IconMinus",
|
|
1004
1009
|
width: 16,
|
|
1005
1010
|
height: 16
|
|
1006
|
-
}), e && /* @__PURE__ */ t(
|
|
1011
|
+
}), e && /* @__PURE__ */ t(J, {
|
|
1007
1012
|
name: "IconCheck",
|
|
1008
1013
|
width: 16,
|
|
1009
1014
|
height: 16
|
|
@@ -1023,7 +1028,7 @@ var M = {
|
|
|
1023
1028
|
})
|
|
1024
1029
|
]
|
|
1025
1030
|
});
|
|
1026
|
-
},
|
|
1031
|
+
}, X = {
|
|
1027
1032
|
wrapper: "_wrapper_su17c_1",
|
|
1028
1033
|
trigger: "_trigger_su17c_17",
|
|
1029
1034
|
sm: "_sm_su17c_53",
|
|
@@ -1054,7 +1059,7 @@ var M = {
|
|
|
1054
1059
|
timeLabel: "_timeLabel_su17c_533",
|
|
1055
1060
|
previousMonth: "_previousMonth_su17c_593",
|
|
1056
1061
|
nextMonth: "_nextMonth_su17c_601"
|
|
1057
|
-
},
|
|
1062
|
+
}, Se = [
|
|
1058
1063
|
"Пн",
|
|
1059
1064
|
"Вт",
|
|
1060
1065
|
"Ср",
|
|
@@ -1062,7 +1067,7 @@ var M = {
|
|
|
1062
1067
|
"Пт",
|
|
1063
1068
|
"Сб",
|
|
1064
1069
|
"Вс"
|
|
1065
|
-
],
|
|
1070
|
+
], Ce = [
|
|
1066
1071
|
"Январь",
|
|
1067
1072
|
"Февраль",
|
|
1068
1073
|
"Март",
|
|
@@ -1075,7 +1080,7 @@ var M = {
|
|
|
1075
1080
|
"Октябрь",
|
|
1076
1081
|
"Ноябрь",
|
|
1077
1082
|
"Декабрь"
|
|
1078
|
-
],
|
|
1083
|
+
], we = (e) => String(e).padStart(2, "0"), Te = 8, Ee = "Некорректная дата", De = (e) => e ? `${we(e.getDate())}.${we(e.getMonth() + 1)}.${e.getFullYear()}` : "", Oe = (e) => {
|
|
1079
1084
|
let t = e.replace(/\D/g, "").slice(0, Te);
|
|
1080
1085
|
return [
|
|
1081
1086
|
t.slice(0, 2),
|
|
@@ -1099,7 +1104,7 @@ var M = {
|
|
|
1099
1104
|
return a.getFullYear() !== i || a.getMonth() !== r || a.getDate() !== n ? null : a;
|
|
1100
1105
|
}, Me = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Ne = (e, t) => {
|
|
1101
1106
|
if (!e) return "";
|
|
1102
|
-
let n = `${e.getFullYear()}-${
|
|
1107
|
+
let n = `${e.getFullYear()}-${we(e.getMonth() + 1)}-${we(e.getDate())}`, r = `${we(e.getHours())}:${we(e.getMinutes())}`;
|
|
1103
1108
|
return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
|
|
1104
1109
|
}, Pe = (e, t) => {
|
|
1105
1110
|
if (!e) return null;
|
|
@@ -1121,7 +1126,7 @@ var M = {
|
|
|
1121
1126
|
return Number.isNaN(n.getTime()) ? null : n;
|
|
1122
1127
|
}, Fe = (e, t) => {
|
|
1123
1128
|
if (!e) return "";
|
|
1124
|
-
let n = `${
|
|
1129
|
+
let n = `${we(e.getDate())}.${we(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${we(e.getHours())}:${we(e.getMinutes())}`;
|
|
1125
1130
|
return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
|
|
1126
1131
|
}, Ie = (e) => {
|
|
1127
1132
|
let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
|
|
@@ -1133,17 +1138,17 @@ var M = {
|
|
|
1133
1138
|
let r = Me(e).getTime();
|
|
1134
1139
|
return !!(t && r < Me(t).getTime() || n && r > Me(n).getTime());
|
|
1135
1140
|
}, ze = 8, Be = 6, Ve = ({ 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 = "" }) => {
|
|
1136
|
-
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, te] = g(Ne(r, "time")), [V, H] = g(De(r)), [U, ne] = g(""), [re,
|
|
1141
|
+
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, te] = g(Ne(r, "time")), [V, H] = g(De(r)), [U, ne] = g(""), [re, W] = g(0), [ie, ae] = g(null), oe = m(() => Ie(R), [R]), se = a !== "time", G = a !== "date";
|
|
1137
1142
|
d(() => {
|
|
1138
1143
|
r && z(r), te(Ne(r, "time")), H(De(r));
|
|
1139
1144
|
}, [r]), d(() => () => {
|
|
1140
1145
|
F.current && clearTimeout(F.current);
|
|
1141
1146
|
}, []);
|
|
1142
|
-
let
|
|
1147
|
+
let K = l(() => {
|
|
1143
1148
|
let e = M.current, t = P.current;
|
|
1144
1149
|
if (!e || !t) return;
|
|
1145
1150
|
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 - Be) : n.bottom + Be, u = n.left, d = i - r.width - ze;
|
|
1146
|
-
|
|
1151
|
+
ae({
|
|
1147
1152
|
top: l,
|
|
1148
1153
|
left: Math.max(ze, Math.min(u, d)),
|
|
1149
1154
|
maxHeight: c
|
|
@@ -1151,15 +1156,15 @@ var M = {
|
|
|
1151
1156
|
}, []);
|
|
1152
1157
|
p(() => {
|
|
1153
1158
|
if (!I) {
|
|
1154
|
-
|
|
1159
|
+
ae(null);
|
|
1155
1160
|
return;
|
|
1156
1161
|
}
|
|
1157
|
-
return
|
|
1158
|
-
window.removeEventListener("resize",
|
|
1162
|
+
return K(), window.addEventListener("resize", K), window.addEventListener("scroll", K, !0), () => {
|
|
1163
|
+
window.removeEventListener("resize", K), window.removeEventListener("scroll", K, !0);
|
|
1159
1164
|
};
|
|
1160
1165
|
}, [
|
|
1161
1166
|
I,
|
|
1162
|
-
|
|
1167
|
+
K,
|
|
1163
1168
|
R,
|
|
1164
1169
|
B
|
|
1165
1170
|
]), d(() => {
|
|
@@ -1174,18 +1179,18 @@ var M = {
|
|
|
1174
1179
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1175
1180
|
};
|
|
1176
1181
|
}, [I]);
|
|
1177
|
-
let
|
|
1182
|
+
let ce = (e) => {
|
|
1178
1183
|
if (Re(e, x, S)) return;
|
|
1179
1184
|
let t = a === "date" ? Pe(Ne(e, "date"), "date") : new Date(e);
|
|
1180
1185
|
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), H(De(t)), a === "date" && L(!1));
|
|
1181
|
-
},
|
|
1182
|
-
ne(Ee),
|
|
1186
|
+
}, le = () => {
|
|
1187
|
+
ne(Ee), W((e) => e + 1), F.current && clearTimeout(F.current), F.current = setTimeout(() => {
|
|
1183
1188
|
ne(""), F.current = null;
|
|
1184
1189
|
}, 3e3);
|
|
1185
|
-
},
|
|
1190
|
+
}, ue = (e) => {
|
|
1186
1191
|
let t = e.replace(/\D/g, "").slice(0, Te);
|
|
1187
1192
|
if (!Ae(t)) {
|
|
1188
|
-
|
|
1193
|
+
le();
|
|
1189
1194
|
return;
|
|
1190
1195
|
}
|
|
1191
1196
|
let n = Oe(t);
|
|
@@ -1196,11 +1201,11 @@ var M = {
|
|
|
1196
1201
|
if (t.length < Te) return;
|
|
1197
1202
|
let o = je(n);
|
|
1198
1203
|
if (!o || Re(o, x, S)) {
|
|
1199
|
-
|
|
1204
|
+
le();
|
|
1200
1205
|
return;
|
|
1201
1206
|
}
|
|
1202
1207
|
a === "datetime" && o.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(o), z(o), L(!1), requestAnimationFrame(() => M.current?.blur());
|
|
1203
|
-
},
|
|
1208
|
+
}, de = (e) => {
|
|
1204
1209
|
if (te(e), !e) {
|
|
1205
1210
|
i?.(null);
|
|
1206
1211
|
return;
|
|
@@ -1209,52 +1214,52 @@ var M = {
|
|
|
1209
1214
|
if (!t) return;
|
|
1210
1215
|
let n = new Date(a === "datetime" ? r ?? R : /* @__PURE__ */ new Date());
|
|
1211
1216
|
n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
|
|
1212
|
-
},
|
|
1217
|
+
}, fe = s ?? (a === "date" ? "ДД.ММ.ГГГГ" : a === "time" ? "ЧЧ:ММ" : "ДД.ММ.ГГГГ ЧЧ:ММ"), pe = U ? `${O}-validation` : void 0, me = [
|
|
1213
1218
|
k,
|
|
1214
1219
|
A,
|
|
1215
|
-
|
|
1216
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1220
|
+
pe
|
|
1221
|
+
].filter(Boolean).join(" ") || void 0, he = I && !y ? /* @__PURE__ */ n("div", {
|
|
1217
1222
|
ref: P,
|
|
1218
|
-
className:
|
|
1223
|
+
className: X.panel,
|
|
1219
1224
|
role: "dialog",
|
|
1220
|
-
"aria-label": o ??
|
|
1221
|
-
style:
|
|
1222
|
-
top:
|
|
1223
|
-
left:
|
|
1224
|
-
maxHeight:
|
|
1225
|
+
"aria-label": o ?? fe,
|
|
1226
|
+
style: ie ? {
|
|
1227
|
+
top: ie.top,
|
|
1228
|
+
left: ie.left,
|
|
1229
|
+
maxHeight: ie.maxHeight
|
|
1225
1230
|
} : {
|
|
1226
1231
|
visibility: "hidden",
|
|
1227
1232
|
top: 0,
|
|
1228
1233
|
left: 0
|
|
1229
1234
|
},
|
|
1230
|
-
children: [
|
|
1235
|
+
children: [se && /* @__PURE__ */ n(e, { children: [
|
|
1231
1236
|
/* @__PURE__ */ n("div", {
|
|
1232
|
-
className:
|
|
1237
|
+
className: X.calendarHeader,
|
|
1233
1238
|
children: [
|
|
1234
1239
|
/* @__PURE__ */ t("button", {
|
|
1235
1240
|
type: "button",
|
|
1236
|
-
className:
|
|
1241
|
+
className: X.nav,
|
|
1237
1242
|
"aria-label": "Предыдущий месяц",
|
|
1238
1243
|
onClick: () => z(new Date(R.getFullYear(), R.getMonth() - 1, 1)),
|
|
1239
|
-
children: /* @__PURE__ */ t(
|
|
1244
|
+
children: /* @__PURE__ */ t(J, {
|
|
1240
1245
|
name: "IconChevron",
|
|
1241
1246
|
width: 20,
|
|
1242
1247
|
height: 20,
|
|
1243
|
-
className:
|
|
1248
|
+
className: X.previousMonth
|
|
1244
1249
|
})
|
|
1245
1250
|
}),
|
|
1246
1251
|
/* @__PURE__ */ t("select", {
|
|
1247
|
-
className:
|
|
1252
|
+
className: X.monthSelect,
|
|
1248
1253
|
"aria-label": "Месяц",
|
|
1249
1254
|
value: R.getMonth(),
|
|
1250
1255
|
onChange: (e) => z(new Date(R.getFullYear(), Number(e.target.value), 1)),
|
|
1251
|
-
children:
|
|
1256
|
+
children: Ce.map((e, n) => /* @__PURE__ */ t("option", {
|
|
1252
1257
|
value: n,
|
|
1253
1258
|
children: e
|
|
1254
1259
|
}, e))
|
|
1255
1260
|
}),
|
|
1256
1261
|
/* @__PURE__ */ t("input", {
|
|
1257
|
-
className:
|
|
1262
|
+
className: X.yearInput,
|
|
1258
1263
|
type: "number",
|
|
1259
1264
|
"aria-label": "Год",
|
|
1260
1265
|
value: R.getFullYear(),
|
|
@@ -1262,49 +1267,49 @@ var M = {
|
|
|
1262
1267
|
}),
|
|
1263
1268
|
/* @__PURE__ */ t("button", {
|
|
1264
1269
|
type: "button",
|
|
1265
|
-
className:
|
|
1270
|
+
className: X.nav,
|
|
1266
1271
|
"aria-label": "Следующий месяц",
|
|
1267
1272
|
onClick: () => z(new Date(R.getFullYear(), R.getMonth() + 1, 1)),
|
|
1268
|
-
children: /* @__PURE__ */ t(
|
|
1273
|
+
children: /* @__PURE__ */ t(J, {
|
|
1269
1274
|
name: "IconChevron",
|
|
1270
1275
|
width: 20,
|
|
1271
1276
|
height: 20,
|
|
1272
|
-
className:
|
|
1277
|
+
className: X.nextMonth
|
|
1273
1278
|
})
|
|
1274
1279
|
})
|
|
1275
1280
|
]
|
|
1276
1281
|
}),
|
|
1277
1282
|
/* @__PURE__ */ t("div", {
|
|
1278
|
-
className:
|
|
1279
|
-
children:
|
|
1283
|
+
className: X.weekdays,
|
|
1284
|
+
children: Se.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
|
|
1280
1285
|
}),
|
|
1281
1286
|
/* @__PURE__ */ t("div", {
|
|
1282
|
-
className:
|
|
1283
|
-
children:
|
|
1287
|
+
className: X.days,
|
|
1288
|
+
children: oe.map((e) => {
|
|
1284
1289
|
let n = Le(r, e);
|
|
1285
1290
|
return /* @__PURE__ */ t("button", {
|
|
1286
1291
|
type: "button",
|
|
1287
|
-
className: `${
|
|
1292
|
+
className: `${X.day} ${e.getMonth() === R.getMonth() ? "" : X.outside} ${n ? X.selected : ""}`,
|
|
1288
1293
|
disabled: Re(e, x, S),
|
|
1289
1294
|
"aria-pressed": n,
|
|
1290
|
-
onClick: () =>
|
|
1295
|
+
onClick: () => ce(e),
|
|
1291
1296
|
children: e.getDate()
|
|
1292
1297
|
}, e.toISOString());
|
|
1293
1298
|
})
|
|
1294
1299
|
})
|
|
1295
|
-
] }),
|
|
1296
|
-
className:
|
|
1300
|
+
] }), G && /* @__PURE__ */ n("label", {
|
|
1301
|
+
className: X.timeLabel,
|
|
1297
1302
|
children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
|
|
1298
|
-
className:
|
|
1303
|
+
className: X.timeInput,
|
|
1299
1304
|
type: "time",
|
|
1300
1305
|
value: B,
|
|
1301
|
-
onChange: (e) =>
|
|
1306
|
+
onChange: (e) => de(e.target.value)
|
|
1302
1307
|
})]
|
|
1303
1308
|
})]
|
|
1304
1309
|
}) : null;
|
|
1305
1310
|
return /* @__PURE__ */ n("div", {
|
|
1306
1311
|
ref: j,
|
|
1307
|
-
className: `${
|
|
1312
|
+
className: `${X.wrapper} ${E}`,
|
|
1308
1313
|
children: [
|
|
1309
1314
|
o && /* @__PURE__ */ t(ee, {
|
|
1310
1315
|
htmlFor: O,
|
|
@@ -1312,16 +1317,16 @@ var M = {
|
|
|
1312
1317
|
disabled: v,
|
|
1313
1318
|
children: o
|
|
1314
1319
|
}),
|
|
1315
|
-
|
|
1316
|
-
className: `${
|
|
1320
|
+
se ? /* @__PURE__ */ n("div", {
|
|
1321
|
+
className: `${X.trigger} ${X[C]} ${u ? X.error : ""} ${v ? X.disabled : ""}`,
|
|
1317
1322
|
children: [
|
|
1318
1323
|
/* @__PURE__ */ t("input", {
|
|
1319
1324
|
ref: M,
|
|
1320
1325
|
id: O,
|
|
1321
1326
|
name: T,
|
|
1322
|
-
className:
|
|
1327
|
+
className: X.dateInput,
|
|
1323
1328
|
value: V,
|
|
1324
|
-
placeholder:
|
|
1329
|
+
placeholder: fe.split(" ")[0],
|
|
1325
1330
|
inputMode: "numeric",
|
|
1326
1331
|
autoComplete: "off",
|
|
1327
1332
|
maxLength: 10,
|
|
@@ -1329,7 +1334,7 @@ var M = {
|
|
|
1329
1334
|
readOnly: y,
|
|
1330
1335
|
"aria-expanded": I,
|
|
1331
1336
|
"aria-haspopup": "dialog",
|
|
1332
|
-
"aria-describedby":
|
|
1337
|
+
"aria-describedby": me,
|
|
1333
1338
|
"aria-invalid": !!(u || U) || void 0,
|
|
1334
1339
|
onFocus: () => {
|
|
1335
1340
|
y || L(!0);
|
|
@@ -1337,15 +1342,15 @@ var M = {
|
|
|
1337
1342
|
onClick: () => {
|
|
1338
1343
|
y || L(!0);
|
|
1339
1344
|
},
|
|
1340
|
-
onChange: (e) =>
|
|
1345
|
+
onChange: (e) => ue(e.target.value)
|
|
1341
1346
|
}),
|
|
1342
1347
|
a === "datetime" && B && /* @__PURE__ */ t("span", {
|
|
1343
|
-
className:
|
|
1348
|
+
className: X.timeValue,
|
|
1344
1349
|
children: B
|
|
1345
1350
|
}),
|
|
1346
1351
|
/* @__PURE__ */ t("button", {
|
|
1347
1352
|
type: "button",
|
|
1348
|
-
className:
|
|
1353
|
+
className: X.chevronButton,
|
|
1349
1354
|
disabled: v || y,
|
|
1350
1355
|
"aria-label": I ? "Закрыть календарь" : "Открыть календарь",
|
|
1351
1356
|
tabIndex: -1,
|
|
@@ -1354,9 +1359,9 @@ var M = {
|
|
|
1354
1359
|
L((e) => !e), M.current?.focus();
|
|
1355
1360
|
},
|
|
1356
1361
|
children: /* @__PURE__ */ t("span", {
|
|
1357
|
-
className: `${
|
|
1362
|
+
className: `${X.chevron} ${he ? X.chevronOpen : ""}`,
|
|
1358
1363
|
"aria-hidden": "true",
|
|
1359
|
-
children: /* @__PURE__ */ t(
|
|
1364
|
+
children: /* @__PURE__ */ t(J, {
|
|
1360
1365
|
name: "IconChevron",
|
|
1361
1366
|
width: 20,
|
|
1362
1367
|
height: 20
|
|
@@ -1369,22 +1374,22 @@ var M = {
|
|
|
1369
1374
|
id: O,
|
|
1370
1375
|
name: T,
|
|
1371
1376
|
type: "button",
|
|
1372
|
-
className: `${
|
|
1377
|
+
className: `${X.trigger} ${X[C]} ${u ? X.error : ""}`,
|
|
1373
1378
|
disabled: v,
|
|
1374
1379
|
"aria-readonly": y || void 0,
|
|
1375
1380
|
"aria-expanded": I,
|
|
1376
1381
|
"aria-haspopup": "dialog",
|
|
1377
|
-
"aria-describedby":
|
|
1382
|
+
"aria-describedby": me,
|
|
1378
1383
|
onClick: () => {
|
|
1379
1384
|
y || L((e) => !e);
|
|
1380
1385
|
},
|
|
1381
1386
|
children: [/* @__PURE__ */ t("span", {
|
|
1382
|
-
className: r ?
|
|
1383
|
-
children: Fe(r, a) ||
|
|
1387
|
+
className: r ? X.value : X.placeholder,
|
|
1388
|
+
children: Fe(r, a) || fe
|
|
1384
1389
|
}), /* @__PURE__ */ t("span", {
|
|
1385
|
-
className: `${
|
|
1390
|
+
className: `${X.chevron} ${he ? X.chevronOpen : ""}`,
|
|
1386
1391
|
"aria-hidden": "true",
|
|
1387
|
-
children: /* @__PURE__ */ t(
|
|
1392
|
+
children: /* @__PURE__ */ t(J, {
|
|
1388
1393
|
name: "IconChevron",
|
|
1389
1394
|
width: 20,
|
|
1390
1395
|
height: 20
|
|
@@ -1392,13 +1397,13 @@ var M = {
|
|
|
1392
1397
|
})]
|
|
1393
1398
|
}),
|
|
1394
1399
|
U && /* @__PURE__ */ t("span", {
|
|
1395
|
-
id:
|
|
1396
|
-
className:
|
|
1400
|
+
id: pe,
|
|
1401
|
+
className: X.validationTooltip,
|
|
1397
1402
|
role: "status",
|
|
1398
1403
|
"aria-live": "polite",
|
|
1399
1404
|
children: U
|
|
1400
1405
|
}, re),
|
|
1401
|
-
|
|
1406
|
+
he && _(he, document.body),
|
|
1402
1407
|
c && !u && /* @__PURE__ */ t(N, {
|
|
1403
1408
|
id: k,
|
|
1404
1409
|
children: c
|
|
@@ -1471,7 +1476,7 @@ var M = {
|
|
|
1471
1476
|
height: r
|
|
1472
1477
|
}
|
|
1473
1478
|
}, o))
|
|
1474
|
-
}),
|
|
1479
|
+
}), Z = {
|
|
1475
1480
|
wrapper: "_wrapper_6g3qd_1",
|
|
1476
1481
|
container: "_container_6g3qd_17",
|
|
1477
1482
|
trigger: "_trigger_6g3qd_25",
|
|
@@ -1549,7 +1554,7 @@ var M = {
|
|
|
1549
1554
|
}, ne = k ? /* @__PURE__ */ t("ul", {
|
|
1550
1555
|
ref: F,
|
|
1551
1556
|
id: O,
|
|
1552
|
-
className:
|
|
1557
|
+
className: Z.menu,
|
|
1553
1558
|
role: "listbox",
|
|
1554
1559
|
"aria-label": c,
|
|
1555
1560
|
style: j ? {
|
|
@@ -1578,9 +1583,9 @@ var M = {
|
|
|
1578
1583
|
"aria-selected": o,
|
|
1579
1584
|
disabled: i.disabled,
|
|
1580
1585
|
className: [
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
o ?
|
|
1586
|
+
Z[v],
|
|
1587
|
+
Z.option,
|
|
1588
|
+
o ? Z.selected : ""
|
|
1584
1589
|
].filter(Boolean).join(" "),
|
|
1585
1590
|
onClick: () => U(i),
|
|
1586
1591
|
onKeyDown: (t) => {
|
|
@@ -1596,7 +1601,7 @@ var M = {
|
|
|
1596
1601
|
}
|
|
1597
1602
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), U(i));
|
|
1598
1603
|
},
|
|
1599
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(
|
|
1604
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(J, {
|
|
1600
1605
|
name: "IconCheck",
|
|
1601
1606
|
width: 16,
|
|
1602
1607
|
height: 16
|
|
@@ -1608,8 +1613,8 @@ var M = {
|
|
|
1608
1613
|
return /* @__PURE__ */ n("div", {
|
|
1609
1614
|
ref: N,
|
|
1610
1615
|
className: [
|
|
1611
|
-
|
|
1612
|
-
u ?
|
|
1616
|
+
Z.wrapper,
|
|
1617
|
+
u ? Z.errorState : "",
|
|
1613
1618
|
b
|
|
1614
1619
|
].filter(Boolean).join(" "),
|
|
1615
1620
|
children: [
|
|
@@ -1620,10 +1625,10 @@ var M = {
|
|
|
1620
1625
|
children: c
|
|
1621
1626
|
}),
|
|
1622
1627
|
/* @__PURE__ */ t("div", {
|
|
1623
|
-
className:
|
|
1628
|
+
className: Z.container,
|
|
1624
1629
|
children: te ? /* @__PURE__ */ t("div", {
|
|
1625
1630
|
id: D,
|
|
1626
|
-
className:
|
|
1631
|
+
className: Z.disabledText,
|
|
1627
1632
|
"aria-describedby": B,
|
|
1628
1633
|
children: L?.label ?? a
|
|
1629
1634
|
}) : /* @__PURE__ */ n("button", {
|
|
@@ -1631,7 +1636,7 @@ var M = {
|
|
|
1631
1636
|
id: D,
|
|
1632
1637
|
type: "button",
|
|
1633
1638
|
name: S,
|
|
1634
|
-
className: `${
|
|
1639
|
+
className: `${Z.trigger} ${Z[v]}`,
|
|
1635
1640
|
disabled: o,
|
|
1636
1641
|
"aria-haspopup": "listbox",
|
|
1637
1642
|
"aria-expanded": k,
|
|
@@ -1654,13 +1659,13 @@ var M = {
|
|
|
1654
1659
|
}
|
|
1655
1660
|
},
|
|
1656
1661
|
children: [/* @__PURE__ */ t("span", {
|
|
1657
|
-
className: `${L ?
|
|
1658
|
-
${
|
|
1662
|
+
className: `${L ? Z.value : Z.placeholder}
|
|
1663
|
+
${Z[v]}`,
|
|
1659
1664
|
children: L?.label ?? a
|
|
1660
1665
|
}), /* @__PURE__ */ t("span", {
|
|
1661
|
-
className: [
|
|
1666
|
+
className: [Z.chevron, k ? Z.chevronOpen : ""].filter(Boolean).join(" "),
|
|
1662
1667
|
"aria-hidden": "true",
|
|
1663
|
-
children: /* @__PURE__ */ t(
|
|
1668
|
+
children: /* @__PURE__ */ t(J, {
|
|
1664
1669
|
name: "IconChevron",
|
|
1665
1670
|
width: 20,
|
|
1666
1671
|
height: 20
|
|
@@ -1671,12 +1676,12 @@ var M = {
|
|
|
1671
1676
|
k && _(ne, document.body),
|
|
1672
1677
|
y && !u && /* @__PURE__ */ t("span", {
|
|
1673
1678
|
id: R,
|
|
1674
|
-
className:
|
|
1679
|
+
className: Z.message,
|
|
1675
1680
|
children: y
|
|
1676
1681
|
}),
|
|
1677
1682
|
u && /* @__PURE__ */ t("span", {
|
|
1678
1683
|
id: z,
|
|
1679
|
-
className:
|
|
1684
|
+
className: Z.error,
|
|
1680
1685
|
children: u
|
|
1681
1686
|
})
|
|
1682
1687
|
]
|
|
@@ -1712,618 +1717,134 @@ var M = {
|
|
|
1712
1717
|
});
|
|
1713
1718
|
}
|
|
1714
1719
|
});
|
|
1715
|
-
},
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
},
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
}
|
|
1810
|
-
|
|
1811
|
-
let t = Date.parse(String(e));
|
|
1812
|
-
return Number.isNaN(t) ? null : t;
|
|
1813
|
-
}, lt = (e, t, n) => {
|
|
1814
|
-
let r = ct(e.getValue(n)), i = ct(t.getValue(n));
|
|
1815
|
-
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
1816
|
-
}, ut = (e, t, n) => {
|
|
1817
|
-
let r = e.getValue(n), i = t.getValue(n);
|
|
1818
|
-
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
1819
|
-
}, dt = (e, t, n) => {
|
|
1820
|
-
let r = e.getValue(n), i = t.getValue(n);
|
|
1821
|
-
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
1822
|
-
}, ft = (e, t, n) => {
|
|
1823
|
-
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
1824
|
-
return r.localeCompare(i, void 0, {
|
|
1825
|
-
numeric: !0,
|
|
1826
|
-
sensitivity: "base"
|
|
1720
|
+
}, tt = {
|
|
1721
|
+
wrapper: "_wrapper_1khfq_1",
|
|
1722
|
+
control: "_control_1khfq_15",
|
|
1723
|
+
input: "_input_1khfq_25",
|
|
1724
|
+
disabledText: "_disabledText_1khfq_25",
|
|
1725
|
+
sm: "_sm_1khfq_107",
|
|
1726
|
+
md: "_md_1khfq_123",
|
|
1727
|
+
lg: "_lg_1khfq_139",
|
|
1728
|
+
inputError: "_inputError_1khfq_155",
|
|
1729
|
+
trailingAction: "_trailingAction_1khfq_163"
|
|
1730
|
+
}, nt = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: s = !1, stringWhileDisabled: c = !1, label: l, error: u, hint: p, className: m = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: w = "Скрыть пароль", passwordHiddenLabel: T = "Показать пароль", onFocus: E, ...D }) => {
|
|
1731
|
+
let O = f(), k = v ?? `ds-input-${_ ?? O}`, A = h(null), [j, M] = g(!1), P = p ? `${k}-hint` : void 0, F = u ? `${k}-error` : void 0, I = String(e ?? ""), L = [P, F].filter(Boolean).join(" ") || void 0, R = C ? j ? "text" : "password" : i;
|
|
1732
|
+
return d(() => {
|
|
1733
|
+
C || M(!1);
|
|
1734
|
+
}, [C]), /* @__PURE__ */ n("div", {
|
|
1735
|
+
className: `${tt.wrapper} ${m}`,
|
|
1736
|
+
children: [
|
|
1737
|
+
l && /* @__PURE__ */ t(ee, {
|
|
1738
|
+
htmlFor: k,
|
|
1739
|
+
required: x,
|
|
1740
|
+
disabled: o,
|
|
1741
|
+
children: l
|
|
1742
|
+
}),
|
|
1743
|
+
o && c ? /* @__PURE__ */ t("div", {
|
|
1744
|
+
id: k,
|
|
1745
|
+
className: tt.disabledText,
|
|
1746
|
+
"aria-describedby": L,
|
|
1747
|
+
children: I || a
|
|
1748
|
+
}) : /* @__PURE__ */ n("div", {
|
|
1749
|
+
className: tt.control,
|
|
1750
|
+
children: [
|
|
1751
|
+
/* @__PURE__ */ t("input", {
|
|
1752
|
+
ref: A,
|
|
1753
|
+
id: k,
|
|
1754
|
+
name: _,
|
|
1755
|
+
type: R,
|
|
1756
|
+
value: I,
|
|
1757
|
+
placeholder: a,
|
|
1758
|
+
disabled: o,
|
|
1759
|
+
readOnly: s,
|
|
1760
|
+
required: x,
|
|
1761
|
+
"aria-invalid": !!u,
|
|
1762
|
+
"aria-describedby": L,
|
|
1763
|
+
className: `${tt.input} ${tt[y]} ${u ? tt.inputError : ""}`,
|
|
1764
|
+
onChange: (e) => {
|
|
1765
|
+
if (i === "number" && !C) {
|
|
1766
|
+
let t = e.target.value === "" ? "" : Number(e.target.value);
|
|
1767
|
+
r?.(t, e);
|
|
1768
|
+
return;
|
|
1769
|
+
}
|
|
1770
|
+
r?.(e.target.value, e);
|
|
1771
|
+
},
|
|
1772
|
+
onFocus: (e) => {
|
|
1773
|
+
S && e.currentTarget.value && e.currentTarget.select(), E?.(e);
|
|
1774
|
+
},
|
|
1775
|
+
...D
|
|
1776
|
+
}),
|
|
1777
|
+
C && /* @__PURE__ */ t("button", {
|
|
1778
|
+
type: "button",
|
|
1779
|
+
className: tt.trailingAction,
|
|
1780
|
+
disabled: o,
|
|
1781
|
+
"aria-label": j ? w : T,
|
|
1782
|
+
"aria-pressed": j,
|
|
1783
|
+
onClick: () => M((e) => !e),
|
|
1784
|
+
children: /* @__PURE__ */ t(J, {
|
|
1785
|
+
name: j ? "IconEyeOff" : "IconEye",
|
|
1786
|
+
width: 20,
|
|
1787
|
+
height: 20
|
|
1788
|
+
})
|
|
1789
|
+
}),
|
|
1790
|
+
!C && b && I && !o && !s && /* @__PURE__ */ t("button", {
|
|
1791
|
+
type: "button",
|
|
1792
|
+
className: tt.trailingAction,
|
|
1793
|
+
"aria-label": "Очистить поле",
|
|
1794
|
+
onClick: () => {
|
|
1795
|
+
let e = A.current;
|
|
1796
|
+
e && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
|
|
1797
|
+
},
|
|
1798
|
+
children: /* @__PURE__ */ t(J, {
|
|
1799
|
+
name: "IconCross",
|
|
1800
|
+
width: 20,
|
|
1801
|
+
height: 20
|
|
1802
|
+
})
|
|
1803
|
+
})
|
|
1804
|
+
]
|
|
1805
|
+
}),
|
|
1806
|
+
p && !u && /* @__PURE__ */ t(N, {
|
|
1807
|
+
id: P,
|
|
1808
|
+
children: p
|
|
1809
|
+
}),
|
|
1810
|
+
u && /* @__PURE__ */ t(N, {
|
|
1811
|
+
id: F,
|
|
1812
|
+
variant: "error",
|
|
1813
|
+
children: u
|
|
1814
|
+
})
|
|
1815
|
+
]
|
|
1827
1816
|
});
|
|
1828
|
-
},
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
case "text":
|
|
1834
|
-
case void 0: return ft;
|
|
1835
|
-
case "custom": return;
|
|
1817
|
+
}, rt = 8, it = 6, at = 120, ot = (e) => {
|
|
1818
|
+
if (typeof e == "number") return e;
|
|
1819
|
+
if (typeof e == "string") {
|
|
1820
|
+
let t = Number.parseFloat(e);
|
|
1821
|
+
if (Number.isFinite(t)) return t;
|
|
1836
1822
|
}
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
let t = new Set(z);
|
|
1854
|
-
return e.filter((e) => t.has(e.id));
|
|
1855
|
-
}, [e, z]), he = m(() => G.length === 0 ? "Должна быть видима хотя бы одна колонка" : ot(G, i), [i, G]), ge = m(() => G.map(mt), [G]), _e = G.some((e) => rt(e) !== void 0), ve = x({
|
|
1856
|
-
features: tt,
|
|
1857
|
-
columns: ge,
|
|
1858
|
-
data: i,
|
|
1859
|
-
state: { sorting: de },
|
|
1860
|
-
onSortingChange: (e) => {
|
|
1861
|
-
let t = typeof e == "function" ? e(de) : e;
|
|
1862
|
-
c === void 0 && ae(t), ue(0), l?.(t);
|
|
1863
|
-
},
|
|
1864
|
-
getRowId: f
|
|
1865
|
-
}), ye = ve.getRowModel().rows, K = me && Number.isFinite(L) && Number(L) >= 0 ? Math.floor(Number(L)) : ye.length, be = N ? Math.max(1, Math.ceil(K / pe)) : 1, xe = Number.isFinite(F) && F > 0 ? Math.floor(F) - 1 : 0, J = Math.min(me ? xe : W, be - 1), Ce = m(() => N && !me ? ye.slice(J * pe, (J + 1) * pe) : ye, [
|
|
1866
|
-
me,
|
|
1867
|
-
pe,
|
|
1868
|
-
N,
|
|
1869
|
-
J,
|
|
1870
|
-
ye
|
|
1871
|
-
]), we = E ?? oe, Y = m(() => new Set(we), [we]), Te = H ?? ce, Ee = m(() => new Set(Te), [Te]), De = m(() => Ce.map((e) => e.id), [Ce]), Oe = De.filter((e) => Y.has(e)).length, ke = De.length > 0 && Oe === De.length, Ae = Oe > 0 && !ke, je = m(() => G.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
1872
|
-
id: e.id,
|
|
1873
|
-
label: typeof e.header == "string" ? e.header : e.id
|
|
1874
|
-
})), [G]), Me = m(() => at(J, be), [be, J]), Ne = o === void 0 ? a : o === "table", Pe = [
|
|
1875
|
-
Z.root,
|
|
1876
|
-
s === "wide" ? Z.wide : Z.default,
|
|
1877
|
-
Ne ? Z.tableOnMobile : "",
|
|
1878
|
-
B === "compact" ? Z.compact : "",
|
|
1879
|
-
C
|
|
1880
|
-
].filter(Boolean).join(" "), Fe = he ?? v, Ie = N && !Fe && K > pe && (!_ || me), Le = J * pe + 1, Re = Math.min((J + 1) * pe, K), ze = (e) => {
|
|
1881
|
-
let t = Math.max(0, Math.min(be - 1, e));
|
|
1882
|
-
if (me) {
|
|
1883
|
-
t !== J && R?.(t + 1);
|
|
1823
|
+
return Infinity;
|
|
1824
|
+
}, st = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: w = !1, needMark: T = !0, maxMenuHeight: E }) => {
|
|
1825
|
+
let D = f(), O = C ?? `ds-dropdown-multiple-${S ?? D}`, k = `${O}-listbox`, [A, j] = g(!1), [M, N] = g(null), P = h(null), F = h(null), I = h(null), L = h([]), R = m(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${O}-hint` : void 0, B = u ? `${O}-error` : void 0, te = [z, B].filter(Boolean).join(" ") || void 0, V = o && s, H = l(() => {
|
|
1826
|
+
let e = F.current, t = I.current;
|
|
1827
|
+
if (!e || !t) return;
|
|
1828
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - rt, a = n.top - rt, o = i < r.height && a > i, s = Math.max(at, o ? a : i), c = window.innerWidth - n.width - rt;
|
|
1829
|
+
N({
|
|
1830
|
+
top: o ? Math.max(rt, n.top - r.height - it) : n.bottom + it,
|
|
1831
|
+
left: Math.max(rt, Math.min(n.left, c)),
|
|
1832
|
+
width: n.width,
|
|
1833
|
+
maxHeight: Math.min(s, ot(E))
|
|
1834
|
+
});
|
|
1835
|
+
}, [E]);
|
|
1836
|
+
p(() => {
|
|
1837
|
+
if (!A) {
|
|
1838
|
+
N(null);
|
|
1884
1839
|
return;
|
|
1885
1840
|
}
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
E === void 0 && se(t), D?.(t);
|
|
1890
|
-
}, Ve = (e) => {
|
|
1891
|
-
let t = new Set(Y);
|
|
1892
|
-
t.has(e) ? t.delete(e) : t.add(e), Be(t);
|
|
1893
|
-
}, He = () => {
|
|
1894
|
-
let e = nt(Y, De, !ke);
|
|
1895
|
-
E === void 0 && se(e), D?.(e);
|
|
1896
|
-
}, Ue = () => Be(/* @__PURE__ */ new Set()), We = (e) => {
|
|
1897
|
-
let t = new Set(Ee);
|
|
1898
|
-
t.has(e) ? t.delete(e) : t.add(e);
|
|
1899
|
-
let n = Array.from(t);
|
|
1900
|
-
H === void 0 && le(n), U?.(n);
|
|
1901
|
-
}, Ge = i.filter((e, t) => Y.has(f?.(e, t) ?? String(t))), X = re?.({
|
|
1902
|
-
visibleCount: Ce.length,
|
|
1903
|
-
totalCount: K,
|
|
1904
|
-
selectedCount: Y.size
|
|
1905
|
-
}) ?? `Показано строк: ${Ce.length} из ${K}. Выбрано: ${Y.size}.`;
|
|
1906
|
-
return d(() => {
|
|
1907
|
-
me || ue(0);
|
|
1841
|
+
return H(), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
|
|
1842
|
+
window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
|
|
1843
|
+
};
|
|
1908
1844
|
}, [
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
N,
|
|
1913
|
-
fe
|
|
1914
|
-
]), d(() => {
|
|
1915
|
-
!me && W >= be && ue(be - 1);
|
|
1916
|
-
}, [
|
|
1917
|
-
me,
|
|
1918
|
-
be,
|
|
1919
|
-
W
|
|
1920
|
-
]), /* @__PURE__ */ n("section", {
|
|
1921
|
-
className: Pe,
|
|
1922
|
-
"aria-busy": _,
|
|
1923
|
-
children: [
|
|
1924
|
-
/* @__PURE__ */ t("div", {
|
|
1925
|
-
className: Z.srOnly,
|
|
1926
|
-
"aria-live": "polite",
|
|
1927
|
-
"aria-atomic": "true",
|
|
1928
|
-
children: X
|
|
1929
|
-
}),
|
|
1930
|
-
te && Y.size > 0 && /* @__PURE__ */ t("div", {
|
|
1931
|
-
className: Z.bulkActions,
|
|
1932
|
-
role: "region",
|
|
1933
|
-
"aria-label": "Действия с выбранными строками",
|
|
1934
|
-
children: te({
|
|
1935
|
-
selectedRowIds: Array.from(Y),
|
|
1936
|
-
selectedRows: Ge,
|
|
1937
|
-
clearSelection: Ue
|
|
1938
|
-
})
|
|
1939
|
-
}),
|
|
1940
|
-
!Ne && !_ && !Fe && Ce.length > 0 && je.length > 0 && /* @__PURE__ */ t(et, {
|
|
1941
|
-
className: Z.mobileSort,
|
|
1942
|
-
options: je,
|
|
1943
|
-
value: de[0] ? {
|
|
1944
|
-
id: de[0].id,
|
|
1945
|
-
direction: de[0].desc ? "desc" : "asc"
|
|
1946
|
-
} : null,
|
|
1947
|
-
onChange: (e) => ve.setSorting([{
|
|
1948
|
-
id: e.id,
|
|
1949
|
-
desc: e.direction === "desc"
|
|
1950
|
-
}])
|
|
1951
|
-
}),
|
|
1952
|
-
/* @__PURE__ */ t("div", {
|
|
1953
|
-
className: Z.tableWrap,
|
|
1954
|
-
style: { maxHeight: S },
|
|
1955
|
-
children: /* @__PURE__ */ n("table", {
|
|
1956
|
-
className: Z.table,
|
|
1957
|
-
"aria-label": h,
|
|
1958
|
-
children: [
|
|
1959
|
-
p && /* @__PURE__ */ t("caption", { children: p }),
|
|
1960
|
-
(_e || T || !!V) && /* @__PURE__ */ n("colgroup", { children: [
|
|
1961
|
-
V && /* @__PURE__ */ t("col", { className: Z.expansionColumn }),
|
|
1962
|
-
T && /* @__PURE__ */ t("col", { className: Z.selectionColumn }),
|
|
1963
|
-
G.map((e) => /* @__PURE__ */ t("col", { style: rt(e) }, e.id))
|
|
1964
|
-
] }),
|
|
1965
|
-
/* @__PURE__ */ t("thead", {
|
|
1966
|
-
className: b ? Z.sticky : "",
|
|
1967
|
-
children: ve.getHeaderGroups().map((e) => /* @__PURE__ */ n("tr", { children: [
|
|
1968
|
-
V && /* @__PURE__ */ t("th", {
|
|
1969
|
-
className: Z.expansionCell,
|
|
1970
|
-
scope: "col",
|
|
1971
|
-
children: /* @__PURE__ */ t("span", {
|
|
1972
|
-
className: Z.srOnly,
|
|
1973
|
-
children: "Подробности"
|
|
1974
|
-
})
|
|
1975
|
-
}),
|
|
1976
|
-
T && /* @__PURE__ */ t("th", {
|
|
1977
|
-
className: Z.selectionHeaderCell,
|
|
1978
|
-
scope: "col",
|
|
1979
|
-
children: /* @__PURE__ */ n("div", {
|
|
1980
|
-
className: Z.selectionHeaderControls,
|
|
1981
|
-
children: [/* @__PURE__ */ t(Se, {
|
|
1982
|
-
checked: ke,
|
|
1983
|
-
indeterminate: Ae,
|
|
1984
|
-
disabled: _ || De.length === 0,
|
|
1985
|
-
ariaLabel: A,
|
|
1986
|
-
onChange: He
|
|
1987
|
-
}), /* @__PURE__ */ t(j, {
|
|
1988
|
-
size: "sm",
|
|
1989
|
-
variant: "empty",
|
|
1990
|
-
disabled: Y.size === 0,
|
|
1991
|
-
"aria-label": M,
|
|
1992
|
-
title: M,
|
|
1993
|
-
onClick: Ue,
|
|
1994
|
-
children: /* @__PURE__ */ t(q, {
|
|
1995
|
-
name: "IconX",
|
|
1996
|
-
width: 16,
|
|
1997
|
-
height: 16
|
|
1998
|
-
})
|
|
1999
|
-
})]
|
|
2000
|
-
})
|
|
2001
|
-
}),
|
|
2002
|
-
e.headers.map((e) => {
|
|
2003
|
-
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
|
|
2004
|
-
return /* @__PURE__ */ t("th", {
|
|
2005
|
-
scope: "col",
|
|
2006
|
-
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
2007
|
-
className: G.find((t) => t.id === e.column.id)?.sticky ? Z.stickyColumn : void 0,
|
|
2008
|
-
style: {
|
|
2009
|
-
...rt(G.find((t) => t.id === e.column.id)),
|
|
2010
|
-
...it(G.find((t) => t.id === e.column.id))
|
|
2011
|
-
},
|
|
2012
|
-
children: /* @__PURE__ */ n("button", {
|
|
2013
|
-
type: "button",
|
|
2014
|
-
className: Z.sortButton,
|
|
2015
|
-
disabled: !i,
|
|
2016
|
-
onClick: a,
|
|
2017
|
-
children: [/* @__PURE__ */ t(ve.FlexRender, { header: e }), /* @__PURE__ */ t(q, {
|
|
2018
|
-
name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
|
|
2019
|
-
width: 16,
|
|
2020
|
-
height: 16
|
|
2021
|
-
})]
|
|
2022
|
-
})
|
|
2023
|
-
}, e.id);
|
|
2024
|
-
})
|
|
2025
|
-
] }, e.id))
|
|
2026
|
-
}),
|
|
2027
|
-
/* @__PURE__ */ t("tbody", { children: _ ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2028
|
-
colSpan: G.length + +!!T + +!!V,
|
|
2029
|
-
children: /* @__PURE__ */ t(Ke, {
|
|
2030
|
-
lines: 3,
|
|
2031
|
-
height: 65
|
|
2032
|
-
})
|
|
2033
|
-
}) }) : Fe ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2034
|
-
className: Z.state,
|
|
2035
|
-
colSpan: G.length + +!!T + +!!V,
|
|
2036
|
-
children: Fe
|
|
2037
|
-
}) }) : Ce.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2038
|
-
className: Z.state,
|
|
2039
|
-
colSpan: G.length + +!!T + +!!V,
|
|
2040
|
-
children: y
|
|
2041
|
-
}) }) : Ce.map((e) => {
|
|
2042
|
-
let i = Y.has(e.id), a = k?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = Ee.has(e.id);
|
|
2043
|
-
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ n("tr", {
|
|
2044
|
-
className: [w || T ? Z.clickableRow : "", i ? Z.selectedRow : ""].filter(Boolean).join(" "),
|
|
2045
|
-
"aria-selected": T ? i : void 0,
|
|
2046
|
-
onClick: () => {
|
|
2047
|
-
T ? Ve(e.id) : w?.(e.original);
|
|
2048
|
-
},
|
|
2049
|
-
onDoubleClick: () => {
|
|
2050
|
-
T && O?.(e.original);
|
|
2051
|
-
},
|
|
2052
|
-
onKeyDown: (t) => {
|
|
2053
|
-
t.key === "Enter" ? (t.preventDefault(), T ? O?.(e.original) : w?.(e.original)) : t.key === " " && T && (t.preventDefault(), Ve(e.id));
|
|
2054
|
-
},
|
|
2055
|
-
tabIndex: w || T || O ? 0 : void 0,
|
|
2056
|
-
role: !T && w ? "button" : void 0,
|
|
2057
|
-
children: [
|
|
2058
|
-
V && /* @__PURE__ */ t("td", {
|
|
2059
|
-
className: Z.expansionCell,
|
|
2060
|
-
onClick: (e) => e.stopPropagation(),
|
|
2061
|
-
children: /* @__PURE__ */ t(j, {
|
|
2062
|
-
size: "sm",
|
|
2063
|
-
variant: "empty",
|
|
2064
|
-
"aria-expanded": o,
|
|
2065
|
-
"aria-label": ne?.(e.original, o) ?? (o ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2066
|
-
onClick: () => We(e.id),
|
|
2067
|
-
children: /* @__PURE__ */ t(q, {
|
|
2068
|
-
name: "IconChevron",
|
|
2069
|
-
width: 16,
|
|
2070
|
-
height: 16,
|
|
2071
|
-
className: o ? Z.expansionIconOpen : Z.expansionIcon
|
|
2072
|
-
})
|
|
2073
|
-
})
|
|
2074
|
-
}),
|
|
2075
|
-
T && /* @__PURE__ */ t("td", {
|
|
2076
|
-
className: Z.selectionCell,
|
|
2077
|
-
children: /* @__PURE__ */ t("div", {
|
|
2078
|
-
onClick: (e) => e.stopPropagation(),
|
|
2079
|
-
children: /* @__PURE__ */ t(Se, {
|
|
2080
|
-
checked: i,
|
|
2081
|
-
ariaLabel: a,
|
|
2082
|
-
onChange: () => Ve(e.id)
|
|
2083
|
-
})
|
|
2084
|
-
})
|
|
2085
|
-
}),
|
|
2086
|
-
e.getAllCells().map((e) => /* @__PURE__ */ t("td", {
|
|
2087
|
-
className: G.find((t) => t.id === e.column.id)?.sticky ? Z.stickyColumn : void 0,
|
|
2088
|
-
style: {
|
|
2089
|
-
...rt(G.find((t) => t.id === e.column.id)),
|
|
2090
|
-
...it(G.find((t) => t.id === e.column.id))
|
|
2091
|
-
},
|
|
2092
|
-
children: /* @__PURE__ */ t(ve.FlexRender, { cell: e })
|
|
2093
|
-
}, e.id))
|
|
2094
|
-
]
|
|
2095
|
-
}), o && V && /* @__PURE__ */ t("tr", {
|
|
2096
|
-
className: Z.detailRow,
|
|
2097
|
-
children: /* @__PURE__ */ t("td", {
|
|
2098
|
-
colSpan: G.length + +!!T + 1,
|
|
2099
|
-
children: V({
|
|
2100
|
-
row: e.original,
|
|
2101
|
-
rowId: e.id,
|
|
2102
|
-
collapse: () => We(e.id)
|
|
2103
|
-
})
|
|
2104
|
-
})
|
|
2105
|
-
})] }, e.id);
|
|
2106
|
-
}) })
|
|
2107
|
-
]
|
|
2108
|
-
})
|
|
2109
|
-
}),
|
|
2110
|
-
!Ne && /* @__PURE__ */ n("div", {
|
|
2111
|
-
className: Z.cards,
|
|
2112
|
-
role: "list",
|
|
2113
|
-
"aria-label": h ?? p,
|
|
2114
|
-
children: [T && !_ && !Fe && Ce.length > 0 && /* @__PURE__ */ n("div", {
|
|
2115
|
-
className: Z.mobileSelectionControls,
|
|
2116
|
-
children: [/* @__PURE__ */ t(Se, {
|
|
2117
|
-
checked: ke,
|
|
2118
|
-
indeterminate: Ae,
|
|
2119
|
-
ariaLabel: A,
|
|
2120
|
-
label: A,
|
|
2121
|
-
onChange: He
|
|
2122
|
-
}), /* @__PURE__ */ t(j, {
|
|
2123
|
-
size: "sm",
|
|
2124
|
-
variant: "empty",
|
|
2125
|
-
disabled: Y.size === 0,
|
|
2126
|
-
onClick: Ue,
|
|
2127
|
-
children: M
|
|
2128
|
-
})]
|
|
2129
|
-
}), _ ? /* @__PURE__ */ t(Ke, {
|
|
2130
|
-
lines: 4,
|
|
2131
|
-
height: 65
|
|
2132
|
-
}) : Fe ? /* @__PURE__ */ t("div", {
|
|
2133
|
-
className: Z.state,
|
|
2134
|
-
children: Fe
|
|
2135
|
-
}) : Ce.length === 0 ? /* @__PURE__ */ t("div", {
|
|
2136
|
-
className: Z.state,
|
|
2137
|
-
children: y
|
|
2138
|
-
}) : Ce.map((e) => {
|
|
2139
|
-
let r = Y.has(e.id), i = Ee.has(e.id), a = k?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = T && /* @__PURE__ */ n("div", {
|
|
2140
|
-
className: Z.cardSelectionControls,
|
|
2141
|
-
onClick: (e) => e.stopPropagation(),
|
|
2142
|
-
children: [/* @__PURE__ */ t(Se, {
|
|
2143
|
-
checked: r,
|
|
2144
|
-
ariaLabel: a,
|
|
2145
|
-
onChange: () => Ve(e.id)
|
|
2146
|
-
}), O && /* @__PURE__ */ t(j, {
|
|
2147
|
-
size: "sm",
|
|
2148
|
-
variant: "empty",
|
|
2149
|
-
onClick: () => O(e.original),
|
|
2150
|
-
children: ee
|
|
2151
|
-
})]
|
|
2152
|
-
}), s = V && /* @__PURE__ */ t(j, {
|
|
2153
|
-
size: "sm",
|
|
2154
|
-
variant: "empty",
|
|
2155
|
-
"aria-expanded": i,
|
|
2156
|
-
"aria-label": ne?.(e.original, i) ?? (i ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2157
|
-
onClick: (t) => {
|
|
2158
|
-
t.stopPropagation(), We(e.id);
|
|
2159
|
-
},
|
|
2160
|
-
children: /* @__PURE__ */ t(q, {
|
|
2161
|
-
name: "IconChevron",
|
|
2162
|
-
width: 16,
|
|
2163
|
-
height: 16,
|
|
2164
|
-
className: i ? Z.expansionIconOpen : Z.expansionIcon
|
|
2165
|
-
})
|
|
2166
|
-
});
|
|
2167
|
-
if (u) return /* @__PURE__ */ n("div", {
|
|
2168
|
-
role: "listitem",
|
|
2169
|
-
className: `${Z.customCardShell} ${r ? Z.selectedCard : ""}`,
|
|
2170
|
-
"aria-selected": T ? r : void 0,
|
|
2171
|
-
onClick: () => {
|
|
2172
|
-
T && Ve(e.id);
|
|
2173
|
-
},
|
|
2174
|
-
children: [
|
|
2175
|
-
o,
|
|
2176
|
-
u({
|
|
2177
|
-
row: e.original,
|
|
2178
|
-
columns: G
|
|
2179
|
-
}),
|
|
2180
|
-
s,
|
|
2181
|
-
i && /* @__PURE__ */ t("div", {
|
|
2182
|
-
className: Z.cardDetail,
|
|
2183
|
-
children: V?.({
|
|
2184
|
-
row: e.original,
|
|
2185
|
-
rowId: e.id,
|
|
2186
|
-
collapse: () => We(e.id)
|
|
2187
|
-
})
|
|
2188
|
-
})
|
|
2189
|
-
]
|
|
2190
|
-
}, e.id);
|
|
2191
|
-
let c = G.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), l = c.find((e) => e.mobile?.primary) ?? c.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => st(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
|
|
2192
|
-
return /* @__PURE__ */ n("article", {
|
|
2193
|
-
role: "listitem",
|
|
2194
|
-
className: `${Z.card} ${r ? Z.selectedCard : ""}`,
|
|
2195
|
-
"aria-selected": T ? r : void 0,
|
|
2196
|
-
onClick: () => {
|
|
2197
|
-
T && Ve(e.id);
|
|
2198
|
-
},
|
|
2199
|
-
children: [
|
|
2200
|
-
o,
|
|
2201
|
-
s,
|
|
2202
|
-
/* @__PURE__ */ t("h3", { children: l ? f(l) : `Строка ${e.index + 1}` }),
|
|
2203
|
-
/* @__PURE__ */ t("dl", { children: c.filter((e) => e !== l && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
|
|
2204
|
-
className: e.mobile?.mobileSpan === 2 ? Z.spanTwo : "",
|
|
2205
|
-
children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: f(e) })]
|
|
2206
|
-
}, e.id)) }),
|
|
2207
|
-
c.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: f(e) }, e.id)),
|
|
2208
|
-
i && /* @__PURE__ */ t("div", {
|
|
2209
|
-
className: Z.cardDetail,
|
|
2210
|
-
children: V?.({
|
|
2211
|
-
row: e.original,
|
|
2212
|
-
rowId: e.id,
|
|
2213
|
-
collapse: () => We(e.id)
|
|
2214
|
-
})
|
|
2215
|
-
})
|
|
2216
|
-
]
|
|
2217
|
-
}, e.id);
|
|
2218
|
-
})]
|
|
2219
|
-
}),
|
|
2220
|
-
Ie && /* @__PURE__ */ n("nav", {
|
|
2221
|
-
className: Z.pagination,
|
|
2222
|
-
"aria-label": "Пагинация таблицы",
|
|
2223
|
-
children: [/* @__PURE__ */ n("span", {
|
|
2224
|
-
className: Z.paginationRange,
|
|
2225
|
-
"aria-live": "polite",
|
|
2226
|
-
children: [
|
|
2227
|
-
Le,
|
|
2228
|
-
"–",
|
|
2229
|
-
Re,
|
|
2230
|
-
" из ",
|
|
2231
|
-
K
|
|
2232
|
-
]
|
|
2233
|
-
}), /* @__PURE__ */ n("div", {
|
|
2234
|
-
className: Z.paginationControls,
|
|
2235
|
-
children: [
|
|
2236
|
-
/* @__PURE__ */ n(j, {
|
|
2237
|
-
variant: "empty",
|
|
2238
|
-
size: "md",
|
|
2239
|
-
disabled: _ || J === 0,
|
|
2240
|
-
"aria-label": "Предыдущая страница",
|
|
2241
|
-
onClick: () => {
|
|
2242
|
-
ze(J - 1);
|
|
2243
|
-
},
|
|
2244
|
-
children: [/* @__PURE__ */ t(q, {
|
|
2245
|
-
name: "IconChevron",
|
|
2246
|
-
width: 18,
|
|
2247
|
-
height: 18,
|
|
2248
|
-
className: Z.previousIcon
|
|
2249
|
-
}), /* @__PURE__ */ t("span", {
|
|
2250
|
-
className: Z.paginationButtonLabel,
|
|
2251
|
-
children: "Назад"
|
|
2252
|
-
})]
|
|
2253
|
-
}),
|
|
2254
|
-
/* @__PURE__ */ t("div", {
|
|
2255
|
-
className: Z.pageNumbers,
|
|
2256
|
-
children: Me.map((e) => typeof e == "number" ? /* @__PURE__ */ t(j, {
|
|
2257
|
-
variant: e === J ? "secondary" : "empty",
|
|
2258
|
-
size: "md",
|
|
2259
|
-
className: Z.pageButton,
|
|
2260
|
-
"aria-label": `Перейти на страницу ${e + 1}`,
|
|
2261
|
-
"aria-current": e === J ? "page" : void 0,
|
|
2262
|
-
disabled: _,
|
|
2263
|
-
onClick: () => {
|
|
2264
|
-
ze(e);
|
|
2265
|
-
},
|
|
2266
|
-
children: e + 1
|
|
2267
|
-
}, e) : /* @__PURE__ */ t("span", {
|
|
2268
|
-
className: Z.ellipsis,
|
|
2269
|
-
"aria-hidden": "true",
|
|
2270
|
-
children: "…"
|
|
2271
|
-
}, e))
|
|
2272
|
-
}),
|
|
2273
|
-
/* @__PURE__ */ n(j, {
|
|
2274
|
-
variant: "empty",
|
|
2275
|
-
size: "md",
|
|
2276
|
-
disabled: _ || J === be - 1,
|
|
2277
|
-
"aria-label": "Следующая страница",
|
|
2278
|
-
onClick: () => {
|
|
2279
|
-
ze(J + 1);
|
|
2280
|
-
},
|
|
2281
|
-
children: [/* @__PURE__ */ t("span", {
|
|
2282
|
-
className: Z.paginationButtonLabel,
|
|
2283
|
-
children: "Вперёд"
|
|
2284
|
-
}), /* @__PURE__ */ t(q, {
|
|
2285
|
-
name: "IconChevron",
|
|
2286
|
-
width: 18,
|
|
2287
|
-
height: 18,
|
|
2288
|
-
className: Z.nextIcon
|
|
2289
|
-
})]
|
|
2290
|
-
})
|
|
2291
|
-
]
|
|
2292
|
-
})]
|
|
2293
|
-
})
|
|
2294
|
-
]
|
|
2295
|
-
});
|
|
2296
|
-
}, gt = 8, _t = 6, vt = 120, yt = (e) => {
|
|
2297
|
-
if (typeof e == "number") return e;
|
|
2298
|
-
if (typeof e == "string") {
|
|
2299
|
-
let t = Number.parseFloat(e);
|
|
2300
|
-
if (Number.isFinite(t)) return t;
|
|
2301
|
-
}
|
|
2302
|
-
return Infinity;
|
|
2303
|
-
}, bt = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: w = !1, needMark: T = !0, maxMenuHeight: E }) => {
|
|
2304
|
-
let D = f(), O = C ?? `ds-dropdown-multiple-${S ?? D}`, k = `${O}-listbox`, [A, j] = g(!1), [M, N] = g(null), P = h(null), F = h(null), I = h(null), L = h([]), R = m(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${O}-hint` : void 0, B = u ? `${O}-error` : void 0, te = [z, B].filter(Boolean).join(" ") || void 0, V = o && s, H = l(() => {
|
|
2305
|
-
let e = F.current, t = I.current;
|
|
2306
|
-
if (!e || !t) return;
|
|
2307
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - gt, a = n.top - gt, o = i < r.height && a > i, s = Math.max(vt, o ? a : i), c = window.innerWidth - n.width - gt;
|
|
2308
|
-
N({
|
|
2309
|
-
top: o ? Math.max(gt, n.top - r.height - _t) : n.bottom + _t,
|
|
2310
|
-
left: Math.max(gt, Math.min(n.left, c)),
|
|
2311
|
-
width: n.width,
|
|
2312
|
-
maxHeight: Math.min(s, yt(E))
|
|
2313
|
-
});
|
|
2314
|
-
}, [E]);
|
|
2315
|
-
p(() => {
|
|
2316
|
-
if (!A) {
|
|
2317
|
-
N(null);
|
|
2318
|
-
return;
|
|
2319
|
-
}
|
|
2320
|
-
return H(), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
|
|
2321
|
-
window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
|
|
2322
|
-
};
|
|
2323
|
-
}, [
|
|
2324
|
-
A,
|
|
2325
|
-
e.length,
|
|
2326
|
-
H
|
|
1845
|
+
A,
|
|
1846
|
+
e.length,
|
|
1847
|
+
H
|
|
2327
1848
|
]), d(() => {
|
|
2328
1849
|
if (!A) return;
|
|
2329
1850
|
let e = (e) => {
|
|
@@ -2346,7 +1867,7 @@ var M = {
|
|
|
2346
1867
|
}, re = A ? /* @__PURE__ */ t("ul", {
|
|
2347
1868
|
ref: I,
|
|
2348
1869
|
id: k,
|
|
2349
|
-
className:
|
|
1870
|
+
className: Z.menu,
|
|
2350
1871
|
role: "listbox",
|
|
2351
1872
|
"aria-label": c,
|
|
2352
1873
|
"aria-multiselectable": "true",
|
|
@@ -2376,9 +1897,9 @@ var M = {
|
|
|
2376
1897
|
"aria-selected": o,
|
|
2377
1898
|
disabled: i.disabled,
|
|
2378
1899
|
className: [
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
o ?
|
|
1900
|
+
Z[v],
|
|
1901
|
+
Z.option,
|
|
1902
|
+
o ? Z.selected : ""
|
|
2382
1903
|
].filter(Boolean).join(" "),
|
|
2383
1904
|
onClick: () => ne(i),
|
|
2384
1905
|
onKeyDown: (t) => {
|
|
@@ -2394,7 +1915,7 @@ var M = {
|
|
|
2394
1915
|
}
|
|
2395
1916
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), ne(i)), t.key === "Tab" && j(!1);
|
|
2396
1917
|
},
|
|
2397
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t(
|
|
1918
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t(J, {
|
|
2398
1919
|
name: "IconCheck",
|
|
2399
1920
|
width: 16,
|
|
2400
1921
|
height: 16
|
|
@@ -2406,8 +1927,8 @@ var M = {
|
|
|
2406
1927
|
return /* @__PURE__ */ n("div", {
|
|
2407
1928
|
ref: P,
|
|
2408
1929
|
className: [
|
|
2409
|
-
|
|
2410
|
-
u ?
|
|
1930
|
+
Z.wrapper,
|
|
1931
|
+
u ? Z.errorState : "",
|
|
2411
1932
|
x
|
|
2412
1933
|
].filter(Boolean).join(" "),
|
|
2413
1934
|
children: [
|
|
@@ -2418,10 +1939,10 @@ var M = {
|
|
|
2418
1939
|
children: c
|
|
2419
1940
|
}),
|
|
2420
1941
|
/* @__PURE__ */ t("div", {
|
|
2421
|
-
className:
|
|
1942
|
+
className: Z.container,
|
|
2422
1943
|
children: V ? /* @__PURE__ */ t("div", {
|
|
2423
1944
|
id: O,
|
|
2424
|
-
className: `${
|
|
1945
|
+
className: `${Z.disabledText} ${Z[v]}`,
|
|
2425
1946
|
"aria-describedby": te,
|
|
2426
1947
|
children: R || a
|
|
2427
1948
|
}) : /* @__PURE__ */ n("button", {
|
|
@@ -2429,7 +1950,7 @@ var M = {
|
|
|
2429
1950
|
id: O,
|
|
2430
1951
|
type: "button",
|
|
2431
1952
|
name: S,
|
|
2432
|
-
className: `${
|
|
1953
|
+
className: `${Z.trigger} ${Z[v]}`,
|
|
2433
1954
|
disabled: o,
|
|
2434
1955
|
"aria-haspopup": "listbox",
|
|
2435
1956
|
"aria-expanded": A,
|
|
@@ -2445,12 +1966,12 @@ var M = {
|
|
|
2445
1966
|
}
|
|
2446
1967
|
},
|
|
2447
1968
|
children: [/* @__PURE__ */ t("span", {
|
|
2448
|
-
className: `${R ?
|
|
1969
|
+
className: `${R ? Z.value : Z.placeholder} ${Z[v]}`,
|
|
2449
1970
|
children: R || a
|
|
2450
1971
|
}), /* @__PURE__ */ t("span", {
|
|
2451
|
-
className: [
|
|
1972
|
+
className: [Z.chevron, A ? Z.chevronOpen : ""].filter(Boolean).join(" "),
|
|
2452
1973
|
"aria-hidden": "true",
|
|
2453
|
-
children: /* @__PURE__ */ t(
|
|
1974
|
+
children: /* @__PURE__ */ t(J, {
|
|
2454
1975
|
name: "IconChevron",
|
|
2455
1976
|
width: 20,
|
|
2456
1977
|
height: 20
|
|
@@ -2458,127 +1979,830 @@ var M = {
|
|
|
2458
1979
|
})]
|
|
2459
1980
|
})
|
|
2460
1981
|
}),
|
|
2461
|
-
A && _(re, document.body),
|
|
2462
|
-
b && !u && /* @__PURE__ */ t("span", {
|
|
2463
|
-
id: z,
|
|
2464
|
-
className:
|
|
2465
|
-
children: b
|
|
2466
|
-
}),
|
|
2467
|
-
u && /* @__PURE__ */ t("span", {
|
|
2468
|
-
id: B,
|
|
2469
|
-
className:
|
|
2470
|
-
children: u
|
|
2471
|
-
})
|
|
2472
|
-
]
|
|
2473
|
-
});
|
|
2474
|
-
},
|
|
2475
|
-
wrapper: "
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
children:
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
1982
|
+
A && _(re, document.body),
|
|
1983
|
+
b && !u && /* @__PURE__ */ t("span", {
|
|
1984
|
+
id: z,
|
|
1985
|
+
className: Z.message,
|
|
1986
|
+
children: b
|
|
1987
|
+
}),
|
|
1988
|
+
u && /* @__PURE__ */ t("span", {
|
|
1989
|
+
id: B,
|
|
1990
|
+
className: Z.error,
|
|
1991
|
+
children: u
|
|
1992
|
+
})
|
|
1993
|
+
]
|
|
1994
|
+
});
|
|
1995
|
+
}, ct = {
|
|
1996
|
+
wrapper: "_wrapper_1jspu_1",
|
|
1997
|
+
input: "_input_1jspu_21",
|
|
1998
|
+
switch: "_switch_1jspu_35",
|
|
1999
|
+
thumb: "_thumb_1jspu_67",
|
|
2000
|
+
label: "_label_1jspu_113",
|
|
2001
|
+
disabled: "_disabled_1jspu_125"
|
|
2002
|
+
}, lt = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: c, id: l, value: u }) => {
|
|
2003
|
+
let d = f(), p = l ?? `ds-radio-button-${c ?? d}`;
|
|
2004
|
+
return /* @__PURE__ */ n("label", {
|
|
2005
|
+
htmlFor: p,
|
|
2006
|
+
className: `${ct.wrapper} ${a ? ct.disabled : ""} ${s}`,
|
|
2007
|
+
children: [
|
|
2008
|
+
/* @__PURE__ */ t("input", {
|
|
2009
|
+
id: p,
|
|
2010
|
+
className: ct.input,
|
|
2011
|
+
type: "checkbox",
|
|
2012
|
+
role: "switch",
|
|
2013
|
+
name: c,
|
|
2014
|
+
value: u,
|
|
2015
|
+
checked: e,
|
|
2016
|
+
disabled: a,
|
|
2017
|
+
"aria-readonly": o || void 0,
|
|
2018
|
+
onChange: (e) => {
|
|
2019
|
+
o || r?.(e.target.checked, e);
|
|
2020
|
+
}
|
|
2021
|
+
}),
|
|
2022
|
+
/* @__PURE__ */ t("span", {
|
|
2023
|
+
className: ct.switch,
|
|
2024
|
+
"aria-hidden": "true",
|
|
2025
|
+
children: /* @__PURE__ */ t("span", { className: ct.thumb })
|
|
2026
|
+
}),
|
|
2027
|
+
i && /* @__PURE__ */ t("span", {
|
|
2028
|
+
className: ct.label,
|
|
2029
|
+
children: i
|
|
2030
|
+
})
|
|
2031
|
+
]
|
|
2032
|
+
});
|
|
2033
|
+
}, Q = {
|
|
2034
|
+
root: "_root_s4pi9_1",
|
|
2035
|
+
srOnly: "_srOnly_s4pi9_15",
|
|
2036
|
+
bulkActions: "_bulkActions_s4pi9_39",
|
|
2037
|
+
filterBar: "_filterBar_s4pi9_61",
|
|
2038
|
+
filterFields: "_filterFields_s4pi9_79",
|
|
2039
|
+
filterActions: "_filterActions_s4pi9_93",
|
|
2040
|
+
pageSizePanel: "_pageSizePanel_s4pi9_105",
|
|
2041
|
+
embedded: "_embedded_s4pi9_105",
|
|
2042
|
+
pendingChanges: "_pendingChanges_s4pi9_117",
|
|
2043
|
+
tableWrap: "_tableWrap_s4pi9_129",
|
|
2044
|
+
table: "_table_s4pi9_129",
|
|
2045
|
+
compact: "_compact_s4pi9_179",
|
|
2046
|
+
selectionColumn: "_selectionColumn_s4pi9_209",
|
|
2047
|
+
expansionColumn: "_expansionColumn_s4pi9_217",
|
|
2048
|
+
expansionCell: "_expansionCell_s4pi9_219",
|
|
2049
|
+
expansionIcon: "_expansionIcon_s4pi9_231",
|
|
2050
|
+
expansionIconOpen: "_expansionIconOpen_s4pi9_241",
|
|
2051
|
+
detailRow: "_detailRow_s4pi9_251",
|
|
2052
|
+
stickyColumn: "_stickyColumn_s4pi9_261",
|
|
2053
|
+
selectionHeaderCell: "_selectionHeaderCell_s4pi9_281",
|
|
2054
|
+
selectionCell: "_selectionCell_s4pi9_283",
|
|
2055
|
+
selectionHeaderControls: "_selectionHeaderControls_s4pi9_295",
|
|
2056
|
+
mobileSelectionControls: "_mobileSelectionControls_s4pi9_297",
|
|
2057
|
+
cardSelectionControls: "_cardSelectionControls_s4pi9_299",
|
|
2058
|
+
selectedRow: "_selectedRow_s4pi9_313",
|
|
2059
|
+
sticky: "_sticky_s4pi9_261",
|
|
2060
|
+
sortButton: "_sortButton_s4pi9_351",
|
|
2061
|
+
state: "_state_s4pi9_389",
|
|
2062
|
+
cards: "_cards_s4pi9_401",
|
|
2063
|
+
mobileSort: "_mobileSort_s4pi9_401",
|
|
2064
|
+
card: "_card_s4pi9_299",
|
|
2065
|
+
spanTwo: "_spanTwo_s4pi9_489",
|
|
2066
|
+
selectedCard: "_selectedCard_s4pi9_497",
|
|
2067
|
+
customCardShell: "_customCardShell_s4pi9_531",
|
|
2068
|
+
clickableRow: "_clickableRow_s4pi9_543",
|
|
2069
|
+
cardDetail: "_cardDetail_s4pi9_561",
|
|
2070
|
+
pagination: "_pagination_s4pi9_587",
|
|
2071
|
+
bottom: "_bottom_s4pi9_635",
|
|
2072
|
+
pageSizeMain: "_pageSizeMain_s4pi9_649",
|
|
2073
|
+
pageSizeOptions: "_pageSizeOptions_s4pi9_651",
|
|
2074
|
+
pageSizeFieldset: "_pageSizeFieldset_s4pi9_663",
|
|
2075
|
+
pageSizeOption: "_pageSizeOption_s4pi9_651",
|
|
2076
|
+
pageSizeOptionActive: "_pageSizeOptionActive_s4pi9_741",
|
|
2077
|
+
pageSizeWarning: "_pageSizeWarning_s4pi9_755",
|
|
2078
|
+
paginationRange: "_paginationRange_s4pi9_767",
|
|
2079
|
+
paginationControls: "_paginationControls_s4pi9_779",
|
|
2080
|
+
pageNumbers: "_pageNumbers_s4pi9_781",
|
|
2081
|
+
pageButton: "_pageButton_s4pi9_793",
|
|
2082
|
+
ellipsis: "_ellipsis_s4pi9_803",
|
|
2083
|
+
previousIcon: "_previousIcon_s4pi9_815",
|
|
2084
|
+
nextIcon: "_nextIcon_s4pi9_823",
|
|
2085
|
+
default: "_default_s4pi9_923",
|
|
2086
|
+
tableOnMobile: "_tableOnMobile_s4pi9_923",
|
|
2087
|
+
wide: "_wide_s4pi9_953"
|
|
2088
|
+
}, ut = b({
|
|
2089
|
+
rowSortingFeature: y,
|
|
2090
|
+
sortedRowModel: v()
|
|
2091
|
+
}), dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
2092
|
+
let o = e.type === "multi-select" ? e.options : void 0, [s, c] = g(Array.isArray(o) ? o : []), [l, u] = g(!1);
|
|
2093
|
+
return d(() => {
|
|
2094
|
+
if (o === void 0) return;
|
|
2095
|
+
if (Array.isArray(o)) {
|
|
2096
|
+
c(o);
|
|
2097
|
+
return;
|
|
2098
|
+
}
|
|
2099
|
+
let e = !0;
|
|
2100
|
+
return u(!0), o().then((t) => {
|
|
2101
|
+
e && c(t);
|
|
2102
|
+
}).finally(() => {
|
|
2103
|
+
e && u(!1);
|
|
2104
|
+
}), () => {
|
|
2105
|
+
e = !1;
|
|
2106
|
+
};
|
|
2107
|
+
}, [o]), e.type === "multi-select" ? /* @__PURE__ */ t(st, {
|
|
2108
|
+
label: e.label,
|
|
2109
|
+
options: s,
|
|
2110
|
+
value: Array.isArray(n) ? n.map(String) : [],
|
|
2111
|
+
disabled: i || l,
|
|
2112
|
+
placeholder: l ? "Загрузка…" : e.placeholder,
|
|
2113
|
+
error: a,
|
|
2114
|
+
onChange: (e) => r(e)
|
|
2115
|
+
}) : e.type === "switch" ? /* @__PURE__ */ t(lt, {
|
|
2116
|
+
label: e.label,
|
|
2117
|
+
checked: !!n,
|
|
2118
|
+
disabled: i,
|
|
2119
|
+
onChange: (e) => r(e)
|
|
2120
|
+
}) : e.type === "custom" ? e.render({
|
|
2121
|
+
value: n,
|
|
2122
|
+
setValue: r,
|
|
2123
|
+
disabled: i,
|
|
2124
|
+
error: a
|
|
2125
|
+
}) : /* @__PURE__ */ t(nt, {
|
|
2126
|
+
label: e.label,
|
|
2127
|
+
type: e.type === "search" ? "search" : "text",
|
|
2128
|
+
value: String(n ?? ""),
|
|
2129
|
+
disabled: i,
|
|
2130
|
+
placeholder: e.placeholder,
|
|
2131
|
+
error: a,
|
|
2132
|
+
onChange: (e) => r(e)
|
|
2133
|
+
});
|
|
2134
|
+
}, ft = (e, t, n) => {
|
|
2135
|
+
let r = new Set(e);
|
|
2136
|
+
return t.forEach((e) => {
|
|
2137
|
+
n ? r.add(e) : r.delete(e);
|
|
2138
|
+
}), Array.from(r);
|
|
2139
|
+
}, pt = (e) => {
|
|
2140
|
+
if (!(!e || e.width === void 0 && e.minWidth === void 0 && e.maxWidth === void 0)) return {
|
|
2141
|
+
width: e.width,
|
|
2142
|
+
minWidth: e.minWidth,
|
|
2143
|
+
maxWidth: e.maxWidth
|
|
2144
|
+
};
|
|
2145
|
+
}, mt = (e) => {
|
|
2146
|
+
if (e?.sticky) return e.sticky === "start" ? { insetInlineStart: e.stickyOffset ?? 0 } : { insetInlineEnd: e.stickyOffset ?? 0 };
|
|
2147
|
+
}, ht = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
|
|
2148
|
+
0,
|
|
2149
|
+
1,
|
|
2150
|
+
2,
|
|
2151
|
+
3,
|
|
2152
|
+
4,
|
|
2153
|
+
"ellipsis-end",
|
|
2154
|
+
t - 1
|
|
2155
|
+
] : e >= t - 4 ? [
|
|
2156
|
+
0,
|
|
2157
|
+
"ellipsis-start",
|
|
2158
|
+
t - 5,
|
|
2159
|
+
t - 4,
|
|
2160
|
+
t - 3,
|
|
2161
|
+
t - 2,
|
|
2162
|
+
t - 1
|
|
2163
|
+
] : [
|
|
2164
|
+
0,
|
|
2165
|
+
"ellipsis-start",
|
|
2166
|
+
e - 1,
|
|
2167
|
+
e,
|
|
2168
|
+
e + 1,
|
|
2169
|
+
"ellipsis-end",
|
|
2170
|
+
t - 1
|
|
2171
|
+
], gt = (e, t) => {
|
|
2172
|
+
let n = /* @__PURE__ */ new Set();
|
|
2173
|
+
for (let t of e) {
|
|
2174
|
+
if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
|
|
2175
|
+
if (n.has(t.id)) return `Идентификатор колонки «${t.id}» повторяется`;
|
|
2176
|
+
n.add(t.id);
|
|
2177
|
+
}
|
|
2178
|
+
for (let n = 0; n < t.length; n += 1) {
|
|
2179
|
+
let r = t[n];
|
|
2180
|
+
for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
|
|
2181
|
+
}
|
|
2182
|
+
return null;
|
|
2183
|
+
}, _t = (e, t) => typeof e == "function" ? e(t) : t[e], vt = (e) => {
|
|
2184
|
+
if (e == null || e === "") return null;
|
|
2185
|
+
let t = Date.parse(String(e));
|
|
2186
|
+
return Number.isNaN(t) ? null : t;
|
|
2187
|
+
}, yt = (e, t, n) => {
|
|
2188
|
+
let r = vt(e.getValue(n)), i = vt(t.getValue(n));
|
|
2189
|
+
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
2190
|
+
}, bt = (e, t, n) => {
|
|
2191
|
+
let r = e.getValue(n), i = t.getValue(n);
|
|
2192
|
+
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
2193
|
+
}, xt = (e, t, n) => {
|
|
2194
|
+
let r = e.getValue(n), i = t.getValue(n);
|
|
2195
|
+
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
2196
|
+
}, St = (e, t, n) => {
|
|
2197
|
+
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
2198
|
+
return r.localeCompare(i, void 0, {
|
|
2199
|
+
numeric: !0,
|
|
2200
|
+
sensitivity: "base"
|
|
2201
|
+
});
|
|
2202
|
+
}, Ct = (e) => {
|
|
2203
|
+
switch (e) {
|
|
2204
|
+
case "date": return yt;
|
|
2205
|
+
case "number": return bt;
|
|
2206
|
+
case "boolean": return xt;
|
|
2207
|
+
case "text":
|
|
2208
|
+
case void 0: return St;
|
|
2209
|
+
case "custom": return;
|
|
2210
|
+
}
|
|
2211
|
+
}, wt = (e) => {
|
|
2212
|
+
let t = (t) => _t(e.accessor, t), n = e.sortFn ?? Ct(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
|
|
2213
|
+
id: e.id,
|
|
2214
|
+
accessorFn: t,
|
|
2215
|
+
header: () => e.header,
|
|
2216
|
+
cell: (t) => {
|
|
2217
|
+
let n = t.getValue();
|
|
2218
|
+
return e.cell?.(t.row.original, n) ?? String(n ?? "");
|
|
2219
|
+
},
|
|
2220
|
+
enableSorting: r,
|
|
2221
|
+
sortDescFirst: e.sortDescFirst
|
|
2222
|
+
};
|
|
2223
|
+
return n !== void 0 && (i.sortFn = n), i;
|
|
2224
|
+
}, Tt = ({ columns: e, data: i, tableOnMobile: a = !1, mobileView: o, breakpoint: s = "default", sorting: c, onSortingChange: l, renderMobileCard: u, getRowId: f, caption: p, ariaLabel: h, loading: _ = !1, error: v, emptyState: y = "Нет данных", stickyHeader: b = !1, maxHeight: S, className: C = "", onRowClick: w, selectable: T = !1, selectedRowIds: E, onSelectedRowIdsChange: D, onRowDoubleClick: O, getRowSelectionLabel: k, selectAllRowsLabel: A = "Выбрать все строки на этой странице", resetSelectionLabel: M = "Сбросить выбор", openRowLabel: ee = "Открыть строку", pagination: N = !1, paginationMode: P = "client", page: F = 1, pageSize: I = 30, onPageSizeChange: L, pageSizeOptions: R = [
|
|
2225
|
+
10,
|
|
2226
|
+
30,
|
|
2227
|
+
50,
|
|
2228
|
+
-1
|
|
2229
|
+
], pageSizeDraft: z, onPageSizeDraftChange: B, pageSizeApplyMode: te = "table", totalCount: V, onPageChange: H, visibleColumnIds: U, density: ne = "comfortable", renderBulkActions: re, renderExpandedRow: W, expandedRowIds: ie, onExpandedRowIdsChange: ae, getRowExpansionLabel: oe, resultsAnnouncement: se, filterBar: G }) => {
|
|
2230
|
+
let [K, ce] = g([]), [le, ue] = g([]), [de, fe] = g([]), [pe, me] = g(0), [he, ge] = g(I === -1 ? -1 : [
|
|
2231
|
+
10,
|
|
2232
|
+
30,
|
|
2233
|
+
50
|
|
2234
|
+
].includes(I) ? I : 30), _e = c ?? K, ve = _e.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), ye = I === -1, q = ye ? Math.max(1, (P === "server" ? Number(V) : i.length) || i.length || 1) : Number.isFinite(I) && I > 0 ? Math.floor(I) : 30, be = N && P === "server", Y = m(() => {
|
|
2235
|
+
if (U === void 0) return e;
|
|
2236
|
+
let t = new Set(U);
|
|
2237
|
+
return e.filter((e) => t.has(e.id));
|
|
2238
|
+
}, [e, U]), X = m(() => Y.length === 0 ? "Должна быть видима хотя бы одна колонка" : gt(Y, i), [i, Y]), Se = m(() => Y.map(wt), [Y]), Ce = Y.some((e) => pt(e) !== void 0), we = x({
|
|
2239
|
+
features: ut,
|
|
2240
|
+
columns: Se,
|
|
2241
|
+
data: i,
|
|
2242
|
+
state: { sorting: _e },
|
|
2243
|
+
onSortingChange: (e) => {
|
|
2244
|
+
let t = typeof e == "function" ? e(_e) : e;
|
|
2245
|
+
c === void 0 && ce(t), me(0), l?.(t);
|
|
2246
|
+
},
|
|
2247
|
+
getRowId: f
|
|
2248
|
+
}), Te = we.getRowModel().rows, Ee = be && Number.isFinite(V) && Number(V) >= 0 ? Math.floor(Number(V)) : Te.length, De = N ? Math.max(1, Math.ceil(Ee / q)) : 1, Oe = Number.isFinite(F) && F > 0 ? Math.floor(F) - 1 : 0, ke = Math.min(be ? Oe : pe, De - 1), Ae = m(() => N && !be ? Te.slice(ke * q, (ke + 1) * q) : Te, [
|
|
2249
|
+
be,
|
|
2250
|
+
q,
|
|
2251
|
+
N,
|
|
2252
|
+
ke,
|
|
2253
|
+
Te
|
|
2254
|
+
]), je = E ?? le, Me = m(() => new Set(je), [je]), Ne = ie ?? de, Pe = m(() => new Set(Ne), [Ne]), Fe = m(() => Ae.map((e) => e.id), [Ae]), Ie = Fe.filter((e) => Me.has(e)).length, Le = Fe.length > 0 && Ie === Fe.length, Re = Ie > 0 && !Le, ze = m(() => Y.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
2255
|
+
id: e.id,
|
|
2256
|
+
label: typeof e.header == "string" ? e.header : e.id
|
|
2257
|
+
})), [Y]), Be = m(() => ht(ke, De), [De, ke]), Ve = o === void 0 ? a : o === "table", He = [
|
|
2258
|
+
Q.root,
|
|
2259
|
+
s === "wide" ? Q.wide : Q.default,
|
|
2260
|
+
Ve ? Q.tableOnMobile : "",
|
|
2261
|
+
ne === "compact" ? Q.compact : "",
|
|
2262
|
+
C
|
|
2263
|
+
].filter(Boolean).join(" "), Ue = X ?? v, We = N && !ye && !Ue && Ee > q && (!_ || be), Ge = N && !!(L || B || G), Z = z ?? he, qe = G ? (typeof G.validation == "function" ? G.validation(G.draftValues) : G.validation) ?? {} : {}, Je = G ? JSON.stringify(G.draftValues) !== JSON.stringify(G.appliedValues) || Z !== I : !1, Ye = Object.values(qe).some(Boolean), Xe = Ee === 0 ? 0 : ke * q + 1, Ze = Math.min((ke + 1) * q, Ee), Qe = () => {
|
|
2264
|
+
Z !== I && (me(0), H?.(1), L?.(Z));
|
|
2265
|
+
}, $e = (e, r = !1) => {
|
|
2266
|
+
let i = Z !== I, a = `ds-data-table-page-size-warning-${e}`;
|
|
2267
|
+
return /* @__PURE__ */ n("div", {
|
|
2268
|
+
className: `${Q.pageSizePanel} ${Q[e]} ${r ? Q.embedded : ""}`,
|
|
2269
|
+
children: [
|
|
2270
|
+
/* @__PURE__ */ n("div", {
|
|
2271
|
+
className: Q.pageSizeMain,
|
|
2272
|
+
children: [/* @__PURE__ */ n("fieldset", {
|
|
2273
|
+
className: Q.pageSizeFieldset,
|
|
2274
|
+
disabled: _ || G?.applying,
|
|
2275
|
+
children: [/* @__PURE__ */ t("legend", { children: "На странице" }), /* @__PURE__ */ t("div", {
|
|
2276
|
+
className: Q.pageSizeOptions,
|
|
2277
|
+
children: R.map((e) => /* @__PURE__ */ t("button", {
|
|
2278
|
+
type: "button",
|
|
2279
|
+
className: `${Q.pageSizeOption} ${Z === e ? Q.pageSizeOptionActive : ""}`,
|
|
2280
|
+
"aria-pressed": Z === e,
|
|
2281
|
+
onClick: () => {
|
|
2282
|
+
z === void 0 && ge(e), B?.(e);
|
|
2283
|
+
},
|
|
2284
|
+
children: e === -1 ? "Все" : e
|
|
2285
|
+
}, e))
|
|
2286
|
+
})]
|
|
2287
|
+
}), te === "table" && !G && /* @__PURE__ */ t(j, {
|
|
2288
|
+
size: "sm",
|
|
2289
|
+
disabled: _ || !i,
|
|
2290
|
+
"aria-describedby": Z === -1 && i && e === "top" ? a : void 0,
|
|
2291
|
+
onClick: Qe,
|
|
2292
|
+
children: "Применить"
|
|
2293
|
+
})]
|
|
2294
|
+
}),
|
|
2295
|
+
/* @__PURE__ */ n("span", {
|
|
2296
|
+
className: Q.paginationRange,
|
|
2297
|
+
children: [
|
|
2298
|
+
"Показано ",
|
|
2299
|
+
Xe,
|
|
2300
|
+
"–",
|
|
2301
|
+
Ze,
|
|
2302
|
+
" из ",
|
|
2303
|
+
Ee
|
|
2304
|
+
]
|
|
2305
|
+
}),
|
|
2306
|
+
Je && e === "top" && /* @__PURE__ */ t("span", {
|
|
2307
|
+
className: Q.pendingChanges,
|
|
2308
|
+
role: "status",
|
|
2309
|
+
children: "Есть неприменённые изменения"
|
|
2310
|
+
}),
|
|
2311
|
+
be && Z === -1 && i && /* @__PURE__ */ n("span", {
|
|
2312
|
+
id: a,
|
|
2313
|
+
className: Q.pageSizeWarning,
|
|
2314
|
+
"aria-hidden": e === "bottom" || void 0,
|
|
2315
|
+
children: [
|
|
2316
|
+
"Будут загружены все ",
|
|
2317
|
+
Ee,
|
|
2318
|
+
" записей"
|
|
2319
|
+
]
|
|
2320
|
+
})
|
|
2321
|
+
]
|
|
2322
|
+
});
|
|
2323
|
+
}, tt = (e) => {
|
|
2324
|
+
let t = Math.max(0, Math.min(De - 1, e));
|
|
2325
|
+
if (be) {
|
|
2326
|
+
t !== ke && H?.(t + 1);
|
|
2327
|
+
return;
|
|
2328
|
+
}
|
|
2329
|
+
me(t);
|
|
2330
|
+
}, nt = (e) => {
|
|
2331
|
+
let t = Array.from(e);
|
|
2332
|
+
E === void 0 && ue(t), D?.(t);
|
|
2333
|
+
}, rt = (e) => {
|
|
2334
|
+
let t = new Set(Me);
|
|
2335
|
+
t.has(e) ? t.delete(e) : t.add(e), nt(t);
|
|
2336
|
+
}, it = () => {
|
|
2337
|
+
let e = ft(Me, Fe, !Le);
|
|
2338
|
+
E === void 0 && ue(e), D?.(e);
|
|
2339
|
+
}, at = () => nt(/* @__PURE__ */ new Set()), ot = (e) => {
|
|
2340
|
+
let t = new Set(Pe);
|
|
2341
|
+
t.has(e) ? t.delete(e) : t.add(e);
|
|
2342
|
+
let n = Array.from(t);
|
|
2343
|
+
ie === void 0 && fe(n), ae?.(n);
|
|
2344
|
+
}, st = i.filter((e, t) => Me.has(f?.(e, t) ?? String(t))), ct = se?.({
|
|
2345
|
+
visibleCount: Ae.length,
|
|
2346
|
+
totalCount: Ee,
|
|
2347
|
+
selectedCount: Me.size
|
|
2348
|
+
}) ?? `Показано строк: ${Ae.length} из ${Ee}. Выбрано: ${Me.size}.`;
|
|
2349
|
+
return d(() => {
|
|
2350
|
+
be || me(0);
|
|
2351
|
+
}, [
|
|
2352
|
+
i,
|
|
2353
|
+
be,
|
|
2354
|
+
q,
|
|
2355
|
+
N,
|
|
2356
|
+
ve
|
|
2357
|
+
]), d(() => {
|
|
2358
|
+
!be && pe >= De && me(De - 1);
|
|
2359
|
+
}, [
|
|
2360
|
+
be,
|
|
2361
|
+
De,
|
|
2362
|
+
pe
|
|
2363
|
+
]), d(() => {
|
|
2364
|
+
ge(I === -1 ? -1 : [
|
|
2365
|
+
10,
|
|
2366
|
+
30,
|
|
2367
|
+
50
|
|
2368
|
+
].includes(I) ? I : 30);
|
|
2369
|
+
}, [I]), /* @__PURE__ */ n("section", {
|
|
2370
|
+
className: He,
|
|
2371
|
+
"aria-busy": _,
|
|
2372
|
+
children: [
|
|
2373
|
+
/* @__PURE__ */ t("div", {
|
|
2374
|
+
className: Q.srOnly,
|
|
2375
|
+
"aria-live": "polite",
|
|
2376
|
+
"aria-atomic": "true",
|
|
2377
|
+
children: ct
|
|
2378
|
+
}),
|
|
2379
|
+
re && Me.size > 0 && /* @__PURE__ */ t("div", {
|
|
2380
|
+
className: Q.bulkActions,
|
|
2381
|
+
role: "region",
|
|
2382
|
+
"aria-label": "Действия с выбранными строками",
|
|
2383
|
+
children: re({
|
|
2384
|
+
selectedRowIds: Array.from(Me),
|
|
2385
|
+
selectedRows: st,
|
|
2386
|
+
clearSelection: at
|
|
2387
|
+
})
|
|
2388
|
+
}),
|
|
2389
|
+
G && /* @__PURE__ */ n("form", {
|
|
2390
|
+
className: Q.filterBar,
|
|
2391
|
+
role: "search",
|
|
2392
|
+
"aria-label": "Фильтры таблицы",
|
|
2393
|
+
onSubmit: (e) => {
|
|
2394
|
+
e.preventDefault(), !(!Je || Ye || G.applying || _) && (me(0), H?.(1), G.onApply({
|
|
2395
|
+
filters: G.draftValues,
|
|
2396
|
+
pageSize: Z
|
|
2397
|
+
}));
|
|
2398
|
+
},
|
|
2399
|
+
children: [
|
|
2400
|
+
/* @__PURE__ */ t("div", {
|
|
2401
|
+
className: Q.filterFields,
|
|
2402
|
+
children: G.fields.map((e) => /* @__PURE__ */ t(dt, {
|
|
2403
|
+
field: e,
|
|
2404
|
+
value: G.draftValues[e.key],
|
|
2405
|
+
disabled: !!(e.disabled || G.applying || _),
|
|
2406
|
+
error: qe[e.key],
|
|
2407
|
+
setValue: (t) => G.onDraftValuesChange({
|
|
2408
|
+
...G.draftValues,
|
|
2409
|
+
[e.key]: t
|
|
2410
|
+
})
|
|
2411
|
+
}, e.key))
|
|
2412
|
+
}),
|
|
2413
|
+
Ge && $e("top", !0),
|
|
2414
|
+
/* @__PURE__ */ n("div", {
|
|
2415
|
+
className: Q.filterActions,
|
|
2416
|
+
children: [/* @__PURE__ */ t(j, {
|
|
2417
|
+
variant: "empty",
|
|
2418
|
+
disabled: G.applying || _,
|
|
2419
|
+
onClick: () => {
|
|
2420
|
+
let e = G.resetValues ?? G.appliedValues;
|
|
2421
|
+
G.onDraftValuesChange(e);
|
|
2422
|
+
let t = G.resetPageSize ?? R[0] ?? 30;
|
|
2423
|
+
z === void 0 && ge(t), B?.(t), G.onReset?.({
|
|
2424
|
+
filters: e,
|
|
2425
|
+
pageSize: t
|
|
2426
|
+
});
|
|
2427
|
+
},
|
|
2428
|
+
children: G.resetLabel ?? "Сбросить"
|
|
2429
|
+
}), /* @__PURE__ */ t(j, {
|
|
2430
|
+
type: "submit",
|
|
2431
|
+
isLoading: G.applying,
|
|
2432
|
+
disabled: !Je || Ye || _,
|
|
2433
|
+
children: G.applyLabel ?? "Применить"
|
|
2434
|
+
})]
|
|
2435
|
+
})
|
|
2436
|
+
]
|
|
2437
|
+
}),
|
|
2438
|
+
Ge && !G && $e("top"),
|
|
2439
|
+
!Ve && !_ && !Ue && Ae.length > 0 && ze.length > 0 && /* @__PURE__ */ t(et, {
|
|
2440
|
+
className: Q.mobileSort,
|
|
2441
|
+
options: ze,
|
|
2442
|
+
value: _e[0] ? {
|
|
2443
|
+
id: _e[0].id,
|
|
2444
|
+
direction: _e[0].desc ? "desc" : "asc"
|
|
2445
|
+
} : null,
|
|
2446
|
+
onChange: (e) => we.setSorting([{
|
|
2447
|
+
id: e.id,
|
|
2448
|
+
desc: e.direction === "desc"
|
|
2449
|
+
}])
|
|
2450
|
+
}),
|
|
2451
|
+
/* @__PURE__ */ t("div", {
|
|
2452
|
+
className: Q.tableWrap,
|
|
2453
|
+
style: { maxHeight: S },
|
|
2454
|
+
children: /* @__PURE__ */ n("table", {
|
|
2455
|
+
className: Q.table,
|
|
2456
|
+
"aria-label": h,
|
|
2457
|
+
children: [
|
|
2458
|
+
p && /* @__PURE__ */ t("caption", { children: p }),
|
|
2459
|
+
(Ce || T || !!W) && /* @__PURE__ */ n("colgroup", { children: [
|
|
2460
|
+
W && /* @__PURE__ */ t("col", { className: Q.expansionColumn }),
|
|
2461
|
+
T && /* @__PURE__ */ t("col", { className: Q.selectionColumn }),
|
|
2462
|
+
Y.map((e) => /* @__PURE__ */ t("col", { style: pt(e) }, e.id))
|
|
2463
|
+
] }),
|
|
2464
|
+
/* @__PURE__ */ t("thead", {
|
|
2465
|
+
className: b ? Q.sticky : "",
|
|
2466
|
+
children: we.getHeaderGroups().map((e) => /* @__PURE__ */ n("tr", { children: [
|
|
2467
|
+
W && /* @__PURE__ */ t("th", {
|
|
2468
|
+
className: Q.expansionCell,
|
|
2469
|
+
scope: "col",
|
|
2470
|
+
children: /* @__PURE__ */ t("span", {
|
|
2471
|
+
className: Q.srOnly,
|
|
2472
|
+
children: "Подробности"
|
|
2473
|
+
})
|
|
2474
|
+
}),
|
|
2475
|
+
T && /* @__PURE__ */ t("th", {
|
|
2476
|
+
className: Q.selectionHeaderCell,
|
|
2477
|
+
scope: "col",
|
|
2478
|
+
children: /* @__PURE__ */ n("div", {
|
|
2479
|
+
className: Q.selectionHeaderControls,
|
|
2480
|
+
children: [/* @__PURE__ */ t(xe, {
|
|
2481
|
+
checked: Le,
|
|
2482
|
+
indeterminate: Re,
|
|
2483
|
+
disabled: _ || Fe.length === 0,
|
|
2484
|
+
ariaLabel: A,
|
|
2485
|
+
onChange: it
|
|
2486
|
+
}), /* @__PURE__ */ t(j, {
|
|
2487
|
+
size: "sm",
|
|
2488
|
+
variant: "empty",
|
|
2489
|
+
disabled: Me.size === 0,
|
|
2490
|
+
"aria-label": M,
|
|
2491
|
+
title: M,
|
|
2492
|
+
onClick: at,
|
|
2493
|
+
children: /* @__PURE__ */ t(J, {
|
|
2494
|
+
name: "IconX",
|
|
2495
|
+
width: 16,
|
|
2496
|
+
height: 16
|
|
2497
|
+
})
|
|
2498
|
+
})]
|
|
2499
|
+
})
|
|
2500
|
+
}),
|
|
2501
|
+
e.headers.map((e) => {
|
|
2502
|
+
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
|
|
2503
|
+
return /* @__PURE__ */ t("th", {
|
|
2504
|
+
scope: "col",
|
|
2505
|
+
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
2506
|
+
className: Y.find((t) => t.id === e.column.id)?.sticky ? Q.stickyColumn : void 0,
|
|
2507
|
+
style: {
|
|
2508
|
+
...pt(Y.find((t) => t.id === e.column.id)),
|
|
2509
|
+
...mt(Y.find((t) => t.id === e.column.id))
|
|
2510
|
+
},
|
|
2511
|
+
children: /* @__PURE__ */ n("button", {
|
|
2512
|
+
type: "button",
|
|
2513
|
+
className: Q.sortButton,
|
|
2514
|
+
disabled: !i,
|
|
2515
|
+
onClick: a,
|
|
2516
|
+
children: [/* @__PURE__ */ t(we.FlexRender, { header: e }), /* @__PURE__ */ t(J, {
|
|
2517
|
+
name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
|
|
2518
|
+
width: 16,
|
|
2519
|
+
height: 16
|
|
2520
|
+
})]
|
|
2521
|
+
})
|
|
2522
|
+
}, e.id);
|
|
2523
|
+
})
|
|
2524
|
+
] }, e.id))
|
|
2525
|
+
}),
|
|
2526
|
+
/* @__PURE__ */ t("tbody", { children: _ ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2527
|
+
colSpan: Y.length + +!!T + +!!W,
|
|
2528
|
+
children: /* @__PURE__ */ t(Ke, {
|
|
2529
|
+
lines: 3,
|
|
2530
|
+
height: 65
|
|
2531
|
+
})
|
|
2532
|
+
}) }) : Ue ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2533
|
+
className: Q.state,
|
|
2534
|
+
colSpan: Y.length + +!!T + +!!W,
|
|
2535
|
+
children: Ue
|
|
2536
|
+
}) }) : Ae.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2537
|
+
className: Q.state,
|
|
2538
|
+
colSpan: Y.length + +!!T + +!!W,
|
|
2539
|
+
children: y
|
|
2540
|
+
}) }) : Ae.map((e) => {
|
|
2541
|
+
let i = Me.has(e.id), a = k?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = Pe.has(e.id);
|
|
2542
|
+
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ n("tr", {
|
|
2543
|
+
className: [w || T ? Q.clickableRow : "", i ? Q.selectedRow : ""].filter(Boolean).join(" "),
|
|
2544
|
+
"aria-selected": T ? i : void 0,
|
|
2545
|
+
onClick: () => {
|
|
2546
|
+
T ? rt(e.id) : w?.(e.original);
|
|
2547
|
+
},
|
|
2548
|
+
onDoubleClick: () => {
|
|
2549
|
+
T && O?.(e.original);
|
|
2550
|
+
},
|
|
2551
|
+
onKeyDown: (t) => {
|
|
2552
|
+
t.key === "Enter" ? (t.preventDefault(), T ? O?.(e.original) : w?.(e.original)) : t.key === " " && T && (t.preventDefault(), rt(e.id));
|
|
2553
|
+
},
|
|
2554
|
+
tabIndex: w || T || O ? 0 : void 0,
|
|
2555
|
+
role: !T && w ? "button" : void 0,
|
|
2556
|
+
children: [
|
|
2557
|
+
W && /* @__PURE__ */ t("td", {
|
|
2558
|
+
className: Q.expansionCell,
|
|
2559
|
+
onClick: (e) => e.stopPropagation(),
|
|
2560
|
+
children: /* @__PURE__ */ t(j, {
|
|
2561
|
+
size: "sm",
|
|
2562
|
+
variant: "empty",
|
|
2563
|
+
"aria-expanded": o,
|
|
2564
|
+
"aria-label": oe?.(e.original, o) ?? (o ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2565
|
+
onClick: () => ot(e.id),
|
|
2566
|
+
children: /* @__PURE__ */ t(J, {
|
|
2567
|
+
name: "IconChevron",
|
|
2568
|
+
width: 16,
|
|
2569
|
+
height: 16,
|
|
2570
|
+
className: o ? Q.expansionIconOpen : Q.expansionIcon
|
|
2571
|
+
})
|
|
2572
|
+
})
|
|
2573
|
+
}),
|
|
2574
|
+
T && /* @__PURE__ */ t("td", {
|
|
2575
|
+
className: Q.selectionCell,
|
|
2576
|
+
children: /* @__PURE__ */ t("div", {
|
|
2577
|
+
onClick: (e) => e.stopPropagation(),
|
|
2578
|
+
children: /* @__PURE__ */ t(xe, {
|
|
2579
|
+
checked: i,
|
|
2580
|
+
ariaLabel: a,
|
|
2581
|
+
onChange: () => rt(e.id)
|
|
2582
|
+
})
|
|
2583
|
+
})
|
|
2584
|
+
}),
|
|
2585
|
+
e.getAllCells().map((e) => /* @__PURE__ */ t("td", {
|
|
2586
|
+
className: Y.find((t) => t.id === e.column.id)?.sticky ? Q.stickyColumn : void 0,
|
|
2587
|
+
style: {
|
|
2588
|
+
...pt(Y.find((t) => t.id === e.column.id)),
|
|
2589
|
+
...mt(Y.find((t) => t.id === e.column.id))
|
|
2590
|
+
},
|
|
2591
|
+
children: /* @__PURE__ */ t(we.FlexRender, { cell: e })
|
|
2592
|
+
}, e.id))
|
|
2593
|
+
]
|
|
2594
|
+
}), o && W && /* @__PURE__ */ t("tr", {
|
|
2595
|
+
className: Q.detailRow,
|
|
2596
|
+
children: /* @__PURE__ */ t("td", {
|
|
2597
|
+
colSpan: Y.length + +!!T + 1,
|
|
2598
|
+
children: W({
|
|
2599
|
+
row: e.original,
|
|
2600
|
+
rowId: e.id,
|
|
2601
|
+
collapse: () => ot(e.id)
|
|
2602
|
+
})
|
|
2603
|
+
})
|
|
2604
|
+
})] }, e.id);
|
|
2605
|
+
}) })
|
|
2606
|
+
]
|
|
2607
|
+
})
|
|
2608
|
+
}),
|
|
2609
|
+
!Ve && /* @__PURE__ */ n("div", {
|
|
2610
|
+
className: Q.cards,
|
|
2611
|
+
role: "list",
|
|
2612
|
+
"aria-label": h ?? p,
|
|
2613
|
+
children: [T && !_ && !Ue && Ae.length > 0 && /* @__PURE__ */ n("div", {
|
|
2614
|
+
className: Q.mobileSelectionControls,
|
|
2615
|
+
children: [/* @__PURE__ */ t(xe, {
|
|
2616
|
+
checked: Le,
|
|
2617
|
+
indeterminate: Re,
|
|
2618
|
+
ariaLabel: A,
|
|
2619
|
+
label: A,
|
|
2620
|
+
onChange: it
|
|
2621
|
+
}), /* @__PURE__ */ t(j, {
|
|
2622
|
+
size: "sm",
|
|
2623
|
+
variant: "empty",
|
|
2624
|
+
disabled: Me.size === 0,
|
|
2625
|
+
onClick: at,
|
|
2626
|
+
children: M
|
|
2627
|
+
})]
|
|
2628
|
+
}), _ ? /* @__PURE__ */ t(Ke, {
|
|
2629
|
+
lines: 4,
|
|
2630
|
+
height: 65
|
|
2631
|
+
}) : Ue ? /* @__PURE__ */ t("div", {
|
|
2632
|
+
className: Q.state,
|
|
2633
|
+
children: Ue
|
|
2634
|
+
}) : Ae.length === 0 ? /* @__PURE__ */ t("div", {
|
|
2635
|
+
className: Q.state,
|
|
2636
|
+
children: y
|
|
2637
|
+
}) : Ae.map((e) => {
|
|
2638
|
+
let r = Me.has(e.id), i = Pe.has(e.id), a = k?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = T && /* @__PURE__ */ n("div", {
|
|
2639
|
+
className: Q.cardSelectionControls,
|
|
2640
|
+
onClick: (e) => e.stopPropagation(),
|
|
2641
|
+
children: [/* @__PURE__ */ t(xe, {
|
|
2642
|
+
checked: r,
|
|
2643
|
+
ariaLabel: a,
|
|
2644
|
+
onChange: () => rt(e.id)
|
|
2645
|
+
}), O && /* @__PURE__ */ t(j, {
|
|
2646
|
+
size: "sm",
|
|
2647
|
+
variant: "empty",
|
|
2648
|
+
onClick: () => O(e.original),
|
|
2649
|
+
children: ee
|
|
2650
|
+
})]
|
|
2651
|
+
}), s = W && /* @__PURE__ */ t(j, {
|
|
2652
|
+
size: "sm",
|
|
2653
|
+
variant: "empty",
|
|
2654
|
+
"aria-expanded": i,
|
|
2655
|
+
"aria-label": oe?.(e.original, i) ?? (i ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2656
|
+
onClick: (t) => {
|
|
2657
|
+
t.stopPropagation(), ot(e.id);
|
|
2528
2658
|
},
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
disabled: o,
|
|
2535
|
-
"aria-label": j ? w : T,
|
|
2536
|
-
"aria-pressed": j,
|
|
2537
|
-
onClick: () => M((e) => !e),
|
|
2538
|
-
children: /* @__PURE__ */ t(q, {
|
|
2539
|
-
name: j ? "IconEyeOff" : "IconEye",
|
|
2540
|
-
width: 20,
|
|
2541
|
-
height: 20
|
|
2659
|
+
children: /* @__PURE__ */ t(J, {
|
|
2660
|
+
name: "IconChevron",
|
|
2661
|
+
width: 16,
|
|
2662
|
+
height: 16,
|
|
2663
|
+
className: i ? Q.expansionIconOpen : Q.expansionIcon
|
|
2542
2664
|
})
|
|
2543
|
-
})
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
className:
|
|
2547
|
-
"aria-
|
|
2665
|
+
});
|
|
2666
|
+
if (u) return /* @__PURE__ */ n("div", {
|
|
2667
|
+
role: "listitem",
|
|
2668
|
+
className: `${Q.customCardShell} ${r ? Q.selectedCard : ""}`,
|
|
2669
|
+
"aria-selected": T ? r : void 0,
|
|
2548
2670
|
onClick: () => {
|
|
2549
|
-
|
|
2550
|
-
e && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
|
|
2671
|
+
T && rt(e.id);
|
|
2551
2672
|
},
|
|
2552
|
-
children:
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2673
|
+
children: [
|
|
2674
|
+
o,
|
|
2675
|
+
u({
|
|
2676
|
+
row: e.original,
|
|
2677
|
+
columns: Y
|
|
2678
|
+
}),
|
|
2679
|
+
s,
|
|
2680
|
+
i && /* @__PURE__ */ t("div", {
|
|
2681
|
+
className: Q.cardDetail,
|
|
2682
|
+
children: W?.({
|
|
2683
|
+
row: e.original,
|
|
2684
|
+
rowId: e.id,
|
|
2685
|
+
collapse: () => ot(e.id)
|
|
2686
|
+
})
|
|
2687
|
+
})
|
|
2688
|
+
]
|
|
2689
|
+
}, e.id);
|
|
2690
|
+
let c = Y.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), l = c.find((e) => e.mobile?.primary) ?? c.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => _t(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
|
|
2691
|
+
return /* @__PURE__ */ n("article", {
|
|
2692
|
+
role: "listitem",
|
|
2693
|
+
className: `${Q.card} ${r ? Q.selectedCard : ""}`,
|
|
2694
|
+
"aria-selected": T ? r : void 0,
|
|
2695
|
+
onClick: () => {
|
|
2696
|
+
T && rt(e.id);
|
|
2697
|
+
},
|
|
2698
|
+
children: [
|
|
2699
|
+
o,
|
|
2700
|
+
s,
|
|
2701
|
+
/* @__PURE__ */ t("h3", { children: l ? f(l) : `Строка ${e.index + 1}` }),
|
|
2702
|
+
/* @__PURE__ */ t("dl", { children: c.filter((e) => e !== l && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
|
|
2703
|
+
className: e.mobile?.mobileSpan === 2 ? Q.spanTwo : "",
|
|
2704
|
+
children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: f(e) })]
|
|
2705
|
+
}, e.id)) }),
|
|
2706
|
+
c.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: f(e) }, e.id)),
|
|
2707
|
+
i && /* @__PURE__ */ t("div", {
|
|
2708
|
+
className: Q.cardDetail,
|
|
2709
|
+
children: W?.({
|
|
2710
|
+
row: e.original,
|
|
2711
|
+
rowId: e.id,
|
|
2712
|
+
collapse: () => ot(e.id)
|
|
2713
|
+
})
|
|
2714
|
+
})
|
|
2715
|
+
]
|
|
2716
|
+
}, e.id);
|
|
2717
|
+
})]
|
|
2563
2718
|
}),
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
children:
|
|
2719
|
+
(We || Ge && !_ && !Ue && Ae.length > 0) && /* @__PURE__ */ n("nav", {
|
|
2720
|
+
className: Q.pagination,
|
|
2721
|
+
"aria-label": "Пагинация таблицы",
|
|
2722
|
+
children: [Ge ? $e("bottom") : /* @__PURE__ */ n("span", {
|
|
2723
|
+
className: Q.paginationRange,
|
|
2724
|
+
"aria-live": "polite",
|
|
2725
|
+
children: [
|
|
2726
|
+
Xe,
|
|
2727
|
+
"–",
|
|
2728
|
+
Ze,
|
|
2729
|
+
" из ",
|
|
2730
|
+
Ee
|
|
2731
|
+
]
|
|
2732
|
+
}), We && /* @__PURE__ */ n("div", {
|
|
2733
|
+
className: Q.paginationControls,
|
|
2734
|
+
children: [
|
|
2735
|
+
/* @__PURE__ */ n(j, {
|
|
2736
|
+
variant: "empty",
|
|
2737
|
+
size: "md",
|
|
2738
|
+
disabled: _ || ke === 0,
|
|
2739
|
+
"aria-label": "Предыдущая страница",
|
|
2740
|
+
onClick: () => {
|
|
2741
|
+
tt(ke - 1);
|
|
2742
|
+
},
|
|
2743
|
+
children: [/* @__PURE__ */ t(J, {
|
|
2744
|
+
name: "IconChevron",
|
|
2745
|
+
width: 18,
|
|
2746
|
+
height: 18,
|
|
2747
|
+
className: Q.previousIcon
|
|
2748
|
+
}), /* @__PURE__ */ t("span", {
|
|
2749
|
+
className: Q.paginationButtonLabel,
|
|
2750
|
+
children: "Назад"
|
|
2751
|
+
})]
|
|
2752
|
+
}),
|
|
2753
|
+
/* @__PURE__ */ t("div", {
|
|
2754
|
+
className: Q.pageNumbers,
|
|
2755
|
+
children: Be.map((e) => typeof e == "number" ? /* @__PURE__ */ t(j, {
|
|
2756
|
+
variant: e === ke ? "secondary" : "empty",
|
|
2757
|
+
size: "md",
|
|
2758
|
+
className: Q.pageButton,
|
|
2759
|
+
"aria-label": `Перейти на страницу ${e + 1}`,
|
|
2760
|
+
"aria-current": e === ke ? "page" : void 0,
|
|
2761
|
+
disabled: _,
|
|
2762
|
+
onClick: () => {
|
|
2763
|
+
tt(e);
|
|
2764
|
+
},
|
|
2765
|
+
children: e + 1
|
|
2766
|
+
}, e) : /* @__PURE__ */ t("span", {
|
|
2767
|
+
className: Q.ellipsis,
|
|
2768
|
+
"aria-hidden": "true",
|
|
2769
|
+
children: "…"
|
|
2770
|
+
}, e))
|
|
2771
|
+
}),
|
|
2772
|
+
/* @__PURE__ */ n(j, {
|
|
2773
|
+
variant: "empty",
|
|
2774
|
+
size: "md",
|
|
2775
|
+
disabled: _ || ke === De - 1,
|
|
2776
|
+
"aria-label": "Следующая страница",
|
|
2777
|
+
onClick: () => {
|
|
2778
|
+
tt(ke + 1);
|
|
2779
|
+
},
|
|
2780
|
+
children: [/* @__PURE__ */ t("span", {
|
|
2781
|
+
className: Q.paginationButtonLabel,
|
|
2782
|
+
children: "Вперёд"
|
|
2783
|
+
}), /* @__PURE__ */ t(J, {
|
|
2784
|
+
name: "IconChevron",
|
|
2785
|
+
width: 18,
|
|
2786
|
+
height: 18,
|
|
2787
|
+
className: Q.nextIcon
|
|
2788
|
+
})]
|
|
2789
|
+
})
|
|
2790
|
+
]
|
|
2791
|
+
})]
|
|
2568
2792
|
})
|
|
2569
2793
|
]
|
|
2570
2794
|
});
|
|
2571
|
-
},
|
|
2795
|
+
}, Et = (e, t) => {
|
|
2572
2796
|
let n = t.trim().toLocaleLowerCase();
|
|
2573
2797
|
return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
|
|
2574
|
-
},
|
|
2798
|
+
}, Dt = (e, t, n) => {
|
|
2575
2799
|
if (!e.length) return -1;
|
|
2576
2800
|
for (let r = 0; r < e.length; r += 1) {
|
|
2577
2801
|
let i = (t + r * n + e.length) % e.length;
|
|
2578
2802
|
if (!e[i]?.disabled) return i;
|
|
2579
2803
|
}
|
|
2580
2804
|
return -1;
|
|
2581
|
-
},
|
|
2805
|
+
}, Ot = {
|
|
2582
2806
|
wrapper: "_wrapper_1v2s8_1",
|
|
2583
2807
|
control: "_control_1v2s8_17",
|
|
2584
2808
|
inputHost: "_inputHost_1v2s8_25",
|
|
@@ -2596,23 +2820,23 @@ var M = {
|
|
|
2596
2820
|
selected: "_selected_1v2s8_321",
|
|
2597
2821
|
active: "_active_1v2s8_321",
|
|
2598
2822
|
visuallyHidden: "_visuallyHidden_1v2s8_341"
|
|
2599
|
-
},
|
|
2823
|
+
}, kt = 8, At = 6, jt = 5, Mt = 10, Nt = {
|
|
2600
2824
|
sm: 30,
|
|
2601
2825
|
md: 40,
|
|
2602
2826
|
lg: 50
|
|
2603
|
-
},
|
|
2827
|
+
}, Pt = ({ 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 }) => {
|
|
2604
2828
|
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 = [
|
|
2605
2829
|
A,
|
|
2606
2830
|
j,
|
|
2607
2831
|
M
|
|
2608
|
-
].filter(Boolean).join(" "), F = h(null), I = h(null), L = h([]), [R, z] = g(!1), [B, te] = g(""), [V, H] = g(-1), [U, ne] = g(null), re = m(() => e.find((e) => e.value === r), [e, r]),
|
|
2832
|
+
].filter(Boolean).join(" "), F = h(null), I = h(null), L = h([]), [R, z] = g(!1), [B, te] = g(""), [V, H] = g(-1), [U, ne] = g(null), re = m(() => e.find((e) => e.value === r), [e, r]), W = m(() => Et(e, B), [e, B]), ie = s && u, ae = V >= 0 ? W[V] : void 0;
|
|
2609
2833
|
d(() => te(re?.label ?? ""), [re?.label, r]);
|
|
2610
|
-
let
|
|
2834
|
+
let oe = l(() => F.current?.querySelector("input") ?? null, []), se = l((e, t) => Dt(W, e, t), [W]), G = l((e) => {
|
|
2611
2835
|
H(e), !(e < 0) && requestAnimationFrame(() => L.current[e]?.scrollIntoView({ block: "nearest" }));
|
|
2612
|
-
}, []),
|
|
2613
|
-
let e =
|
|
2836
|
+
}, []), K = l(() => {
|
|
2837
|
+
let e = oe();
|
|
2614
2838
|
if (!e) return;
|
|
2615
|
-
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(
|
|
2839
|
+
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(W.length, jt)) * Nt[x] + Mt, r = window.innerHeight - t.bottom - kt, i = t.top - kt, a = r < n && i > r, o = a ? i : r, s = Math.max(Nt[x] + Mt, 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 - At) : t.bottom + At;
|
|
2616
2840
|
ne({
|
|
2617
2841
|
top: u,
|
|
2618
2842
|
left: l,
|
|
@@ -2620,8 +2844,8 @@ var M = {
|
|
|
2620
2844
|
maxHeight: s
|
|
2621
2845
|
});
|
|
2622
2846
|
}, [
|
|
2623
|
-
|
|
2624
|
-
|
|
2847
|
+
W.length,
|
|
2848
|
+
oe,
|
|
2625
2849
|
x
|
|
2626
2850
|
]);
|
|
2627
2851
|
p(() => {
|
|
@@ -2629,10 +2853,10 @@ var M = {
|
|
|
2629
2853
|
ne(null);
|
|
2630
2854
|
return;
|
|
2631
2855
|
}
|
|
2632
|
-
return
|
|
2633
|
-
window.removeEventListener("resize",
|
|
2856
|
+
return K(), window.addEventListener("resize", K), window.addEventListener("scroll", K, !0), () => {
|
|
2857
|
+
window.removeEventListener("resize", K), window.removeEventListener("scroll", K, !0);
|
|
2634
2858
|
};
|
|
2635
|
-
}, [R,
|
|
2859
|
+
}, [R, K]), d(() => {
|
|
2636
2860
|
if (!R) return;
|
|
2637
2861
|
let e = (e) => {
|
|
2638
2862
|
let t = e.target;
|
|
@@ -2640,14 +2864,14 @@ var M = {
|
|
|
2640
2864
|
};
|
|
2641
2865
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
2642
2866
|
}, [R]);
|
|
2643
|
-
let
|
|
2644
|
-
s || c || (z(!0), H(
|
|
2645
|
-
},
|
|
2646
|
-
e.disabled || (te(e.label), z(!1), H(-1), i?.(e.value, e),
|
|
2647
|
-
},
|
|
2867
|
+
let ce = () => {
|
|
2868
|
+
s || c || (z(!0), H(se(0, 1)));
|
|
2869
|
+
}, le = (e) => {
|
|
2870
|
+
e.disabled || (te(e.label), z(!1), H(-1), i?.(e.value, e), oe()?.focus());
|
|
2871
|
+
}, ue = R ? /* @__PURE__ */ t("ul", {
|
|
2648
2872
|
ref: I,
|
|
2649
2873
|
id: k,
|
|
2650
|
-
className: `${
|
|
2874
|
+
className: `${Ot.menu} ${W.length === 0 ? Ot.menuEmpty : ""}`,
|
|
2651
2875
|
role: "listbox",
|
|
2652
2876
|
"aria-label": v,
|
|
2653
2877
|
style: U ? {
|
|
@@ -2661,10 +2885,10 @@ var M = {
|
|
|
2661
2885
|
visibility: "hidden",
|
|
2662
2886
|
maxHeight: 0
|
|
2663
2887
|
},
|
|
2664
|
-
children:
|
|
2665
|
-
className: `${
|
|
2888
|
+
children: W.length === 0 ? /* @__PURE__ */ t("li", {
|
|
2889
|
+
className: `${Ot.empty} ${Ot[x]}`,
|
|
2666
2890
|
children: o
|
|
2667
|
-
}) :
|
|
2891
|
+
}) : W.map((e, i) => {
|
|
2668
2892
|
let a = e.value === r, o = i === V;
|
|
2669
2893
|
return /* @__PURE__ */ t("li", {
|
|
2670
2894
|
role: "presentation",
|
|
@@ -2680,16 +2904,16 @@ var M = {
|
|
|
2680
2904
|
"aria-disabled": e.disabled,
|
|
2681
2905
|
"aria-selected": a,
|
|
2682
2906
|
className: [
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
a ?
|
|
2686
|
-
o ?
|
|
2907
|
+
Ot.option,
|
|
2908
|
+
Ot[x],
|
|
2909
|
+
a ? Ot.selected : "",
|
|
2910
|
+
o ? Ot.active : ""
|
|
2687
2911
|
].filter(Boolean).join(" "),
|
|
2688
2912
|
onPointerMove: () => {
|
|
2689
2913
|
e.disabled || H(i);
|
|
2690
2914
|
},
|
|
2691
|
-
onClick: () =>
|
|
2692
|
-
children: [/* @__PURE__ */ t("span", { children: e.label }), a && E && /* @__PURE__ */ t(
|
|
2915
|
+
onClick: () => le(e),
|
|
2916
|
+
children: [/* @__PURE__ */ t("span", { children: e.label }), a && E && /* @__PURE__ */ t(J, {
|
|
2693
2917
|
name: "IconCheck",
|
|
2694
2918
|
width: 16,
|
|
2695
2919
|
height: 16
|
|
@@ -2701,23 +2925,23 @@ var M = {
|
|
|
2701
2925
|
return /* @__PURE__ */ n("div", {
|
|
2702
2926
|
ref: F,
|
|
2703
2927
|
className: [
|
|
2704
|
-
|
|
2705
|
-
y ?
|
|
2928
|
+
Ot.wrapper,
|
|
2929
|
+
y ? Ot.errorState : "",
|
|
2706
2930
|
C
|
|
2707
2931
|
].filter(Boolean).join(" "),
|
|
2708
2932
|
children: [
|
|
2709
2933
|
v && /* @__PURE__ */ t(ee, {
|
|
2710
|
-
htmlFor:
|
|
2934
|
+
htmlFor: ie ? void 0 : O,
|
|
2711
2935
|
required: S,
|
|
2712
2936
|
disabled: s,
|
|
2713
2937
|
children: v
|
|
2714
2938
|
}),
|
|
2715
|
-
|
|
2716
|
-
className: `${
|
|
2939
|
+
ie ? /* @__PURE__ */ t("div", {
|
|
2940
|
+
className: `${Ot.disabledText} ${Ot[x]}`,
|
|
2717
2941
|
children: re?.label ?? a
|
|
2718
2942
|
}) : /* @__PURE__ */ n("div", {
|
|
2719
|
-
className:
|
|
2720
|
-
children: [/* @__PURE__ */ t(
|
|
2943
|
+
className: Ot.control,
|
|
2944
|
+
children: [/* @__PURE__ */ t(nt, {
|
|
2721
2945
|
id: O,
|
|
2722
2946
|
name: w,
|
|
2723
2947
|
value: B,
|
|
@@ -2728,50 +2952,50 @@ var M = {
|
|
|
2728
2952
|
size: x,
|
|
2729
2953
|
clearable: !1,
|
|
2730
2954
|
autoComplete: "off",
|
|
2731
|
-
className: `${
|
|
2732
|
-
onFocus:
|
|
2955
|
+
className: `${Ot.inputHost} ${Ot[x]}`,
|
|
2956
|
+
onFocus: ce,
|
|
2733
2957
|
onChange: (t) => {
|
|
2734
|
-
let n = String(t), r =
|
|
2735
|
-
te(n), z(!0), H(
|
|
2958
|
+
let n = String(t), r = Et(e, n);
|
|
2959
|
+
te(n), z(!0), H(Dt(r, 0, 1));
|
|
2736
2960
|
},
|
|
2737
2961
|
role: "combobox",
|
|
2738
2962
|
"aria-autocomplete": "list",
|
|
2739
2963
|
"aria-expanded": R,
|
|
2740
2964
|
"aria-controls": k,
|
|
2741
|
-
"aria-activedescendant":
|
|
2965
|
+
"aria-activedescendant": ae ? `${O}-option-${V}` : void 0,
|
|
2742
2966
|
"aria-invalid": !!y,
|
|
2743
2967
|
"aria-describedby": P,
|
|
2744
|
-
onClick:
|
|
2968
|
+
onClick: ce,
|
|
2745
2969
|
onKeyDown: (e) => {
|
|
2746
2970
|
if (!(s || c)) {
|
|
2747
2971
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
2748
2972
|
e.preventDefault();
|
|
2749
|
-
let t = e.key === "ArrowDown" ? 1 : -1, n = V >= 0 ? V + t : t === 1 ? 0 :
|
|
2750
|
-
z(!0),
|
|
2973
|
+
let t = e.key === "ArrowDown" ? 1 : -1, n = V >= 0 ? V + t : t === 1 ? 0 : W.length - 1;
|
|
2974
|
+
z(!0), G(se(n, t));
|
|
2751
2975
|
} else if (e.key === "Home" || e.key === "End") {
|
|
2752
2976
|
if (!R) return;
|
|
2753
2977
|
e.preventDefault();
|
|
2754
2978
|
let t = e.key === "Home" ? 1 : -1;
|
|
2755
|
-
|
|
2756
|
-
} else e.key === "Enter" && R &&
|
|
2979
|
+
G(se(e.key === "Home" ? 0 : W.length - 1, t));
|
|
2980
|
+
} else e.key === "Enter" && R && ae ? (e.preventDefault(), le(ae)) : e.key === "Escape" && R ? (e.preventDefault(), z(!1), H(-1)) : e.key === "Tab" && (z(!1), H(-1));
|
|
2757
2981
|
}
|
|
2758
2982
|
}
|
|
2759
2983
|
}), /* @__PURE__ */ t("span", {
|
|
2760
|
-
className: `${
|
|
2984
|
+
className: `${Ot.chevron} ${R ? Ot.chevronOpen : ""}`,
|
|
2761
2985
|
"aria-hidden": "true",
|
|
2762
|
-
children: /* @__PURE__ */ t(
|
|
2986
|
+
children: /* @__PURE__ */ t(J, {
|
|
2763
2987
|
name: "IconChevron",
|
|
2764
2988
|
width: 20,
|
|
2765
2989
|
height: 20
|
|
2766
2990
|
})
|
|
2767
2991
|
})]
|
|
2768
2992
|
}),
|
|
2769
|
-
R && typeof document < "u" && _(
|
|
2993
|
+
R && typeof document < "u" && _(ue, document.body),
|
|
2770
2994
|
/* @__PURE__ */ n("span", {
|
|
2771
2995
|
id: A,
|
|
2772
|
-
className:
|
|
2996
|
+
className: Ot.visuallyHidden,
|
|
2773
2997
|
"aria-live": "polite",
|
|
2774
|
-
children: ["Найдено вариантов: ",
|
|
2998
|
+
children: ["Найдено вариантов: ", W.length]
|
|
2775
2999
|
}),
|
|
2776
3000
|
b && !y && /* @__PURE__ */ t(N, {
|
|
2777
3001
|
id: j,
|
|
@@ -2784,82 +3008,44 @@ var M = {
|
|
|
2784
3008
|
})
|
|
2785
3009
|
]
|
|
2786
3010
|
});
|
|
2787
|
-
},
|
|
3011
|
+
}, Ft = {
|
|
2788
3012
|
root: "_root_11adi_1",
|
|
2789
3013
|
header: "_header_11adi_21",
|
|
2790
3014
|
title: "_title_11adi_41",
|
|
2791
3015
|
dismiss: "_dismiss_11adi_55",
|
|
2792
3016
|
content: "_content_11adi_65"
|
|
2793
|
-
},
|
|
3017
|
+
}, It = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: c = "" }) => {
|
|
2794
3018
|
let l = `ds-info-block-${f()}`;
|
|
2795
3019
|
return /* @__PURE__ */ n("section", {
|
|
2796
|
-
className: `${
|
|
3020
|
+
className: `${Ft.root} ${c}`,
|
|
2797
3021
|
"aria-labelledby": l,
|
|
2798
3022
|
children: [/* @__PURE__ */ n("header", {
|
|
2799
|
-
className:
|
|
3023
|
+
className: Ft.header,
|
|
2800
3024
|
children: [/* @__PURE__ */ t(s, {
|
|
2801
3025
|
id: l,
|
|
2802
|
-
className:
|
|
3026
|
+
className: Ft.title,
|
|
2803
3027
|
children: e
|
|
2804
3028
|
}), i && /* @__PURE__ */ t(j, {
|
|
2805
|
-
className:
|
|
3029
|
+
className: Ft.dismiss,
|
|
2806
3030
|
variant: "empty",
|
|
2807
3031
|
onClick: a,
|
|
2808
3032
|
"aria-label": o,
|
|
2809
|
-
children: /* @__PURE__ */ t(
|
|
3033
|
+
children: /* @__PURE__ */ t(J, {
|
|
2810
3034
|
name: "IconCross",
|
|
2811
3035
|
width: 20,
|
|
2812
3036
|
height: 20
|
|
2813
3037
|
})
|
|
2814
3038
|
})]
|
|
2815
3039
|
}), /* @__PURE__ */ t("div", {
|
|
2816
|
-
className:
|
|
3040
|
+
className: Ft.content,
|
|
2817
3041
|
children: r
|
|
2818
3042
|
})]
|
|
2819
3043
|
});
|
|
2820
|
-
},
|
|
2821
|
-
wrapper: "_wrapper_1jspu_1",
|
|
2822
|
-
input: "_input_1jspu_21",
|
|
2823
|
-
switch: "_switch_1jspu_35",
|
|
2824
|
-
thumb: "_thumb_1jspu_67",
|
|
2825
|
-
label: "_label_1jspu_113",
|
|
2826
|
-
disabled: "_disabled_1jspu_125"
|
|
2827
|
-
}, Pt = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: c, id: l, value: u }) => {
|
|
2828
|
-
let d = f(), p = l ?? `ds-radio-button-${c ?? d}`;
|
|
2829
|
-
return /* @__PURE__ */ n("label", {
|
|
2830
|
-
htmlFor: p,
|
|
2831
|
-
className: `${Nt.wrapper} ${a ? Nt.disabled : ""} ${s}`,
|
|
2832
|
-
children: [
|
|
2833
|
-
/* @__PURE__ */ t("input", {
|
|
2834
|
-
id: p,
|
|
2835
|
-
className: Nt.input,
|
|
2836
|
-
type: "checkbox",
|
|
2837
|
-
role: "switch",
|
|
2838
|
-
name: c,
|
|
2839
|
-
value: u,
|
|
2840
|
-
checked: e,
|
|
2841
|
-
disabled: a,
|
|
2842
|
-
"aria-readonly": o || void 0,
|
|
2843
|
-
onChange: (e) => {
|
|
2844
|
-
o || r?.(e.target.checked, e);
|
|
2845
|
-
}
|
|
2846
|
-
}),
|
|
2847
|
-
/* @__PURE__ */ t("span", {
|
|
2848
|
-
className: Nt.switch,
|
|
2849
|
-
"aria-hidden": "true",
|
|
2850
|
-
children: /* @__PURE__ */ t("span", { className: Nt.thumb })
|
|
2851
|
-
}),
|
|
2852
|
-
i && /* @__PURE__ */ t("span", {
|
|
2853
|
-
className: Nt.label,
|
|
2854
|
-
children: i
|
|
2855
|
-
})
|
|
2856
|
-
]
|
|
2857
|
-
});
|
|
2858
|
-
}, Ft = {
|
|
3044
|
+
}, Lt = {
|
|
2859
3045
|
root: "_root_1ecm3_1",
|
|
2860
3046
|
grid: "_grid_1ecm3_13",
|
|
2861
3047
|
actions: "_actions_1ecm3_27"
|
|
2862
|
-
},
|
|
3048
|
+
}, Rt = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
|
|
2863
3049
|
let d = (e, t) => {
|
|
2864
3050
|
let n = {
|
|
2865
3051
|
...r,
|
|
@@ -2868,11 +3054,11 @@ var M = {
|
|
|
2868
3054
|
i?.(n, e), s === "instant" && a?.(n);
|
|
2869
3055
|
};
|
|
2870
3056
|
return /* @__PURE__ */ n("section", {
|
|
2871
|
-
className: `${
|
|
3057
|
+
className: `${Lt.root} ${u}`,
|
|
2872
3058
|
"aria-label": "Фильтры",
|
|
2873
3059
|
"aria-busy": c,
|
|
2874
3060
|
children: [/* @__PURE__ */ t("div", {
|
|
2875
|
-
className:
|
|
3061
|
+
className: Lt.grid,
|
|
2876
3062
|
children: e.filter((e) => !e.hidden).map((e) => {
|
|
2877
3063
|
let n = l || c || e.disabled, i = r[e.id];
|
|
2878
3064
|
if (e.type === "input") {
|
|
@@ -2882,12 +3068,12 @@ var M = {
|
|
|
2882
3068
|
placeholder: e.placeholder,
|
|
2883
3069
|
disabled: n
|
|
2884
3070
|
};
|
|
2885
|
-
return e.inputType === "number" ? /* @__PURE__ */ t(
|
|
3071
|
+
return e.inputType === "number" ? /* @__PURE__ */ t(nt, {
|
|
2886
3072
|
...r,
|
|
2887
3073
|
type: "number",
|
|
2888
3074
|
value: i ?? "",
|
|
2889
3075
|
onChange: (t) => d(e.id, t)
|
|
2890
|
-
}, e.id) : /* @__PURE__ */ t(
|
|
3076
|
+
}, e.id) : /* @__PURE__ */ t(nt, {
|
|
2891
3077
|
...r,
|
|
2892
3078
|
type: "text",
|
|
2893
3079
|
value: String(i ?? ""),
|
|
@@ -2903,7 +3089,7 @@ var M = {
|
|
|
2903
3089
|
disabled: n,
|
|
2904
3090
|
onChange: (t) => d(e.id, t)
|
|
2905
3091
|
}, e.id);
|
|
2906
|
-
if (e.type === "multiple") return /* @__PURE__ */ t(
|
|
3092
|
+
if (e.type === "multiple") return /* @__PURE__ */ t(st, {
|
|
2907
3093
|
label: e.label,
|
|
2908
3094
|
hint: e.hint,
|
|
2909
3095
|
placeholder: e.placeholder,
|
|
@@ -2912,14 +3098,14 @@ var M = {
|
|
|
2912
3098
|
disabled: n,
|
|
2913
3099
|
onChange: (t) => d(e.id, t)
|
|
2914
3100
|
}, e.id);
|
|
2915
|
-
if (e.type === "checkbox") return /* @__PURE__ */ t(
|
|
3101
|
+
if (e.type === "checkbox") return /* @__PURE__ */ t(xe, {
|
|
2916
3102
|
label: e.label,
|
|
2917
3103
|
hint: e.hint,
|
|
2918
3104
|
checked: !!i,
|
|
2919
3105
|
disabled: n,
|
|
2920
3106
|
onChange: (t) => d(e.id, t)
|
|
2921
3107
|
}, e.id);
|
|
2922
|
-
if (e.type === "radio") return /* @__PURE__ */ t(
|
|
3108
|
+
if (e.type === "radio") return /* @__PURE__ */ t(lt, {
|
|
2923
3109
|
label: e.label,
|
|
2924
3110
|
checked: !!i,
|
|
2925
3111
|
disabled: n,
|
|
@@ -2940,7 +3126,7 @@ var M = {
|
|
|
2940
3126
|
}, e.id);
|
|
2941
3127
|
})
|
|
2942
3128
|
}), (o || s === "manual") && /* @__PURE__ */ n("div", {
|
|
2943
|
-
className:
|
|
3129
|
+
className: Lt.actions,
|
|
2944
3130
|
children: [o && /* @__PURE__ */ t(j, {
|
|
2945
3131
|
variant: "destructiveOutline",
|
|
2946
3132
|
disabled: l || c,
|
|
@@ -2954,7 +3140,7 @@ var M = {
|
|
|
2954
3140
|
})]
|
|
2955
3141
|
})]
|
|
2956
3142
|
});
|
|
2957
|
-
},
|
|
3143
|
+
}, zt = {
|
|
2958
3144
|
grid: "_grid_1q540_1",
|
|
2959
3145
|
comfortable: "_comfortable_1q540_11",
|
|
2960
3146
|
compact: "_compact_1q540_19",
|
|
@@ -2971,23 +3157,23 @@ var M = {
|
|
|
2971
3157
|
summary: "_summary_1q540_101",
|
|
2972
3158
|
summaryTitle: "_summaryTitle_1q540_137",
|
|
2973
3159
|
summaryList: "_summaryList_1q540_145"
|
|
2974
|
-
},
|
|
3160
|
+
}, Bt = ({ columns: e = 2, density: n = "comfortable", className: r = "", ...i }) => /* @__PURE__ */ t("div", {
|
|
2975
3161
|
...i,
|
|
2976
|
-
className: `${
|
|
2977
|
-
}),
|
|
3162
|
+
className: `${zt.grid} ${zt[`columns${e}`]} ${zt[n]} ${r}`
|
|
3163
|
+
}), Vt = ({ span: e = 1, className: n = "", ...r }) => /* @__PURE__ */ t("div", {
|
|
2978
3164
|
...r,
|
|
2979
|
-
className: `${
|
|
2980
|
-
}),
|
|
3165
|
+
className: `${zt.item} ${zt[`span${e}`]} ${n}`
|
|
3166
|
+
}), Ht = ({ title: e = "Проверьте заполнение формы", items: r, focusField: i, className: a = "", ...o }) => r.length === 0 ? null : /* @__PURE__ */ n("div", {
|
|
2981
3167
|
...o,
|
|
2982
|
-
className: `${
|
|
3168
|
+
className: `${zt.summary} ${a}`,
|
|
2983
3169
|
role: "alert",
|
|
2984
3170
|
"aria-atomic": "true",
|
|
2985
3171
|
tabIndex: -1,
|
|
2986
3172
|
children: [/* @__PURE__ */ t("strong", {
|
|
2987
|
-
className:
|
|
3173
|
+
className: zt.summaryTitle,
|
|
2988
3174
|
children: e
|
|
2989
3175
|
}), /* @__PURE__ */ t("ul", {
|
|
2990
|
-
className:
|
|
3176
|
+
className: zt.summaryList,
|
|
2991
3177
|
children: r.map((e) => /* @__PURE__ */ t("li", { children: e.fieldId ? /* @__PURE__ */ t("a", {
|
|
2992
3178
|
href: `#${e.fieldId}`,
|
|
2993
3179
|
onClick: (t) => {
|
|
@@ -2996,7 +3182,7 @@ var M = {
|
|
|
2996
3182
|
children: e.message
|
|
2997
3183
|
}) : e.message }, e.id))
|
|
2998
3184
|
})]
|
|
2999
|
-
}),
|
|
3185
|
+
}), Ut = {
|
|
3000
3186
|
wrapper: "_wrapper_i20hz_1",
|
|
3001
3187
|
dropzone: "_dropzone_i20hz_15",
|
|
3002
3188
|
dragActive: "_dragActive_i20hz_45",
|
|
@@ -3009,12 +3195,12 @@ var M = {
|
|
|
3009
3195
|
file: "_file_i20hz_133",
|
|
3010
3196
|
fileName: "_fileName_i20hz_175",
|
|
3011
3197
|
fileSize: "_fileSize_i20hz_187"
|
|
3012
|
-
},
|
|
3198
|
+
}, Wt = (e) => `${e.name}:${e.size}:${e.lastModified}`, Gt = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Kt = (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), qt = ({ 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 }) => {
|
|
3013
3199
|
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) => {
|
|
3014
|
-
let t = [], n = new Set(r.map(
|
|
3200
|
+
let t = [], n = new Set(r.map(Wt)), l = e.filter((e) => Kt(e, o) ? s !== void 0 && e.size > s ? (t.push({
|
|
3015
3201
|
file: e,
|
|
3016
3202
|
reason: "maxSize"
|
|
3017
|
-
}), !1) : !n.has(
|
|
3203
|
+
}), !1) : !n.has(Wt(e)) && (n.add(Wt(e)), !0) : (t.push({
|
|
3018
3204
|
file: e,
|
|
3019
3205
|
reason: "accept"
|
|
3020
3206
|
}), !1)), u = a ? c : 1, d = a ? [...r, ...l] : l.slice(-1);
|
|
@@ -3024,7 +3210,7 @@ var M = {
|
|
|
3024
3210
|
})), d = d.slice(0, u)), t.length && w?.(t), l.length && i?.(d), D.current && (D.current.value = "");
|
|
3025
3211
|
};
|
|
3026
3212
|
return /* @__PURE__ */ n("div", {
|
|
3027
|
-
className: `${
|
|
3213
|
+
className: `${Ut.wrapper} ${b}`,
|
|
3028
3214
|
children: [
|
|
3029
3215
|
l && /* @__PURE__ */ t(ee, {
|
|
3030
3216
|
htmlFor: E,
|
|
@@ -3033,7 +3219,7 @@ var M = {
|
|
|
3033
3219
|
children: l
|
|
3034
3220
|
}),
|
|
3035
3221
|
/* @__PURE__ */ n("div", {
|
|
3036
|
-
className: `${
|
|
3222
|
+
className: `${Ut.dropzone} ${k ? Ut.dragActive : ""} ${m ? Ut.disabled : ""} ${d ? Ut.error : ""}`,
|
|
3037
3223
|
onDragEnter: (e) => {
|
|
3038
3224
|
e.preventDefault(), I && ++O.current === 1 && A(!0);
|
|
3039
3225
|
},
|
|
@@ -3048,7 +3234,7 @@ var M = {
|
|
|
3048
3234
|
ref: D,
|
|
3049
3235
|
id: E,
|
|
3050
3236
|
name: v,
|
|
3051
|
-
className:
|
|
3237
|
+
className: Ut.nativeInput,
|
|
3052
3238
|
type: "file",
|
|
3053
3239
|
multiple: a,
|
|
3054
3240
|
accept: o,
|
|
@@ -3059,53 +3245,53 @@ var M = {
|
|
|
3059
3245
|
onChange: (e) => L(Array.from(e.target.files ?? []))
|
|
3060
3246
|
}), r.length ? /* @__PURE__ */ n(e, { children: [
|
|
3061
3247
|
/* @__PURE__ */ t("ul", {
|
|
3062
|
-
className:
|
|
3248
|
+
className: Ut.files,
|
|
3063
3249
|
"aria-live": "polite",
|
|
3064
3250
|
children: r.map((e, a) => /* @__PURE__ */ n("li", {
|
|
3065
|
-
className:
|
|
3251
|
+
className: Ut.file,
|
|
3066
3252
|
children: [
|
|
3067
3253
|
/* @__PURE__ */ t("span", {
|
|
3068
|
-
className:
|
|
3254
|
+
className: Ut.fileName,
|
|
3069
3255
|
title: e.name,
|
|
3070
3256
|
children: e.name
|
|
3071
3257
|
}),
|
|
3072
3258
|
/* @__PURE__ */ t("span", {
|
|
3073
|
-
className:
|
|
3074
|
-
children:
|
|
3259
|
+
className: Ut.fileSize,
|
|
3260
|
+
children: Gt(e.size)
|
|
3075
3261
|
}),
|
|
3076
3262
|
I && /* @__PURE__ */ t(j, {
|
|
3077
3263
|
variant: "empty",
|
|
3078
3264
|
size: "sm",
|
|
3079
3265
|
"aria-label": `Удалить файл ${e.name}`,
|
|
3080
3266
|
onClick: () => i?.(r.filter((e, t) => t !== a)),
|
|
3081
|
-
children: /* @__PURE__ */ t(
|
|
3267
|
+
children: /* @__PURE__ */ t(J, {
|
|
3082
3268
|
name: "IconCross",
|
|
3083
3269
|
width: 16,
|
|
3084
3270
|
height: 16
|
|
3085
3271
|
})
|
|
3086
3272
|
})
|
|
3087
3273
|
]
|
|
3088
|
-
},
|
|
3274
|
+
}, Wt(e)))
|
|
3089
3275
|
}),
|
|
3090
3276
|
I && (a || r.length === 0) && /* @__PURE__ */ t(j, {
|
|
3091
|
-
className:
|
|
3277
|
+
className: Ut.browseButton,
|
|
3092
3278
|
size: "sm",
|
|
3093
3279
|
onClick: () => D.current?.click(),
|
|
3094
3280
|
children: C
|
|
3095
3281
|
}),
|
|
3096
3282
|
I && !a && /* @__PURE__ */ t(j, {
|
|
3097
|
-
className:
|
|
3283
|
+
className: Ut.browseButton,
|
|
3098
3284
|
size: "sm",
|
|
3099
3285
|
onClick: () => D.current?.click(),
|
|
3100
3286
|
children: S
|
|
3101
3287
|
})
|
|
3102
3288
|
] }) : /* @__PURE__ */ n("div", {
|
|
3103
|
-
className:
|
|
3289
|
+
className: Ut.empty,
|
|
3104
3290
|
children: [
|
|
3105
3291
|
/* @__PURE__ */ t("span", {
|
|
3106
|
-
className:
|
|
3292
|
+
className: Ut.uploadIcon,
|
|
3107
3293
|
"aria-hidden": "true",
|
|
3108
|
-
children: /* @__PURE__ */ t(
|
|
3294
|
+
children: /* @__PURE__ */ t(J, {
|
|
3109
3295
|
name: "IconUpload",
|
|
3110
3296
|
width: 24,
|
|
3111
3297
|
height: 24
|
|
@@ -3131,7 +3317,7 @@ var M = {
|
|
|
3131
3317
|
})
|
|
3132
3318
|
]
|
|
3133
3319
|
});
|
|
3134
|
-
},
|
|
3320
|
+
}, Jt = ({ children: e, containerId: t = "overlay-root" }) => {
|
|
3135
3321
|
let [n, r] = g(null);
|
|
3136
3322
|
return d(() => {
|
|
3137
3323
|
let e = document.getElementById(t);
|
|
@@ -3144,7 +3330,7 @@ var M = {
|
|
|
3144
3330
|
n.childElementCount === 0 && n.parentElement && n.remove();
|
|
3145
3331
|
};
|
|
3146
3332
|
}, [t]), n ? _(e, n) : null;
|
|
3147
|
-
},
|
|
3333
|
+
}, Yt = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
|
|
3148
3334
|
let o = h(null), [s, c] = g({
|
|
3149
3335
|
position: "fixed",
|
|
3150
3336
|
visibility: "hidden",
|
|
@@ -3168,13 +3354,13 @@ var M = {
|
|
|
3168
3354
|
]);
|
|
3169
3355
|
return p(() => (u(), window.addEventListener("resize", u), window.addEventListener("scroll", u, !0), () => {
|
|
3170
3356
|
window.removeEventListener("resize", u), window.removeEventListener("scroll", u, !0);
|
|
3171
|
-
}), [u]), /* @__PURE__ */ t(
|
|
3357
|
+
}), [u]), /* @__PURE__ */ t(Jt, { children: /* @__PURE__ */ t("div", {
|
|
3172
3358
|
ref: o,
|
|
3173
3359
|
className: a,
|
|
3174
3360
|
style: s,
|
|
3175
3361
|
children: n
|
|
3176
3362
|
}) });
|
|
3177
|
-
},
|
|
3363
|
+
}, Xt = {
|
|
3178
3364
|
wrapper: "_wrapper_x2gki_1",
|
|
3179
3365
|
control: "_control_x2gki_15",
|
|
3180
3366
|
textarea: "_textarea_x2gki_25",
|
|
@@ -3188,12 +3374,12 @@ var M = {
|
|
|
3188
3374
|
clearAction: "_clearAction_x2gki_171",
|
|
3189
3375
|
messages: "_messages_x2gki_251",
|
|
3190
3376
|
counter: "_counter_x2gki_265"
|
|
3191
|
-
},
|
|
3192
|
-
function
|
|
3377
|
+
}, Zt = 2;
|
|
3378
|
+
function Qt(e) {
|
|
3193
3379
|
let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
|
|
3194
3380
|
return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
|
|
3195
3381
|
}
|
|
3196
|
-
function
|
|
3382
|
+
function $t({ 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 = Zt, maxRows: w, autoResize: T = !0, ...E }) {
|
|
3197
3383
|
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 = [
|
|
3198
3384
|
A,
|
|
3199
3385
|
j,
|
|
@@ -3201,7 +3387,7 @@ function Zt({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3201
3387
|
].filter(Boolean).join(" ") || void 0, F = Math.max(1, C), I = w === void 0 ? void 0 : Math.max(F, w), L = l(() => {
|
|
3202
3388
|
let e = k.current;
|
|
3203
3389
|
if (!e || !T) return;
|
|
3204
|
-
let t = window.getComputedStyle(e), n =
|
|
3390
|
+
let t = window.getComputedStyle(e), n = Qt(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;
|
|
3205
3391
|
e.style.height = "auto";
|
|
3206
3392
|
let o = Math.min(Math.max(e.scrollHeight, i), a);
|
|
3207
3393
|
e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
|
|
@@ -3233,7 +3419,7 @@ function Zt({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3233
3419
|
e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), L());
|
|
3234
3420
|
}, B = { "--ds-textarea-min-rows": F };
|
|
3235
3421
|
return /* @__PURE__ */ n("div", {
|
|
3236
|
-
className: `${
|
|
3422
|
+
className: `${Xt.wrapper} ${m}`,
|
|
3237
3423
|
children: [
|
|
3238
3424
|
c && /* @__PURE__ */ t(ee, {
|
|
3239
3425
|
htmlFor: O,
|
|
@@ -3243,12 +3429,12 @@ function Zt({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3243
3429
|
}),
|
|
3244
3430
|
a && s ? /* @__PURE__ */ t("div", {
|
|
3245
3431
|
id: O,
|
|
3246
|
-
className: `${
|
|
3432
|
+
className: `${Xt.disabledText} ${Xt[v]}`,
|
|
3247
3433
|
style: B,
|
|
3248
3434
|
"aria-describedby": P,
|
|
3249
3435
|
children: e || i
|
|
3250
3436
|
}) : /* @__PURE__ */ n("div", {
|
|
3251
|
-
className:
|
|
3437
|
+
className: Xt.control,
|
|
3252
3438
|
children: [/* @__PURE__ */ t("textarea", {
|
|
3253
3439
|
ref: k,
|
|
3254
3440
|
id: O,
|
|
@@ -3263,15 +3449,15 @@ function Zt({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3263
3449
|
style: B,
|
|
3264
3450
|
"aria-invalid": !!u,
|
|
3265
3451
|
"aria-describedby": P,
|
|
3266
|
-
className: `${
|
|
3452
|
+
className: `${Xt.textarea} ${Xt[v]} ${T ? Xt.autoResize : Xt.manualResize} ${u ? Xt.textareaError : ""}`,
|
|
3267
3453
|
onChange: R,
|
|
3268
3454
|
...E
|
|
3269
3455
|
}), y && e && !a && !o && /* @__PURE__ */ t("button", {
|
|
3270
3456
|
type: "button",
|
|
3271
|
-
className:
|
|
3457
|
+
className: Xt.clearAction,
|
|
3272
3458
|
"aria-label": "Очистить поле",
|
|
3273
3459
|
onClick: z,
|
|
3274
|
-
children: /* @__PURE__ */ t(
|
|
3460
|
+
children: /* @__PURE__ */ t(J, {
|
|
3275
3461
|
name: "IconCross",
|
|
3276
3462
|
width: 20,
|
|
3277
3463
|
height: 20
|
|
@@ -3279,7 +3465,7 @@ function Zt({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3279
3465
|
})]
|
|
3280
3466
|
}),
|
|
3281
3467
|
(p || u || M) && /* @__PURE__ */ n("div", {
|
|
3282
|
-
className:
|
|
3468
|
+
className: Xt.messages,
|
|
3283
3469
|
children: [
|
|
3284
3470
|
p && !u && /* @__PURE__ */ t(N, {
|
|
3285
3471
|
id: A,
|
|
@@ -3292,7 +3478,7 @@ function Zt({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3292
3478
|
}),
|
|
3293
3479
|
M && /* @__PURE__ */ n("span", {
|
|
3294
3480
|
id: M,
|
|
3295
|
-
className:
|
|
3481
|
+
className: Xt.counter,
|
|
3296
3482
|
children: [
|
|
3297
3483
|
e.length,
|
|
3298
3484
|
" / ",
|
|
@@ -3306,11 +3492,11 @@ function Zt({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3306
3492
|
}
|
|
3307
3493
|
//#endregion
|
|
3308
3494
|
//#region src/components/DSModal/modal.store.ts
|
|
3309
|
-
var
|
|
3495
|
+
var en = 0, tn = S((e, t) => ({
|
|
3310
3496
|
modals: [],
|
|
3311
3497
|
openModal: (t, n = {}, r = {}) => {
|
|
3312
|
-
|
|
3313
|
-
let i = `ds-modal-${
|
|
3498
|
+
en += 1;
|
|
3499
|
+
let i = `ds-modal-${en}`;
|
|
3314
3500
|
return e((e) => ({ modals: [...e.modals, {
|
|
3315
3501
|
id: i,
|
|
3316
3502
|
name: t,
|
|
@@ -3334,10 +3520,10 @@ var Qt = 0, $t = S((e, t) => ({
|
|
|
3334
3520
|
let n = t().modals;
|
|
3335
3521
|
n.length && (e({ modals: [] }), n.forEach((e) => e.onClose?.()));
|
|
3336
3522
|
}
|
|
3337
|
-
})),
|
|
3338
|
-
|
|
3339
|
-
},
|
|
3340
|
-
function
|
|
3523
|
+
})), nn = () => {
|
|
3524
|
+
tn.getState().closeAllModals(), en = 0;
|
|
3525
|
+
}, rn = 8, an = 96, on = .55;
|
|
3526
|
+
function sn(e, t, n) {
|
|
3341
3527
|
return {
|
|
3342
3528
|
startX: e,
|
|
3343
3529
|
startY: t,
|
|
@@ -3345,16 +3531,16 @@ function an(e, t, n) {
|
|
|
3345
3531
|
intent: "pending"
|
|
3346
3532
|
};
|
|
3347
3533
|
}
|
|
3348
|
-
function
|
|
3534
|
+
function cn(e, t, n) {
|
|
3349
3535
|
let r = t - e.startX, i = n - e.startY;
|
|
3350
|
-
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >=
|
|
3536
|
+
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >= rn && (e.intent = Math.abs(i) > Math.abs(r) ? "vertical" : "horizontal"), e.intent === "vertical" ? Math.max(0, i) : 0;
|
|
3351
3537
|
}
|
|
3352
|
-
function
|
|
3538
|
+
function ln(e, t, n) {
|
|
3353
3539
|
if (e.intent !== "vertical") return !1;
|
|
3354
3540
|
let r = Math.max(0, t - e.startY), i = Math.max(1, n - e.startTime);
|
|
3355
|
-
return r >=
|
|
3541
|
+
return r >= an || r >= 32 && r / i >= on;
|
|
3356
3542
|
}
|
|
3357
|
-
var
|
|
3543
|
+
var un = {
|
|
3358
3544
|
layer: "_layer_w9isk_1",
|
|
3359
3545
|
backdrop: "_backdrop_w9isk_15",
|
|
3360
3546
|
"backdrop-enter": "_backdrop-enter_w9isk_1",
|
|
@@ -3367,10 +3553,10 @@ var cn = {
|
|
|
3367
3553
|
close: "_close_w9isk_141",
|
|
3368
3554
|
dragHandle: "_dragHandle_w9isk_149",
|
|
3369
3555
|
"sheet-enter": "_sheet-enter_w9isk_1"
|
|
3370
|
-
},
|
|
3371
|
-
function
|
|
3556
|
+
}, dn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", fn = a({});
|
|
3557
|
+
function pn(e) {
|
|
3372
3558
|
if (e.key !== "Tab") return;
|
|
3373
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
3559
|
+
let t = Array.from(e.currentTarget.querySelectorAll(dn));
|
|
3374
3560
|
if (!t.length) {
|
|
3375
3561
|
e.preventDefault();
|
|
3376
3562
|
return;
|
|
@@ -3378,18 +3564,18 @@ function dn(e) {
|
|
|
3378
3564
|
let n = t[0], r = t.at(-1);
|
|
3379
3565
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
|
|
3380
3566
|
}
|
|
3381
|
-
var
|
|
3382
|
-
let l = u(
|
|
3567
|
+
var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
|
|
3568
|
+
let l = u(fn), 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 = tn((e) => e.closeModal), D = l.requestClose ?? (() => E(a)), O = p != null, k = m != null;
|
|
3383
3569
|
d(() => {
|
|
3384
3570
|
let e = document.activeElement, t = y.current;
|
|
3385
|
-
return (t?.querySelector(
|
|
3571
|
+
return (t?.querySelector(dn) ?? t)?.focus(), () => e?.focus();
|
|
3386
3572
|
}, []);
|
|
3387
3573
|
let A = (e) => {
|
|
3388
3574
|
e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, T(!1), C(0);
|
|
3389
3575
|
};
|
|
3390
3576
|
return /* @__PURE__ */ n("div", {
|
|
3391
3577
|
ref: y,
|
|
3392
|
-
className: `${
|
|
3578
|
+
className: `${un.panel} ${s}`,
|
|
3393
3579
|
"data-closing": l.closing || void 0,
|
|
3394
3580
|
"data-dragging": w || void 0,
|
|
3395
3581
|
style: { "--ds-modal-drag-offset": `${S}px` },
|
|
@@ -3398,41 +3584,41 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3398
3584
|
"aria-labelledby": O ? _ : void 0,
|
|
3399
3585
|
"aria-describedby": k ? v : void 0,
|
|
3400
3586
|
tabIndex: -1,
|
|
3401
|
-
onKeyDown:
|
|
3587
|
+
onKeyDown: pn,
|
|
3402
3588
|
children: [
|
|
3403
3589
|
/* @__PURE__ */ t("button", {
|
|
3404
3590
|
type: "button",
|
|
3405
|
-
className:
|
|
3591
|
+
className: un.dragHandle,
|
|
3406
3592
|
"aria-label": "Потяните вниз, чтобы закрыть модальное окно",
|
|
3407
3593
|
onPointerDown: (e) => {
|
|
3408
|
-
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current =
|
|
3594
|
+
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current = sn(e.clientX, e.clientY, e.timeStamp), e.currentTarget.setPointerCapture(e.pointerId));
|
|
3409
3595
|
},
|
|
3410
3596
|
onPointerMove: (e) => {
|
|
3411
3597
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3412
|
-
let t =
|
|
3598
|
+
let t = cn(b.current, e.clientX, e.clientY);
|
|
3413
3599
|
b.current.intent === "vertical" && (e.preventDefault(), T(!0), C(t));
|
|
3414
3600
|
},
|
|
3415
3601
|
onPointerUp: (e) => {
|
|
3416
3602
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3417
|
-
let t =
|
|
3603
|
+
let t = ln(b.current, e.clientY, e.timeStamp);
|
|
3418
3604
|
A(e.currentTarget), t && D();
|
|
3419
3605
|
},
|
|
3420
3606
|
onPointerCancel: (e) => A(e.currentTarget),
|
|
3421
3607
|
children: /* @__PURE__ */ t("span", {})
|
|
3422
3608
|
}),
|
|
3423
3609
|
(O || o) && /* @__PURE__ */ n("header", {
|
|
3424
|
-
className:
|
|
3610
|
+
className: un.header,
|
|
3425
3611
|
children: [O && /* @__PURE__ */ t("h2", {
|
|
3426
3612
|
id: _,
|
|
3427
|
-
className:
|
|
3613
|
+
className: un.title,
|
|
3428
3614
|
children: p
|
|
3429
3615
|
}), /* @__PURE__ */ t(j, {
|
|
3430
|
-
className:
|
|
3616
|
+
className: un.close,
|
|
3431
3617
|
variant: "empty",
|
|
3432
3618
|
size: "sm",
|
|
3433
3619
|
"aria-label": o,
|
|
3434
3620
|
onClick: D,
|
|
3435
|
-
children: /* @__PURE__ */ t(
|
|
3621
|
+
children: /* @__PURE__ */ t(J, {
|
|
3436
3622
|
name: "IconCross",
|
|
3437
3623
|
width: 24,
|
|
3438
3624
|
height: 24
|
|
@@ -3441,17 +3627,17 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3441
3627
|
}),
|
|
3442
3628
|
k && /* @__PURE__ */ t("p", {
|
|
3443
3629
|
id: v,
|
|
3444
|
-
className:
|
|
3630
|
+
className: un.description,
|
|
3445
3631
|
children: m
|
|
3446
3632
|
}),
|
|
3447
3633
|
/* @__PURE__ */ t("div", {
|
|
3448
|
-
className:
|
|
3634
|
+
className: un.content,
|
|
3449
3635
|
children: e
|
|
3450
3636
|
})
|
|
3451
3637
|
]
|
|
3452
3638
|
});
|
|
3453
|
-
},
|
|
3454
|
-
let n =
|
|
3639
|
+
}, hn = ({ registry: e }) => {
|
|
3640
|
+
let n = tn((e) => e.modals), r = tn((e) => e.closeModal), [i, a] = g(() => /* @__PURE__ */ new Set()), o = h(/* @__PURE__ */ new Map()), s = (e) => {
|
|
3455
3641
|
if (o.current.has(e)) return;
|
|
3456
3642
|
a((t) => new Set(t).add(e));
|
|
3457
3643
|
let t = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -3467,7 +3653,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3467
3653
|
return () => e.forEach((e) => window.clearTimeout(e));
|
|
3468
3654
|
}, []), d(() => {
|
|
3469
3655
|
let e = (e) => {
|
|
3470
|
-
let t =
|
|
3656
|
+
let t = tn.getState().modals.at(-1);
|
|
3471
3657
|
e.key === "Escape" && t?.closeOnEscape && s(t.id);
|
|
3472
3658
|
};
|
|
3473
3659
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
@@ -3480,21 +3666,21 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3480
3666
|
n,
|
|
3481
3667
|
e
|
|
3482
3668
|
]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
3483
|
-
className:
|
|
3669
|
+
className: un.layer,
|
|
3484
3670
|
"aria-label": "Модальные окна",
|
|
3485
3671
|
children: n.map((r, a) => {
|
|
3486
3672
|
let o = e[r.name];
|
|
3487
3673
|
if (!o) return null;
|
|
3488
3674
|
let c = i.has(r.id);
|
|
3489
3675
|
return /* @__PURE__ */ t("div", {
|
|
3490
|
-
className:
|
|
3676
|
+
className: un.backdrop,
|
|
3491
3677
|
"data-closing": c || void 0,
|
|
3492
3678
|
"aria-hidden": a !== n.length - 1 || void 0,
|
|
3493
3679
|
inert: a !== n.length - 1 || void 0,
|
|
3494
3680
|
onMouseDown: (e) => {
|
|
3495
3681
|
e.target === e.currentTarget && r.closeOnBackdrop && s(r.id);
|
|
3496
3682
|
},
|
|
3497
|
-
children: /* @__PURE__ */ t(
|
|
3683
|
+
children: /* @__PURE__ */ t(fn.Provider, {
|
|
3498
3684
|
value: {
|
|
3499
3685
|
title: r.title ?? r.payload.title,
|
|
3500
3686
|
description: r.description ?? r.payload.description,
|
|
@@ -3511,31 +3697,31 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3511
3697
|
}, r.id);
|
|
3512
3698
|
})
|
|
3513
3699
|
}), document.body);
|
|
3514
|
-
},
|
|
3515
|
-
let o =
|
|
3700
|
+
}, gn = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
|
|
3701
|
+
let o = tn((e) => e.modals.length);
|
|
3516
3702
|
return d(() => {
|
|
3517
3703
|
if (!a || o === 0) return;
|
|
3518
3704
|
let e = document.body.style.overflow;
|
|
3519
3705
|
return document.body.style.overflow = "hidden", () => {
|
|
3520
3706
|
document.body.style.overflow = e;
|
|
3521
3707
|
};
|
|
3522
|
-
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(
|
|
3523
|
-
},
|
|
3708
|
+
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(hn, { registry: r })] });
|
|
3709
|
+
}, _n = (e) => e, vn = {
|
|
3524
3710
|
message: "_message_c23ie_1",
|
|
3525
3711
|
actions: "_actions_c23ie_13"
|
|
3526
|
-
},
|
|
3712
|
+
}, yn = /* @__PURE__ */ new Map(), bn = 0, xn = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
|
|
3527
3713
|
let u = (e) => {
|
|
3528
|
-
|
|
3714
|
+
yn.get(l)?.(e), yn.delete(l), r();
|
|
3529
3715
|
};
|
|
3530
|
-
return /* @__PURE__ */ n(
|
|
3716
|
+
return /* @__PURE__ */ n(mn, {
|
|
3531
3717
|
modalId: e,
|
|
3532
3718
|
title: i,
|
|
3533
3719
|
role: "alertdialog",
|
|
3534
3720
|
children: [/* @__PURE__ */ t("p", {
|
|
3535
|
-
className:
|
|
3721
|
+
className: vn.message,
|
|
3536
3722
|
children: a
|
|
3537
3723
|
}), /* @__PURE__ */ n("div", {
|
|
3538
|
-
className:
|
|
3724
|
+
className: vn.actions,
|
|
3539
3725
|
children: [/* @__PURE__ */ t(j, {
|
|
3540
3726
|
variant: "outline",
|
|
3541
3727
|
onClick: () => u(!1),
|
|
@@ -3547,46 +3733,46 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3547
3733
|
})]
|
|
3548
3734
|
})]
|
|
3549
3735
|
});
|
|
3550
|
-
},
|
|
3736
|
+
}, Sn = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(mn, {
|
|
3551
3737
|
modalId: e,
|
|
3552
3738
|
title: i,
|
|
3553
3739
|
role: "alertdialog",
|
|
3554
3740
|
children: [/* @__PURE__ */ t("p", {
|
|
3555
|
-
className:
|
|
3741
|
+
className: vn.message,
|
|
3556
3742
|
children: a
|
|
3557
3743
|
}), /* @__PURE__ */ t("div", {
|
|
3558
|
-
className:
|
|
3744
|
+
className: vn.actions,
|
|
3559
3745
|
children: /* @__PURE__ */ t(j, {
|
|
3560
3746
|
onClick: r,
|
|
3561
3747
|
children: o
|
|
3562
3748
|
})
|
|
3563
3749
|
})]
|
|
3564
|
-
}),
|
|
3565
|
-
ConfirmModal:
|
|
3566
|
-
ErrorModal:
|
|
3567
|
-
}),
|
|
3568
|
-
let e =
|
|
3750
|
+
}), Cn = _n({
|
|
3751
|
+
ConfirmModal: xn,
|
|
3752
|
+
ErrorModal: Sn
|
|
3753
|
+
}), wn = () => {
|
|
3754
|
+
let e = tn((e) => e.openModal);
|
|
3569
3755
|
return (t = {}) => new Promise((n) => {
|
|
3570
|
-
|
|
3571
|
-
let r = `confirm-${
|
|
3572
|
-
|
|
3756
|
+
bn += 1;
|
|
3757
|
+
let r = `confirm-${bn}`;
|
|
3758
|
+
yn.set(r, n), e("ConfirmModal", {
|
|
3573
3759
|
...t,
|
|
3574
3760
|
requestId: r
|
|
3575
3761
|
}, {
|
|
3576
3762
|
closeOnEscape: !1,
|
|
3577
3763
|
onClose: () => {
|
|
3578
|
-
|
|
3764
|
+
yn.get(r)?.(!1), yn.delete(r);
|
|
3579
3765
|
}
|
|
3580
3766
|
});
|
|
3581
3767
|
});
|
|
3582
|
-
},
|
|
3583
|
-
let e =
|
|
3768
|
+
}, Tn = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", En = () => {
|
|
3769
|
+
let e = tn((e) => e.openModal);
|
|
3584
3770
|
return { showError: (t, n) => e("ErrorModal", {
|
|
3585
3771
|
title: n,
|
|
3586
|
-
message:
|
|
3772
|
+
message: Tn(t)
|
|
3587
3773
|
}) };
|
|
3588
|
-
},
|
|
3589
|
-
let e =
|
|
3774
|
+
}, Dn = S(() => ({})), On = S(() => ({})), kn = () => {
|
|
3775
|
+
let e = tn((e) => e.modals), t = tn((e) => e.openModal), n = tn((e) => e.closeModal), r = tn((e) => e.closeTopModal), i = tn((e) => e.closeAllModals), a = l((e, n = {}, r) => t(e, n, r), [t]), o = l((t) => e.some((e) => e.name === t), [e]);
|
|
3590
3776
|
return m(() => ({
|
|
3591
3777
|
openModal: a,
|
|
3592
3778
|
closeModal: n,
|
|
@@ -3602,7 +3788,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3602
3788
|
e.length,
|
|
3603
3789
|
a
|
|
3604
3790
|
]);
|
|
3605
|
-
},
|
|
3791
|
+
}, An = {
|
|
3606
3792
|
layer: "_layer_ct7yp_1",
|
|
3607
3793
|
backdrop: "_backdrop_ct7yp_13",
|
|
3608
3794
|
panel: "_panel_ct7yp_27",
|
|
@@ -3622,16 +3808,16 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3622
3808
|
"enter-right": "_enter-right_ct7yp_1",
|
|
3623
3809
|
"enter-left": "_enter-left_ct7yp_1",
|
|
3624
3810
|
"enter-bottom": "_enter-bottom_ct7yp_1"
|
|
3625
|
-
},
|
|
3811
|
+
}, jn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Mn = a(null), Nn = (e) => {
|
|
3626
3812
|
if (e.key !== "Tab") return;
|
|
3627
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
3813
|
+
let t = Array.from(e.currentTarget.querySelectorAll(jn));
|
|
3628
3814
|
if (!t.length) {
|
|
3629
3815
|
e.preventDefault();
|
|
3630
3816
|
return;
|
|
3631
3817
|
}
|
|
3632
3818
|
let n = t[0], r = t.at(-1);
|
|
3633
3819
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
3634
|
-
},
|
|
3820
|
+
}, Pn = () => u(Mn), Fn = ({ 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 = "" }) => {
|
|
3635
3821
|
let S = h(null), C = f(), w = f(), T = (e) => {
|
|
3636
3822
|
g || r(e);
|
|
3637
3823
|
};
|
|
@@ -3640,7 +3826,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3640
3826
|
let t = document.activeElement, n = b?.current, i = document.body.style.overflow;
|
|
3641
3827
|
document.body.style.overflow = "hidden";
|
|
3642
3828
|
let a = S.current;
|
|
3643
|
-
(y?.current ?? a?.querySelector(
|
|
3829
|
+
(y?.current ?? a?.querySelector(jn) ?? a)?.focus();
|
|
3644
3830
|
let o = (e) => {
|
|
3645
3831
|
e.key === "Escape" && p && !g && r("escape");
|
|
3646
3832
|
};
|
|
@@ -3655,29 +3841,29 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3655
3841
|
g,
|
|
3656
3842
|
b
|
|
3657
3843
|
]), !e || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
3658
|
-
className:
|
|
3844
|
+
className: An.layer,
|
|
3659
3845
|
children: /* @__PURE__ */ t("div", {
|
|
3660
|
-
className:
|
|
3846
|
+
className: An.backdrop,
|
|
3661
3847
|
onMouseDown: (e) => {
|
|
3662
3848
|
e.target === e.currentTarget && m && T("backdrop");
|
|
3663
3849
|
},
|
|
3664
|
-
children: /* @__PURE__ */ t(
|
|
3850
|
+
children: /* @__PURE__ */ t(Mn.Provider, {
|
|
3665
3851
|
value: { requestClose: T },
|
|
3666
3852
|
children: /* @__PURE__ */ n("section", {
|
|
3667
3853
|
ref: S,
|
|
3668
|
-
className: `${
|
|
3854
|
+
className: `${An.panel} ${An[l]} ${An[u]} ${x}`,
|
|
3669
3855
|
role: "dialog",
|
|
3670
3856
|
"aria-modal": "true",
|
|
3671
3857
|
"aria-labelledby": a ? C : void 0,
|
|
3672
3858
|
"aria-describedby": o ? w : void 0,
|
|
3673
3859
|
tabIndex: -1,
|
|
3674
|
-
onKeyDown:
|
|
3860
|
+
onKeyDown: Nn,
|
|
3675
3861
|
children: [
|
|
3676
3862
|
/* @__PURE__ */ n("header", {
|
|
3677
|
-
className:
|
|
3863
|
+
className: An.header,
|
|
3678
3864
|
children: [
|
|
3679
3865
|
/* @__PURE__ */ n("div", {
|
|
3680
|
-
className:
|
|
3866
|
+
className: An.heading,
|
|
3681
3867
|
children: [a && /* @__PURE__ */ t("h2", {
|
|
3682
3868
|
id: C,
|
|
3683
3869
|
children: a
|
|
@@ -3687,7 +3873,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3687
3873
|
})]
|
|
3688
3874
|
}),
|
|
3689
3875
|
s && /* @__PURE__ */ t("div", {
|
|
3690
|
-
className:
|
|
3876
|
+
className: An.headerActions,
|
|
3691
3877
|
children: s
|
|
3692
3878
|
}),
|
|
3693
3879
|
/* @__PURE__ */ t(j, {
|
|
@@ -3696,7 +3882,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3696
3882
|
"aria-label": v,
|
|
3697
3883
|
disabled: g,
|
|
3698
3884
|
onClick: () => T("close-button"),
|
|
3699
|
-
children: /* @__PURE__ */ t(
|
|
3885
|
+
children: /* @__PURE__ */ t(J, {
|
|
3700
3886
|
name: "IconCross",
|
|
3701
3887
|
width: 20,
|
|
3702
3888
|
height: 20
|
|
@@ -3705,11 +3891,11 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3705
3891
|
]
|
|
3706
3892
|
}),
|
|
3707
3893
|
/* @__PURE__ */ t("div", {
|
|
3708
|
-
className:
|
|
3894
|
+
className: An.content,
|
|
3709
3895
|
children: i
|
|
3710
3896
|
}),
|
|
3711
3897
|
c && /* @__PURE__ */ t("footer", {
|
|
3712
|
-
className:
|
|
3898
|
+
className: An.footer,
|
|
3713
3899
|
children: c
|
|
3714
3900
|
})
|
|
3715
3901
|
]
|
|
@@ -3717,17 +3903,17 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3717
3903
|
})
|
|
3718
3904
|
})
|
|
3719
3905
|
}), document.body);
|
|
3720
|
-
},
|
|
3906
|
+
}, In = ({ placement: e = "right", ...n }) => /* @__PURE__ */ t(Fn, {
|
|
3721
3907
|
...n,
|
|
3722
3908
|
placement: e
|
|
3723
|
-
}),
|
|
3909
|
+
}), Ln = (e) => /* @__PURE__ */ t(Fn, {
|
|
3724
3910
|
...e,
|
|
3725
3911
|
placement: "bottom"
|
|
3726
|
-
}),
|
|
3912
|
+
}), Rn = (e) => /* @__PURE__ */ t(Fn, {
|
|
3727
3913
|
...e,
|
|
3728
3914
|
placement: "fullscreen",
|
|
3729
3915
|
size: "xl"
|
|
3730
|
-
}),
|
|
3916
|
+
}), zn = {
|
|
3731
3917
|
wrapper: "_wrapper_1hyyy_1",
|
|
3732
3918
|
container: "_container_1hyyy_15",
|
|
3733
3919
|
inner: "_inner_1hyyy_35",
|
|
@@ -3742,29 +3928,29 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3742
3928
|
empty: "_empty_1hyyy_153",
|
|
3743
3929
|
destructive: "_destructive_1hyyy_161",
|
|
3744
3930
|
destructiveOutline: "_destructiveOutline_1hyyy_169"
|
|
3745
|
-
},
|
|
3746
|
-
className:
|
|
3931
|
+
}, Bn = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
|
|
3932
|
+
className: zn.wrapper,
|
|
3747
3933
|
children: /* @__PURE__ */ t("div", {
|
|
3748
|
-
className:
|
|
3934
|
+
className: zn.container,
|
|
3749
3935
|
children: /* @__PURE__ */ n("div", {
|
|
3750
|
-
className:
|
|
3936
|
+
className: zn.inner,
|
|
3751
3937
|
children: [
|
|
3752
3938
|
/* @__PURE__ */ t("div", {
|
|
3753
|
-
className:
|
|
3754
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
3939
|
+
className: zn.cube,
|
|
3940
|
+
children: /* @__PURE__ */ t("div", { className: `${zn.cube__inner} ${zn[e]}` })
|
|
3755
3941
|
}),
|
|
3756
3942
|
/* @__PURE__ */ t("div", {
|
|
3757
|
-
className:
|
|
3758
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
3943
|
+
className: zn.cube,
|
|
3944
|
+
children: /* @__PURE__ */ t("div", { className: `${zn.cube__inner} ${zn[e]}` })
|
|
3759
3945
|
}),
|
|
3760
3946
|
/* @__PURE__ */ t("div", {
|
|
3761
|
-
className:
|
|
3762
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
3947
|
+
className: zn.cube,
|
|
3948
|
+
children: /* @__PURE__ */ t("div", { className: `${zn.cube__inner} ${zn[e]}` })
|
|
3763
3949
|
})
|
|
3764
3950
|
]
|
|
3765
3951
|
})
|
|
3766
3952
|
})
|
|
3767
|
-
}),
|
|
3953
|
+
}), Vn = {
|
|
3768
3954
|
viewport: "_viewport_bu4eh_1",
|
|
3769
3955
|
"top-right": "_top-right_bu4eh_21",
|
|
3770
3956
|
"top-left": "_top-left_bu4eh_31",
|
|
@@ -3780,12 +3966,12 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3780
3966
|
success: "_success_bu4eh_195",
|
|
3781
3967
|
warning: "_warning_bu4eh_203",
|
|
3782
3968
|
error: "_error_bu4eh_211"
|
|
3783
|
-
},
|
|
3969
|
+
}, Hn = {
|
|
3784
3970
|
info: "IconInfoCircle",
|
|
3785
3971
|
success: "IconSuccessCircle",
|
|
3786
3972
|
warning: "IconWarning",
|
|
3787
3973
|
error: "IconWarning"
|
|
3788
|
-
},
|
|
3974
|
+
}, Un = ({ toast: e, onClose: r }) => {
|
|
3789
3975
|
let [i, a] = g(!1), [o, s] = g(() => typeof document < "u" && document.hidden), c = h(e.duration), l = h(Date.now());
|
|
3790
3976
|
return d(() => {
|
|
3791
3977
|
if (i || o || e.duration <= 0) return;
|
|
@@ -3805,7 +3991,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3805
3991
|
let e = () => s(document.hidden);
|
|
3806
3992
|
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
3807
3993
|
}, []), /* @__PURE__ */ n("article", {
|
|
3808
|
-
className: `${
|
|
3994
|
+
className: `${Vn.toast} ${Vn[e.variant]}`,
|
|
3809
3995
|
role: e.variant === "error" ? "alert" : "status",
|
|
3810
3996
|
"aria-live": e.variant === "error" ? "assertive" : "polite",
|
|
3811
3997
|
onMouseEnter: () => a(!0),
|
|
@@ -3814,24 +4000,24 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3814
4000
|
onBlur: () => a(!1),
|
|
3815
4001
|
children: [
|
|
3816
4002
|
/* @__PURE__ */ t("div", {
|
|
3817
|
-
className:
|
|
4003
|
+
className: Vn.icon,
|
|
3818
4004
|
"aria-hidden": "true",
|
|
3819
|
-
children: /* @__PURE__ */ t(
|
|
3820
|
-
name:
|
|
4005
|
+
children: /* @__PURE__ */ t(J, {
|
|
4006
|
+
name: Hn[e.variant],
|
|
3821
4007
|
color: "var(--ds-toast-accent)",
|
|
3822
4008
|
width: 20,
|
|
3823
4009
|
height: 20
|
|
3824
4010
|
})
|
|
3825
4011
|
}),
|
|
3826
4012
|
/* @__PURE__ */ n("div", {
|
|
3827
|
-
className:
|
|
4013
|
+
className: Vn.body,
|
|
3828
4014
|
children: [
|
|
3829
4015
|
e.title && /* @__PURE__ */ t("strong", {
|
|
3830
|
-
className:
|
|
4016
|
+
className: Vn.title,
|
|
3831
4017
|
children: e.title
|
|
3832
4018
|
}),
|
|
3833
4019
|
/* @__PURE__ */ t("div", {
|
|
3834
|
-
className:
|
|
4020
|
+
className: Vn.message,
|
|
3835
4021
|
children: e.message
|
|
3836
4022
|
}),
|
|
3837
4023
|
e.action && /* @__PURE__ */ t(j, {
|
|
@@ -3849,7 +4035,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3849
4035
|
size: "sm",
|
|
3850
4036
|
"aria-label": "Закрыть уведомление",
|
|
3851
4037
|
onClick: () => r(e.id),
|
|
3852
|
-
children: /* @__PURE__ */ t(
|
|
4038
|
+
children: /* @__PURE__ */ t(J, {
|
|
3853
4039
|
name: "IconCross",
|
|
3854
4040
|
width: 20,
|
|
3855
4041
|
height: 20
|
|
@@ -3857,15 +4043,15 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3857
4043
|
})
|
|
3858
4044
|
]
|
|
3859
4045
|
});
|
|
3860
|
-
},
|
|
4046
|
+
}, Wn = 0, Gn = S((e, t) => ({
|
|
3861
4047
|
toasts: [],
|
|
3862
4048
|
showToast: (n) => {
|
|
3863
4049
|
if (n.dedupeKey) {
|
|
3864
4050
|
let e = t().toasts.find((e) => e.dedupeKey === n.dedupeKey);
|
|
3865
4051
|
if (e) return e.id;
|
|
3866
4052
|
}
|
|
3867
|
-
|
|
3868
|
-
let r = `ds-toast-${
|
|
4053
|
+
Wn += 1;
|
|
4054
|
+
let r = `ds-toast-${Wn}`;
|
|
3869
4055
|
return e((e) => ({ toasts: [...e.toasts, {
|
|
3870
4056
|
variant: "info",
|
|
3871
4057
|
duration: 5e3,
|
|
@@ -3876,18 +4062,18 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3876
4062
|
},
|
|
3877
4063
|
removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
|
|
3878
4064
|
clearToasts: () => e({ toasts: [] })
|
|
3879
|
-
})),
|
|
3880
|
-
let r =
|
|
4065
|
+
})), Kn = () => Gn.setState({ toasts: [] }), qn = ({ position: e = "top-right", maxVisible: n }) => {
|
|
4066
|
+
let r = Gn((e) => e.toasts), i = Gn((e) => e.removeToast), a = n === void 0 ? r : r.slice(0, Math.max(0, Math.floor(n)));
|
|
3881
4067
|
return /* @__PURE__ */ t("div", {
|
|
3882
|
-
className: `${
|
|
4068
|
+
className: `${Vn.viewport} ${Vn[e]}`,
|
|
3883
4069
|
"aria-label": "Уведомления",
|
|
3884
|
-
children: a.map((e) => /* @__PURE__ */ t(
|
|
4070
|
+
children: a.map((e) => /* @__PURE__ */ t(Un, {
|
|
3885
4071
|
toast: e,
|
|
3886
4072
|
onClose: i
|
|
3887
4073
|
}, e.id))
|
|
3888
4074
|
});
|
|
3889
|
-
},
|
|
3890
|
-
let e =
|
|
4075
|
+
}, Jn = () => {
|
|
4076
|
+
let e = Gn((e) => e.showToast), t = Gn((e) => e.removeToast), n = Gn((e) => e.clearToasts), r = l((t) => e({
|
|
3891
4077
|
...t,
|
|
3892
4078
|
variant: "info"
|
|
3893
4079
|
}), [e]), i = l((t) => e({
|
|
@@ -3917,7 +4103,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3917
4103
|
i,
|
|
3918
4104
|
a
|
|
3919
4105
|
]);
|
|
3920
|
-
},
|
|
4106
|
+
}, Yn = {
|
|
3921
4107
|
root: "_root_8dm5q_1",
|
|
3922
4108
|
tooltip: "_tooltip_8dm5q_11",
|
|
3923
4109
|
"ds-tooltip-in": "_ds-tooltip-in_8dm5q_1",
|
|
@@ -3925,7 +4111,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3925
4111
|
bottom: "_bottom_8dm5q_55",
|
|
3926
4112
|
left: "_left_8dm5q_67",
|
|
3927
4113
|
right: "_right_8dm5q_79"
|
|
3928
|
-
},
|
|
4114
|
+
}, Xn = ({ content: e, children: r, placement: a = "top", delay: o = 450, disabled: s = !1, maxWidth: l = 280, className: u = "" }) => {
|
|
3929
4115
|
let p = f(), [m, _] = g(!1), v = h(null), y = () => {
|
|
3930
4116
|
s || !e || (v.current = setTimeout(() => _(!0), o));
|
|
3931
4117
|
}, b = () => {
|
|
@@ -3947,23 +4133,23 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3947
4133
|
onBlur: b
|
|
3948
4134
|
});
|
|
3949
4135
|
return /* @__PURE__ */ n("span", {
|
|
3950
|
-
className: `${
|
|
4136
|
+
className: `${Yn.root} ${u}`,
|
|
3951
4137
|
onPointerDown: m ? b : y,
|
|
3952
4138
|
children: [x, m && /* @__PURE__ */ t("span", {
|
|
3953
4139
|
id: p,
|
|
3954
4140
|
role: "tooltip",
|
|
3955
|
-
className: `${
|
|
4141
|
+
className: `${Yn.tooltip} ${Yn[a]}`,
|
|
3956
4142
|
style: { maxWidth: l },
|
|
3957
4143
|
children: e
|
|
3958
4144
|
})]
|
|
3959
4145
|
});
|
|
3960
|
-
},
|
|
4146
|
+
}, Zn = {
|
|
3961
4147
|
root: "_root_bs28m_1",
|
|
3962
4148
|
tabList: "_tabList_bs28m_11",
|
|
3963
4149
|
tab: "_tab_bs28m_11",
|
|
3964
4150
|
panels: "_panels_bs28m_127",
|
|
3965
4151
|
panel: "_panel_bs28m_127"
|
|
3966
|
-
},
|
|
4152
|
+
}, Qn = ({ items: e, value: r, onChange: i, ariaLabel: a = "Вкладки", disabled: o = !1, loading: s = !1, className: c = "" }) => {
|
|
3967
4153
|
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) => {
|
|
3968
4154
|
let n = e[t];
|
|
3969
4155
|
!n || n.disabled || d || (i(n.id), u.current[t]?.focus(), u.current[t]?.scrollIntoView({
|
|
@@ -3993,10 +4179,10 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3993
4179
|
t.preventDefault(), _(a);
|
|
3994
4180
|
};
|
|
3995
4181
|
return /* @__PURE__ */ n("div", {
|
|
3996
|
-
className: `${
|
|
4182
|
+
className: `${Zn.root} ${c}`,
|
|
3997
4183
|
"aria-busy": s || void 0,
|
|
3998
4184
|
children: [/* @__PURE__ */ t("div", {
|
|
3999
|
-
className:
|
|
4185
|
+
className: Zn.tabList,
|
|
4000
4186
|
role: "tablist",
|
|
4001
4187
|
"aria-label": a,
|
|
4002
4188
|
"aria-orientation": "horizontal",
|
|
@@ -4008,7 +4194,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4008
4194
|
u.current[n] = e;
|
|
4009
4195
|
},
|
|
4010
4196
|
id: a,
|
|
4011
|
-
className:
|
|
4197
|
+
className: Zn.tab,
|
|
4012
4198
|
type: "button",
|
|
4013
4199
|
role: "tab",
|
|
4014
4200
|
"aria-selected": i,
|
|
@@ -4021,12 +4207,12 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4021
4207
|
}, e.id);
|
|
4022
4208
|
})
|
|
4023
4209
|
}), /* @__PURE__ */ t("div", {
|
|
4024
|
-
className:
|
|
4210
|
+
className: Zn.panels,
|
|
4025
4211
|
children: e.map((e, n) => {
|
|
4026
4212
|
let i = e.id === r;
|
|
4027
4213
|
return /* @__PURE__ */ t("div", {
|
|
4028
4214
|
id: `${l}-panel-${n}`,
|
|
4029
|
-
className:
|
|
4215
|
+
className: Zn.panel,
|
|
4030
4216
|
role: "tabpanel",
|
|
4031
4217
|
"aria-labelledby": `${l}-tab-${n}`,
|
|
4032
4218
|
tabIndex: 0,
|
|
@@ -4036,7 +4222,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4036
4222
|
})
|
|
4037
4223
|
})]
|
|
4038
4224
|
});
|
|
4039
|
-
},
|
|
4225
|
+
}, $n = (e) => {
|
|
4040
4226
|
if (!Number.isFinite(e) || e < 0) return "00:00";
|
|
4041
4227
|
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")}`;
|
|
4042
4228
|
return n ? `${n}:${a}` : a;
|
|
@@ -4069,37 +4255,37 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4069
4255
|
settingsActionLabel: "_settingsActionLabel_14cqp_693",
|
|
4070
4256
|
caption: "_caption_14cqp_705",
|
|
4071
4257
|
fullscreen: "_fullscreen_14cqp_719"
|
|
4072
|
-
},
|
|
4258
|
+
}, er = 2500, tr = 5, nr = .05, rr = [
|
|
4073
4259
|
.5,
|
|
4074
4260
|
.75,
|
|
4075
4261
|
1,
|
|
4076
4262
|
1.25,
|
|
4077
4263
|
1.5,
|
|
4078
4264
|
2
|
|
4079
|
-
],
|
|
4080
|
-
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, te] = g(1), [V, H] = g(!!v.muted), [U, ne] = g(1), [re,
|
|
4265
|
+
], ir = ({ 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 }) => {
|
|
4266
|
+
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, te] = g(1), [V, H] = g(!!v.muted), [U, ne] = g(1), [re, W] = g(!!v.loop), [ie, ae] = g(-1), [oe, se] = g(!1), [G, K] = g(!0), [ce, le] = g(!1), [ue, de] = g(!1), fe = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), pe = i.map((e, t) => ({
|
|
4081
4267
|
track: e,
|
|
4082
4268
|
index: t
|
|
4083
|
-
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"),
|
|
4084
|
-
|
|
4085
|
-
}, [A,
|
|
4269
|
+
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), me = u ?? (C ? "Не удалось воспроизвести видео" : void 0), he = c || T && !me && r.length > 0, ge = !he && !me && r.length === 0, _e = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, ve = l(() => {
|
|
4270
|
+
K(!0), window.clearTimeout(S.current), A && !oe && (S.current = window.setTimeout(() => K(!1), er));
|
|
4271
|
+
}, [A, oe]);
|
|
4086
4272
|
d(() => {
|
|
4087
4273
|
w(!1), E(r.length > 0), O(!1), M(!1), N(!1), F(0), L(0), z(0);
|
|
4088
|
-
}, [
|
|
4089
|
-
let e = () =>
|
|
4274
|
+
}, [fe, r.length]), d(() => (ve(), () => window.clearTimeout(S.current)), [ve]), d(() => {
|
|
4275
|
+
let e = () => le(document.fullscreenElement === b.current), t = () => de(document.pictureInPictureElement === x.current);
|
|
4090
4276
|
return document.addEventListener("fullscreenchange", e), document.addEventListener("enterpictureinpicture", t), document.addEventListener("leavepictureinpicture", t), () => {
|
|
4091
4277
|
document.removeEventListener("fullscreenchange", e), document.removeEventListener("enterpictureinpicture", t), document.removeEventListener("leavepictureinpicture", t);
|
|
4092
4278
|
};
|
|
4093
4279
|
}, []), d(() => {
|
|
4094
|
-
if (!
|
|
4280
|
+
if (!oe) return;
|
|
4095
4281
|
let e = (e) => {
|
|
4096
|
-
y.current?.contains(e.target) ||
|
|
4282
|
+
y.current?.contains(e.target) || se(!1);
|
|
4097
4283
|
};
|
|
4098
4284
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
4099
|
-
}, [
|
|
4100
|
-
let
|
|
4285
|
+
}, [oe]);
|
|
4286
|
+
let ye = async () => {
|
|
4101
4287
|
let e = x.current;
|
|
4102
|
-
if (!(!e ||
|
|
4288
|
+
if (!(!e || me || he)) {
|
|
4103
4289
|
if (e.paused || e.ended) {
|
|
4104
4290
|
e.ended && (e.currentTime = 0);
|
|
4105
4291
|
try {
|
|
@@ -4109,60 +4295,60 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4109
4295
|
}
|
|
4110
4296
|
} else e.pause();
|
|
4111
4297
|
}
|
|
4112
|
-
},
|
|
4298
|
+
}, q = () => {
|
|
4113
4299
|
let e = x.current;
|
|
4114
4300
|
e && (e.muted = !e.muted);
|
|
4115
|
-
},
|
|
4301
|
+
}, be = (e) => {
|
|
4116
4302
|
let t = x.current;
|
|
4117
4303
|
t && (t.volume = Math.min(1, Math.max(0, e)), t.muted = t.volume === 0);
|
|
4118
|
-
},
|
|
4304
|
+
}, Y = (e) => {
|
|
4119
4305
|
let t = x.current;
|
|
4120
4306
|
!t || !I || (t.currentTime = Math.min(I, Math.max(0, e)), F(t.currentTime));
|
|
4121
|
-
},
|
|
4307
|
+
}, xe = async () => {
|
|
4122
4308
|
if (b.current) try {
|
|
4123
4309
|
document.fullscreenElement ? await document.exitFullscreen() : await b.current.requestFullscreen();
|
|
4124
4310
|
} catch {
|
|
4125
|
-
|
|
4311
|
+
le(!1);
|
|
4126
4312
|
}
|
|
4127
|
-
},
|
|
4313
|
+
}, X = async () => {
|
|
4128
4314
|
let e = x.current;
|
|
4129
|
-
if (!(!e || !
|
|
4315
|
+
if (!(!e || !_e)) try {
|
|
4130
4316
|
document.pictureInPictureElement ? await document.exitPictureInPicture() : await e.requestPictureInPicture();
|
|
4131
4317
|
} catch {
|
|
4132
|
-
|
|
4318
|
+
de(!1);
|
|
4133
4319
|
}
|
|
4134
|
-
},
|
|
4320
|
+
}, Se = (e) => {
|
|
4135
4321
|
let t = x.current;
|
|
4136
4322
|
t && (Array.from(t.textTracks).forEach((t, n) => {
|
|
4137
4323
|
t.mode = n === e ? "showing" : "disabled";
|
|
4138
|
-
}),
|
|
4139
|
-
},
|
|
4324
|
+
}), ae(e));
|
|
4325
|
+
}, Ce = (e) => {
|
|
4140
4326
|
let t = e.target;
|
|
4141
4327
|
if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
|
|
4142
4328
|
let n = e.key.toLowerCase();
|
|
4143
|
-
n === " " || n === "k" ? (e.preventDefault(),
|
|
4144
|
-
},
|
|
4329
|
+
n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), q()) : n === "f" ? (e.preventDefault(), xe()) : n === "c" && pe.length ? (e.preventDefault(), Se(ie === -1 ? pe[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Y(P + (e.key === "ArrowRight" ? tr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), be(B + (e.key === "ArrowUp" ? nr : -.05))) : e.key === "Escape" && se(!1), ve();
|
|
4330
|
+
}, we = () => {
|
|
4145
4331
|
let e = x.current;
|
|
4146
4332
|
w(!1), E(!0), e?.load();
|
|
4147
|
-
},
|
|
4333
|
+
}, Te = {
|
|
4148
4334
|
"--video-progress": `${I ? P / I * 100 : 0}%`,
|
|
4149
4335
|
"--video-buffered": `${R * 100}%`
|
|
4150
4336
|
};
|
|
4151
4337
|
return /* @__PURE__ */ n("figure", {
|
|
4152
4338
|
ref: y,
|
|
4153
4339
|
className: `${$.root} ${p}`,
|
|
4154
|
-
onKeyDown:
|
|
4340
|
+
onKeyDown: Ce,
|
|
4155
4341
|
children: [/* @__PURE__ */ n("div", {
|
|
4156
4342
|
ref: b,
|
|
4157
|
-
className: `${$.frame} ${
|
|
4343
|
+
className: `${$.frame} ${ce ? $.fullscreen : ""}`,
|
|
4158
4344
|
style: { aspectRatio: o },
|
|
4159
|
-
"aria-busy":
|
|
4345
|
+
"aria-busy": he || void 0,
|
|
4160
4346
|
tabIndex: m && r.length ? 0 : void 0,
|
|
4161
|
-
onPointerMove:
|
|
4162
|
-
onPointerDown:
|
|
4163
|
-
onFocusCapture:
|
|
4347
|
+
onPointerMove: ve,
|
|
4348
|
+
onPointerDown: ve,
|
|
4349
|
+
onFocusCapture: ve,
|
|
4164
4350
|
onMouseLeave: () => {
|
|
4165
|
-
A && !
|
|
4351
|
+
A && !oe && K(!1);
|
|
4166
4352
|
},
|
|
4167
4353
|
children: [
|
|
4168
4354
|
r.length > 0 && /* @__PURE__ */ n("video", {
|
|
@@ -4175,18 +4361,18 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4175
4361
|
className: $.video,
|
|
4176
4362
|
style: { objectFit: s },
|
|
4177
4363
|
onClick: (e) => {
|
|
4178
|
-
v.onClick?.(e),
|
|
4364
|
+
v.onClick?.(e), ye();
|
|
4179
4365
|
},
|
|
4180
4366
|
onDoubleClick: (e) => {
|
|
4181
|
-
v.onDoubleClick?.(e),
|
|
4367
|
+
v.onDoubleClick?.(e), xe();
|
|
4182
4368
|
},
|
|
4183
4369
|
onLoadStart: (e) => {
|
|
4184
4370
|
E(!0), v.onLoadStart?.(e);
|
|
4185
4371
|
},
|
|
4186
4372
|
onLoadedMetadata: (e) => {
|
|
4187
4373
|
L(e.currentTarget.duration || 0);
|
|
4188
|
-
let t =
|
|
4189
|
-
|
|
4374
|
+
let t = pe.find(({ track: e }) => e.default);
|
|
4375
|
+
Se(t?.index ?? -1), v.onLoadedMetadata?.(e);
|
|
4190
4376
|
},
|
|
4191
4377
|
onDurationChange: (e) => {
|
|
4192
4378
|
L(e.currentTarget.duration || 0), v.onDurationChange?.(e);
|
|
@@ -4217,7 +4403,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4217
4403
|
M(!1), v.onPause?.(e);
|
|
4218
4404
|
},
|
|
4219
4405
|
onEnded: (e) => {
|
|
4220
|
-
M(!1), N(!0),
|
|
4406
|
+
M(!1), N(!0), K(!0), v.onEnded?.(e);
|
|
4221
4407
|
},
|
|
4222
4408
|
onVolumeChange: (e) => {
|
|
4223
4409
|
te(e.currentTarget.volume), H(e.currentTarget.muted), v.onVolumeChange?.(e);
|
|
@@ -4230,7 +4416,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4230
4416
|
},
|
|
4231
4417
|
children: [r.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), i.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
|
|
4232
4418
|
}),
|
|
4233
|
-
|
|
4419
|
+
he && /* @__PURE__ */ n("div", {
|
|
4234
4420
|
className: $.overlay,
|
|
4235
4421
|
role: "status",
|
|
4236
4422
|
"aria-live": "polite",
|
|
@@ -4239,21 +4425,21 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4239
4425
|
"aria-hidden": "true",
|
|
4240
4426
|
children: /* @__PURE__ */ t("div", {
|
|
4241
4427
|
className: $.loaderScale,
|
|
4242
|
-
children: /* @__PURE__ */ t(
|
|
4428
|
+
children: /* @__PURE__ */ t(Bn, {})
|
|
4243
4429
|
})
|
|
4244
4430
|
}), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
|
|
4245
4431
|
}),
|
|
4246
|
-
!
|
|
4432
|
+
!he && D && !me && /* @__PURE__ */ t("div", {
|
|
4247
4433
|
className: $.buffering,
|
|
4248
4434
|
role: "status",
|
|
4249
4435
|
"aria-label": "Буферизация видео",
|
|
4250
4436
|
children: /* @__PURE__ */ t(k, { variant: "primary" })
|
|
4251
4437
|
}),
|
|
4252
|
-
|
|
4438
|
+
ge && /* @__PURE__ */ n("div", {
|
|
4253
4439
|
className: `${$.state} ${$.empty}`,
|
|
4254
4440
|
role: "status",
|
|
4255
4441
|
children: [
|
|
4256
|
-
/* @__PURE__ */ t(
|
|
4442
|
+
/* @__PURE__ */ t(J, {
|
|
4257
4443
|
name: "IconInfoCircle",
|
|
4258
4444
|
className: $.stateIcon,
|
|
4259
4445
|
width: 40,
|
|
@@ -4263,40 +4449,40 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4263
4449
|
f ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
|
|
4264
4450
|
]
|
|
4265
4451
|
}),
|
|
4266
|
-
!
|
|
4452
|
+
!he && me && /* @__PURE__ */ n("div", {
|
|
4267
4453
|
className: `${$.state} ${$.error}`,
|
|
4268
4454
|
role: "alert",
|
|
4269
4455
|
children: [
|
|
4270
|
-
/* @__PURE__ */ t(
|
|
4456
|
+
/* @__PURE__ */ t(J, {
|
|
4271
4457
|
name: "IconWarning",
|
|
4272
4458
|
className: $.stateIcon,
|
|
4273
4459
|
width: 40,
|
|
4274
4460
|
height: 40
|
|
4275
4461
|
}),
|
|
4276
|
-
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children:
|
|
4462
|
+
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: me })] }),
|
|
4277
4463
|
r.length > 0 && /* @__PURE__ */ t(j, {
|
|
4278
4464
|
size: "sm",
|
|
4279
4465
|
variant: "secondary",
|
|
4280
|
-
onClick:
|
|
4466
|
+
onClick: we,
|
|
4281
4467
|
children: "Повторить"
|
|
4282
4468
|
})
|
|
4283
4469
|
]
|
|
4284
4470
|
}),
|
|
4285
|
-
!
|
|
4471
|
+
!he && !me && ee && /* @__PURE__ */ t("button", {
|
|
4286
4472
|
type: "button",
|
|
4287
4473
|
className: $.replay,
|
|
4288
4474
|
"aria-label": "Воспроизвести заново",
|
|
4289
|
-
onClick: () => void
|
|
4290
|
-
children: /* @__PURE__ */ t(
|
|
4475
|
+
onClick: () => void ye(),
|
|
4476
|
+
children: /* @__PURE__ */ t(J, {
|
|
4291
4477
|
name: "IconReplay",
|
|
4292
4478
|
width: 28,
|
|
4293
4479
|
height: 28
|
|
4294
4480
|
})
|
|
4295
4481
|
}),
|
|
4296
|
-
m && r.length > 0 && !
|
|
4297
|
-
className: `${$.controlsLayer} ${
|
|
4482
|
+
m && r.length > 0 && !he && !me && /* @__PURE__ */ n("div", {
|
|
4483
|
+
className: `${$.controlsLayer} ${G || !A ? $.controlsVisible : ""}`,
|
|
4298
4484
|
onClick: (e) => e.stopPropagation(),
|
|
4299
|
-
children: [
|
|
4485
|
+
children: [oe && /* @__PURE__ */ n("div", {
|
|
4300
4486
|
className: $.settings,
|
|
4301
4487
|
role: "dialog",
|
|
4302
4488
|
"aria-label": "Настройки видео",
|
|
@@ -4307,18 +4493,18 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4307
4493
|
let t = Number(e.target.value);
|
|
4308
4494
|
x.current && (x.current.playbackRate = t);
|
|
4309
4495
|
},
|
|
4310
|
-
children:
|
|
4496
|
+
children: rr.map((e) => /* @__PURE__ */ n("option", {
|
|
4311
4497
|
value: e,
|
|
4312
4498
|
children: [e, "×"]
|
|
4313
4499
|
}, e))
|
|
4314
4500
|
})] }),
|
|
4315
|
-
|
|
4316
|
-
value:
|
|
4317
|
-
onChange: (e) =>
|
|
4501
|
+
pe.length > 0 && /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Субтитры" }), /* @__PURE__ */ n("select", {
|
|
4502
|
+
value: ie,
|
|
4503
|
+
onChange: (e) => Se(Number(e.target.value)),
|
|
4318
4504
|
children: [/* @__PURE__ */ t("option", {
|
|
4319
4505
|
value: -1,
|
|
4320
4506
|
children: "Выключены"
|
|
4321
|
-
}),
|
|
4507
|
+
}), pe.map(({ track: e, index: n }) => /* @__PURE__ */ t("option", {
|
|
4322
4508
|
value: n,
|
|
4323
4509
|
children: e.label
|
|
4324
4510
|
}, `${e.srcLang}-${e.label}`))]
|
|
@@ -4327,17 +4513,17 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4327
4513
|
type: "button",
|
|
4328
4514
|
className: $.settingsAction,
|
|
4329
4515
|
"aria-pressed": re,
|
|
4330
|
-
onClick: () =>
|
|
4516
|
+
onClick: () => W((e) => !e),
|
|
4331
4517
|
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: re ? "Вкл." : "Выкл." })]
|
|
4332
4518
|
}),
|
|
4333
|
-
|
|
4519
|
+
_e && /* @__PURE__ */ t("button", {
|
|
4334
4520
|
type: "button",
|
|
4335
4521
|
className: $.settingsAction,
|
|
4336
|
-
"aria-pressed":
|
|
4337
|
-
onClick: () => void
|
|
4522
|
+
"aria-pressed": ue,
|
|
4523
|
+
onClick: () => void X(),
|
|
4338
4524
|
children: /* @__PURE__ */ n("span", {
|
|
4339
4525
|
className: $.settingsActionLabel,
|
|
4340
|
-
children: [/* @__PURE__ */ t(
|
|
4526
|
+
children: [/* @__PURE__ */ t(J, {
|
|
4341
4527
|
name: "IconPictureInPicture",
|
|
4342
4528
|
width: 18,
|
|
4343
4529
|
height: 18
|
|
@@ -4355,8 +4541,8 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4355
4541
|
className: `${$.controlButton} ${$.playButton}`,
|
|
4356
4542
|
"aria-label": A ? "Пауза" : "Воспроизвести",
|
|
4357
4543
|
title: A ? "Пауза (K)" : "Воспроизвести (K)",
|
|
4358
|
-
onClick: () => void
|
|
4359
|
-
children: /* @__PURE__ */ t(
|
|
4544
|
+
onClick: () => void ye(),
|
|
4545
|
+
children: /* @__PURE__ */ t(J, {
|
|
4360
4546
|
name: A ? "IconPause" : "IconPlay",
|
|
4361
4547
|
width: 24,
|
|
4362
4548
|
height: 24
|
|
@@ -4371,8 +4557,8 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4371
4557
|
"aria-label": V ? "Включить звук" : "Выключить звук",
|
|
4372
4558
|
"aria-pressed": V,
|
|
4373
4559
|
title: "Звук (M)",
|
|
4374
|
-
onClick:
|
|
4375
|
-
children: /* @__PURE__ */ t(
|
|
4560
|
+
onClick: q,
|
|
4561
|
+
children: /* @__PURE__ */ t(J, {
|
|
4376
4562
|
name: V || B === 0 ? "IconVolumeMuted" : "IconVolume",
|
|
4377
4563
|
width: 22,
|
|
4378
4564
|
height: 22
|
|
@@ -4386,7 +4572,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4386
4572
|
value: V ? 0 : B,
|
|
4387
4573
|
"aria-label": "Громкость",
|
|
4388
4574
|
"aria-valuetext": `${Math.round((V ? 0 : B) * 100)}%`,
|
|
4389
|
-
onChange: (e) =>
|
|
4575
|
+
onChange: (e) => be(Number(e.target.value))
|
|
4390
4576
|
})]
|
|
4391
4577
|
}),
|
|
4392
4578
|
/* @__PURE__ */ n("div", {
|
|
@@ -4394,23 +4580,23 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4394
4580
|
children: [
|
|
4395
4581
|
/* @__PURE__ */ t("span", {
|
|
4396
4582
|
className: $.time,
|
|
4397
|
-
children:
|
|
4583
|
+
children: $n(P)
|
|
4398
4584
|
}),
|
|
4399
4585
|
/* @__PURE__ */ t("input", {
|
|
4400
4586
|
className: $.timeline,
|
|
4401
|
-
style:
|
|
4587
|
+
style: Te,
|
|
4402
4588
|
type: "range",
|
|
4403
4589
|
min: 0,
|
|
4404
4590
|
max: I || 0,
|
|
4405
4591
|
step: .01,
|
|
4406
4592
|
value: Math.min(P, I || 0),
|
|
4407
4593
|
"aria-label": "Позиция воспроизведения",
|
|
4408
|
-
"aria-valuetext": `${
|
|
4409
|
-
onChange: (e) =>
|
|
4594
|
+
"aria-valuetext": `${$n(P)} из ${$n(I)}`,
|
|
4595
|
+
onChange: (e) => Y(Number(e.target.value))
|
|
4410
4596
|
}),
|
|
4411
4597
|
/* @__PURE__ */ t("span", {
|
|
4412
4598
|
className: $.time,
|
|
4413
|
-
children:
|
|
4599
|
+
children: $n(I)
|
|
4414
4600
|
})
|
|
4415
4601
|
]
|
|
4416
4602
|
}),
|
|
@@ -4420,10 +4606,10 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4420
4606
|
type: "button",
|
|
4421
4607
|
className: $.controlButton,
|
|
4422
4608
|
"aria-label": "Настройки",
|
|
4423
|
-
"aria-expanded":
|
|
4609
|
+
"aria-expanded": oe,
|
|
4424
4610
|
title: "Настройки",
|
|
4425
|
-
onClick: () =>
|
|
4426
|
-
children: /* @__PURE__ */ t(
|
|
4611
|
+
onClick: () => se((e) => !e),
|
|
4612
|
+
children: /* @__PURE__ */ t(J, {
|
|
4427
4613
|
name: "IconSettings",
|
|
4428
4614
|
width: 22,
|
|
4429
4615
|
height: 22
|
|
@@ -4431,11 +4617,11 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4431
4617
|
}), /* @__PURE__ */ t("button", {
|
|
4432
4618
|
type: "button",
|
|
4433
4619
|
className: $.controlButton,
|
|
4434
|
-
"aria-label":
|
|
4620
|
+
"aria-label": ce ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
|
|
4435
4621
|
title: "Полноэкранный режим (F)",
|
|
4436
|
-
onClick: () => void
|
|
4437
|
-
children: /* @__PURE__ */ t(
|
|
4438
|
-
name:
|
|
4622
|
+
onClick: () => void xe(),
|
|
4623
|
+
children: /* @__PURE__ */ t(J, {
|
|
4624
|
+
name: ce ? "IconFullscreenExit" : "IconFullscreen",
|
|
4439
4625
|
width: 22,
|
|
4440
4626
|
height: 22
|
|
4441
4627
|
})
|
|
@@ -4450,7 +4636,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4450
4636
|
children: a
|
|
4451
4637
|
})]
|
|
4452
4638
|
});
|
|
4453
|
-
},
|
|
4639
|
+
}, ar = {
|
|
4454
4640
|
root: "_root_ymidq_1",
|
|
4455
4641
|
trigger: "_trigger_ymidq_15",
|
|
4456
4642
|
heading: "_heading_ymidq_41",
|
|
@@ -4460,7 +4646,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4460
4646
|
open: "_open_ymidq_91",
|
|
4461
4647
|
content: "_content_ymidq_99",
|
|
4462
4648
|
contentInner: "_contentInner_ymidq_119"
|
|
4463
|
-
},
|
|
4649
|
+
}, or = (e, t, n, r = 16) => {
|
|
4464
4650
|
if (t > Math.max(0, n - r * 2)) {
|
|
4465
4651
|
let t = e - r;
|
|
4466
4652
|
return Math.abs(t) <= 1 ? {
|
|
@@ -4482,7 +4668,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4482
4668
|
alignment: "none",
|
|
4483
4669
|
delta: 0
|
|
4484
4670
|
};
|
|
4485
|
-
},
|
|
4671
|
+
}, sr = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, autoScrollOnOpen: c = !0, scrollOffset: l = 16, className: u = "" }) => {
|
|
4486
4672
|
let p = f(), [m, _] = g(a), v = o ?? m, y = h(null), b = h(null), x = h(v);
|
|
4487
4673
|
return d(() => {
|
|
4488
4674
|
let e = x.current;
|
|
@@ -4492,7 +4678,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4492
4678
|
let r = !1, i = () => {
|
|
4493
4679
|
if (r) return;
|
|
4494
4680
|
r = !0;
|
|
4495
|
-
let e = t.getBoundingClientRect(), n =
|
|
4681
|
+
let e = t.getBoundingClientRect(), n = or(e.top, e.height, window.innerHeight, l);
|
|
4496
4682
|
if (n.alignment === "none") return;
|
|
4497
4683
|
let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
4498
4684
|
window.scrollBy({
|
|
@@ -4513,10 +4699,10 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4513
4699
|
l
|
|
4514
4700
|
]), /* @__PURE__ */ n("section", {
|
|
4515
4701
|
ref: y,
|
|
4516
|
-
className: `${
|
|
4702
|
+
className: `${ar.root} ${v ? ar.open : ""} ${u}`,
|
|
4517
4703
|
children: [/* @__PURE__ */ n("button", {
|
|
4518
4704
|
type: "button",
|
|
4519
|
-
className:
|
|
4705
|
+
className: ar.trigger,
|
|
4520
4706
|
"aria-expanded": v,
|
|
4521
4707
|
"aria-controls": p,
|
|
4522
4708
|
onClick: () => {
|
|
@@ -4524,18 +4710,18 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4524
4710
|
o === void 0 && _(e), s?.(e);
|
|
4525
4711
|
},
|
|
4526
4712
|
children: [/* @__PURE__ */ n("span", {
|
|
4527
|
-
className:
|
|
4713
|
+
className: ar.heading,
|
|
4528
4714
|
children: [/* @__PURE__ */ t("span", {
|
|
4529
|
-
className:
|
|
4715
|
+
className: ar.title,
|
|
4530
4716
|
children: e
|
|
4531
4717
|
}), r && /* @__PURE__ */ t("span", {
|
|
4532
|
-
className:
|
|
4718
|
+
className: ar.subtitle,
|
|
4533
4719
|
children: r
|
|
4534
4720
|
})]
|
|
4535
4721
|
}), /* @__PURE__ */ t("span", {
|
|
4536
|
-
className:
|
|
4722
|
+
className: ar.icon,
|
|
4537
4723
|
"aria-hidden": "true",
|
|
4538
|
-
children: /* @__PURE__ */ t(
|
|
4724
|
+
children: /* @__PURE__ */ t(J, {
|
|
4539
4725
|
name: "IconChevron",
|
|
4540
4726
|
width: 20,
|
|
4541
4727
|
height: 20
|
|
@@ -4544,15 +4730,15 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4544
4730
|
}), /* @__PURE__ */ t("div", {
|
|
4545
4731
|
ref: b,
|
|
4546
4732
|
id: p,
|
|
4547
|
-
className:
|
|
4733
|
+
className: ar.content,
|
|
4548
4734
|
"aria-hidden": !v,
|
|
4549
4735
|
children: /* @__PURE__ */ t("div", {
|
|
4550
|
-
className:
|
|
4736
|
+
className: ar.contentInner,
|
|
4551
4737
|
children: i
|
|
4552
4738
|
})
|
|
4553
4739
|
})]
|
|
4554
4740
|
});
|
|
4555
|
-
},
|
|
4741
|
+
}, cr = {
|
|
4556
4742
|
root: "_root_14ewt_1",
|
|
4557
4743
|
topSlot: "_topSlot_14ewt_29",
|
|
4558
4744
|
searchSlot: "_searchSlot_14ewt_31",
|
|
@@ -4570,14 +4756,14 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4570
4756
|
description: "_description_14ewt_235",
|
|
4571
4757
|
badge: "_badge_14ewt_269",
|
|
4572
4758
|
empty: "_empty_14ewt_281"
|
|
4573
|
-
},
|
|
4759
|
+
}, lr = (e, t, n) => {
|
|
4574
4760
|
if (e.length === 0) return -1;
|
|
4575
4761
|
for (let r = 1; r <= e.length; r += 1) {
|
|
4576
4762
|
let i = (t + n * r + e.length) % e.length;
|
|
4577
4763
|
if (!e[i]?.disabled) return i;
|
|
4578
4764
|
}
|
|
4579
4765
|
return -1;
|
|
4580
|
-
},
|
|
4766
|
+
}, ur = ({ groups: r, currentItemId: i, ariaLabel: a = "Основная навигация", searchSlot: o, topSlot: s, bottomSlot: c, emptyState: l, renderLink: u, onItemSelect: d, className: p = "" }) => {
|
|
4581
4767
|
let m = f(), g = h(null), _ = h({
|
|
4582
4768
|
value: "",
|
|
4583
4769
|
time: 0
|
|
@@ -4589,7 +4775,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4589
4775
|
let n = v.findIndex((e) => e.id === t.id);
|
|
4590
4776
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
4591
4777
|
e.preventDefault();
|
|
4592
|
-
let t =
|
|
4778
|
+
let t = lr(v, n, e.key === "ArrowDown" ? 1 : -1);
|
|
4593
4779
|
x(v[t]);
|
|
4594
4780
|
return;
|
|
4595
4781
|
}
|
|
@@ -4609,26 +4795,26 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4609
4795
|
let a = r.id === i, o = {
|
|
4610
4796
|
children: /* @__PURE__ */ n(e, { children: [
|
|
4611
4797
|
r.icon && /* @__PURE__ */ t("span", {
|
|
4612
|
-
className:
|
|
4798
|
+
className: cr.icon,
|
|
4613
4799
|
"aria-hidden": "true",
|
|
4614
4800
|
children: r.icon
|
|
4615
4801
|
}),
|
|
4616
4802
|
/* @__PURE__ */ n("span", {
|
|
4617
|
-
className:
|
|
4803
|
+
className: cr.copy,
|
|
4618
4804
|
children: [/* @__PURE__ */ t("span", {
|
|
4619
|
-
className:
|
|
4805
|
+
className: cr.label,
|
|
4620
4806
|
children: r.label
|
|
4621
4807
|
}), r.description && /* @__PURE__ */ t("span", {
|
|
4622
|
-
className:
|
|
4808
|
+
className: cr.description,
|
|
4623
4809
|
children: r.description
|
|
4624
4810
|
})]
|
|
4625
4811
|
}),
|
|
4626
4812
|
r.badge && /* @__PURE__ */ t("span", {
|
|
4627
|
-
className:
|
|
4813
|
+
className: cr.badge,
|
|
4628
4814
|
children: r.badge
|
|
4629
4815
|
})
|
|
4630
4816
|
] }),
|
|
4631
|
-
className: `${
|
|
4817
|
+
className: `${cr.link} ${a ? cr.current : ""}`,
|
|
4632
4818
|
tabIndex: r.id === b ? 0 : -1,
|
|
4633
4819
|
"aria-current": a ? "page" : void 0,
|
|
4634
4820
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -4644,7 +4830,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4644
4830
|
onKeyDown: (e) => S(e, r)
|
|
4645
4831
|
};
|
|
4646
4832
|
return /* @__PURE__ */ t("li", {
|
|
4647
|
-
className:
|
|
4833
|
+
className: cr.item,
|
|
4648
4834
|
children: u ? u(r, o) : r.href ? /* @__PURE__ */ t("a", {
|
|
4649
4835
|
href: r.href,
|
|
4650
4836
|
...o,
|
|
@@ -4659,45 +4845,45 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4659
4845
|
};
|
|
4660
4846
|
return /* @__PURE__ */ n("nav", {
|
|
4661
4847
|
ref: g,
|
|
4662
|
-
className: `${
|
|
4848
|
+
className: `${cr.root} ${p}`,
|
|
4663
4849
|
"aria-label": a,
|
|
4664
4850
|
children: [
|
|
4665
4851
|
s && /* @__PURE__ */ t("div", {
|
|
4666
|
-
className:
|
|
4852
|
+
className: cr.topSlot,
|
|
4667
4853
|
children: s
|
|
4668
4854
|
}),
|
|
4669
4855
|
o && /* @__PURE__ */ t("div", {
|
|
4670
|
-
className:
|
|
4856
|
+
className: cr.searchSlot,
|
|
4671
4857
|
children: o
|
|
4672
4858
|
}),
|
|
4673
4859
|
/* @__PURE__ */ n("div", {
|
|
4674
|
-
className:
|
|
4860
|
+
className: cr.groups,
|
|
4675
4861
|
children: [r.map((e) => {
|
|
4676
4862
|
let r = `${m}-${e.id}`;
|
|
4677
4863
|
return /* @__PURE__ */ n("section", {
|
|
4678
|
-
className:
|
|
4864
|
+
className: cr.group,
|
|
4679
4865
|
"aria-labelledby": e.label ? r : void 0,
|
|
4680
4866
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
4681
4867
|
id: r,
|
|
4682
|
-
className:
|
|
4868
|
+
className: cr.groupLabel,
|
|
4683
4869
|
children: e.label
|
|
4684
4870
|
}), /* @__PURE__ */ t("ul", {
|
|
4685
|
-
className:
|
|
4871
|
+
className: cr.list,
|
|
4686
4872
|
children: e.items.map(C)
|
|
4687
4873
|
})]
|
|
4688
4874
|
}, e.id);
|
|
4689
4875
|
}), v.length === 0 && l && /* @__PURE__ */ t("div", {
|
|
4690
|
-
className:
|
|
4876
|
+
className: cr.empty,
|
|
4691
4877
|
children: l
|
|
4692
4878
|
})]
|
|
4693
4879
|
}),
|
|
4694
4880
|
c && /* @__PURE__ */ t("div", {
|
|
4695
|
-
className:
|
|
4881
|
+
className: cr.bottomSlot,
|
|
4696
4882
|
children: c
|
|
4697
4883
|
})
|
|
4698
4884
|
]
|
|
4699
4885
|
});
|
|
4700
|
-
},
|
|
4886
|
+
}, dr = {
|
|
4701
4887
|
root: "_root_2mdgb_1",
|
|
4702
4888
|
list: "_list_2mdgb_19",
|
|
4703
4889
|
item: "_item_2mdgb_37",
|
|
@@ -4707,7 +4893,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4707
4893
|
icon: "_icon_2mdgb_141",
|
|
4708
4894
|
badge: "_badge_2mdgb_149",
|
|
4709
4895
|
label: "_label_2mdgb_163"
|
|
4710
|
-
},
|
|
4896
|
+
}, fr = ({ items: r, currentItemId: i, ariaLabel: a = "Мобильная навигация", renderLink: o, onItemSelect: s, className: c = "" }) => {
|
|
4711
4897
|
let l = h(null), u = r.filter((e) => !e.disabled), d = u.some((e) => e.id === i) ? i : u[0]?.id, f = (e) => {
|
|
4712
4898
|
l.current?.querySelectorAll("[data-ds-navigation-item]")[e]?.focus();
|
|
4713
4899
|
}, p = (e, t) => {
|
|
@@ -4724,27 +4910,27 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4724
4910
|
};
|
|
4725
4911
|
return /* @__PURE__ */ t("nav", {
|
|
4726
4912
|
ref: l,
|
|
4727
|
-
className: `${
|
|
4913
|
+
className: `${dr.root} ${c}`,
|
|
4728
4914
|
"aria-label": a,
|
|
4729
4915
|
children: /* @__PURE__ */ t("ul", {
|
|
4730
|
-
className:
|
|
4916
|
+
className: dr.list,
|
|
4731
4917
|
children: r.map((r) => {
|
|
4732
4918
|
let a = r.id === i, c = {
|
|
4733
4919
|
children: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("span", {
|
|
4734
|
-
className:
|
|
4920
|
+
className: dr.visual,
|
|
4735
4921
|
children: [r.icon && /* @__PURE__ */ t("span", {
|
|
4736
|
-
className:
|
|
4922
|
+
className: dr.icon,
|
|
4737
4923
|
"aria-hidden": "true",
|
|
4738
4924
|
children: r.icon
|
|
4739
4925
|
}), r.badge && /* @__PURE__ */ t("span", {
|
|
4740
|
-
className:
|
|
4926
|
+
className: dr.badge,
|
|
4741
4927
|
children: r.badge
|
|
4742
4928
|
})]
|
|
4743
4929
|
}), /* @__PURE__ */ t("span", {
|
|
4744
|
-
className:
|
|
4930
|
+
className: dr.label,
|
|
4745
4931
|
children: r.label
|
|
4746
4932
|
})] }),
|
|
4747
|
-
className: `${
|
|
4933
|
+
className: `${dr.link} ${a ? dr.current : ""}`,
|
|
4748
4934
|
tabIndex: r.id === d ? 0 : -1,
|
|
4749
4935
|
"aria-current": a ? "page" : void 0,
|
|
4750
4936
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -4760,7 +4946,7 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4760
4946
|
onKeyDown: (e) => p(e, r)
|
|
4761
4947
|
};
|
|
4762
4948
|
return /* @__PURE__ */ t("li", {
|
|
4763
|
-
className:
|
|
4949
|
+
className: dr.item,
|
|
4764
4950
|
children: o ? o(r, c) : r.href ? /* @__PURE__ */ t("a", {
|
|
4765
4951
|
href: r.href,
|
|
4766
4952
|
...c,
|
|
@@ -4777,4 +4963,4 @@ var fn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4777
4963
|
});
|
|
4778
4964
|
};
|
|
4779
4965
|
//#endregion
|
|
4780
|
-
export {
|
|
4966
|
+
export { xn as ConfirmModal, sr as DSAccordion, w as DSBadge, fr as DSBottomNavigation, Ln as DSBottomSheet, j as DSButton, xe as DSCheckbox, D as DSCounterBadge, Tt as DSDataTable, We as DSDateRange, Ve as DSDateTimePicker, In as DSDrawer, Qe as DSDropDown, st as DSDropDownMultiple, ee as DSFieldLabel, N as DSFieldMessage, qt as DSFileInput, Rt as DSFilters, Yt as DSFloatingMenu, Bt as DSFormGrid, Vt as DSFormGridItem, Rn as DSFullscreenDialog, J as DSIcon, It as DSInfoBlock, nt as DSInput, k as DSLoader, hn as DSModal, mn as DSModalFrame, ur as DSNavigationSurface, Fn as DSOverlay, Bn as DSPageLoader, Jt as DSPortal, lt as DSRadioButton, Pt as DSSearchDropDown, Ke as DSSkeleton, et as DSSort, Qn as DSTabs, $t as DSTextarea, Un as DSToast, qn as DSToastProvider, Xn as DSTooltip, Ht as DSValidationSummary, ir as DSVideoPlayerFrame, Sn as ErrorModal, gn as ModalSystemProvider, Cn as builtInModalRegistry, _n as defineModalRegistry, E as formatDSCounterValue, De as formatDateInputValue, Ne as formatDateTimeLocalValue, or as getDSAccordionScrollTarget, pt as getDSDataTableColumnStyle, ht as getDSDataTablePaginationItems, mt as getDSDataTableStickyColumnStyle, Tn as getErrorMessage, ft as getNextDSDataTablePageSelection, Xe as getNextEnabledOptionIndex, Ae as isValidDateInputPrefix, Ue as isValidDateRange, Oe as maskDateInputValue, je as parseDateInputValue, Pe as parseDateTimeLocalValue, nn as resetModalStore, Kn as resetToastStore, wn as useConfirmModal, Dn as useConfirmModalStore, Pn as useDSOverlay, En as useErrorModal, On as useErrorModalStore, kn as useModals, tn as useModalsStore, Jn as useToast, Gn as useToastStore, gt as validateDSDataTableData };
|