@efficiency-point/design-system 0.1.39 → 0.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DSDropDown/DSDropDown.d.ts +2 -0
- package/dist/components/DSDropDown/DSDropDown.d.ts.map +1 -1
- package/dist/components/DSDropDownMultiple/DSDropDownMultiple.d.ts.map +1 -1
- package/dist/components/DSSearchDropDown/DSSearchDropDown.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.es.js +766 -758
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -184,23 +184,23 @@ var j = {
|
|
|
184
184
|
}), H = (e) => /* @__PURE__ */ t(N, {
|
|
185
185
|
...e,
|
|
186
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" })
|
|
187
|
-
}),
|
|
187
|
+
}), ne = (e) => /* @__PURE__ */ t(N, {
|
|
188
188
|
...e,
|
|
189
189
|
children: /* @__PURE__ */ t("path", { d: "M12 10v7m0-10v.01" })
|
|
190
|
-
}),
|
|
190
|
+
}), re = (e) => /* @__PURE__ */ n(N, {
|
|
191
191
|
...e,
|
|
192
192
|
children: [/* @__PURE__ */ t("circle", {
|
|
193
193
|
cx: "12",
|
|
194
194
|
cy: "12",
|
|
195
195
|
r: "10"
|
|
196
196
|
}), /* @__PURE__ */ t("path", { d: "M12 16v-4M12 8v.01" })]
|
|
197
|
-
}),
|
|
197
|
+
}), ie = (e) => /* @__PURE__ */ t(N, {
|
|
198
198
|
...e,
|
|
199
199
|
children: /* @__PURE__ */ t("path", { d: "M5 12h14" })
|
|
200
|
-
}),
|
|
200
|
+
}), ae = (e) => /* @__PURE__ */ t(N, {
|
|
201
201
|
...e,
|
|
202
202
|
children: /* @__PURE__ */ t("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" })
|
|
203
|
-
}),
|
|
203
|
+
}), oe = (e) => /* @__PURE__ */ n(N, {
|
|
204
204
|
...e,
|
|
205
205
|
children: [/* @__PURE__ */ t("rect", {
|
|
206
206
|
width: "18",
|
|
@@ -209,135 +209,135 @@ var j = {
|
|
|
209
209
|
y: "3",
|
|
210
210
|
rx: "2"
|
|
211
211
|
}), /* @__PURE__ */ t("path", { d: "M3 9h18M9 21V9" })]
|
|
212
|
-
}),
|
|
212
|
+
}), se = (e) => /* @__PURE__ */ t(N, {
|
|
213
213
|
...e,
|
|
214
214
|
children: /* @__PURE__ */ t("path", {
|
|
215
215
|
d: "M8 5v14M16 5v14",
|
|
216
216
|
strokeWidth: "3"
|
|
217
217
|
})
|
|
218
|
-
}),
|
|
218
|
+
}), ce = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(N, {
|
|
219
219
|
strokeWidth: e,
|
|
220
220
|
...n,
|
|
221
221
|
children: /* @__PURE__ */ t("path", { d: "M12 5v14M5 12h14" })
|
|
222
|
-
}),
|
|
222
|
+
}), le = (e) => /* @__PURE__ */ t(N, {
|
|
223
223
|
...e,
|
|
224
224
|
children: /* @__PURE__ */ t("path", { d: "M3 5h18v14H3V5Zm10 7h6v5h-6v-5Z" })
|
|
225
|
-
}),
|
|
225
|
+
}), ue = (e) => /* @__PURE__ */ t(N, {
|
|
226
226
|
...e,
|
|
227
227
|
children: /* @__PURE__ */ t("path", {
|
|
228
228
|
d: "m8 5 11 7-11 7V5Z",
|
|
229
229
|
fill: "currentColor",
|
|
230
230
|
stroke: "none"
|
|
231
231
|
})
|
|
232
|
-
}),
|
|
232
|
+
}), U = (e) => /* @__PURE__ */ t(N, {
|
|
233
233
|
...e,
|
|
234
234
|
children: /* @__PURE__ */ t("path", { d: "M4 7v5h5M5.5 11a7 7 0 1 1 1.3 6.3" })
|
|
235
|
-
}),
|
|
235
|
+
}), de = (e) => /* @__PURE__ */ t(N, {
|
|
236
236
|
...e,
|
|
237
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" })
|
|
238
|
-
}),
|
|
238
|
+
}), fe = (e) => /* @__PURE__ */ t(N, {
|
|
239
239
|
...e,
|
|
240
240
|
children: /* @__PURE__ */ t("path", { d: "M9 4H4v5m11-5h5v5M9 20H4v-5m11 5h5v-5" })
|
|
241
|
-
}),
|
|
241
|
+
}), pe = (e) => /* @__PURE__ */ t(N, {
|
|
242
242
|
...e,
|
|
243
243
|
children: /* @__PURE__ */ t("path", { d: "M4 9h5V4m6 5h5V4M4 15h5v5m6-5h5v5" })
|
|
244
|
-
}),
|
|
244
|
+
}), W = (e) => /* @__PURE__ */ t(N, {
|
|
245
245
|
...e,
|
|
246
246
|
children: /* @__PURE__ */ t("path", { d: "M4 6h16v12H4V6Zm7 4a2 2 0 1 0 0 4m7-4a2 2 0 1 0 0 4" })
|
|
247
|
-
}),
|
|
247
|
+
}), me = (e) => /* @__PURE__ */ t(N, {
|
|
248
248
|
...e,
|
|
249
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" })
|
|
250
|
-
}),
|
|
250
|
+
}), he = (e) => /* @__PURE__ */ t(N, {
|
|
251
251
|
...e,
|
|
252
252
|
children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12 0 4 4m0-4-4 4" })
|
|
253
|
-
}),
|
|
253
|
+
}), ge = (e) => /* @__PURE__ */ t(N, {
|
|
254
254
|
...e,
|
|
255
255
|
children: /* @__PURE__ */ t("path", { d: "M8 17V5m-3 3 3-3 3 3M16 7v12m-3-3 3 3 3-3" })
|
|
256
|
-
}),
|
|
256
|
+
}), _e = (e) => /* @__PURE__ */ t(N, {
|
|
257
257
|
...e,
|
|
258
258
|
children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
|
|
259
|
-
}),
|
|
259
|
+
}), ve = (e) => /* @__PURE__ */ t(N, {
|
|
260
260
|
...e,
|
|
261
261
|
children: /* @__PURE__ */ t("path", { d: "M12 5v14m-5-5 5 5 5-5" })
|
|
262
|
-
}),
|
|
262
|
+
}), ye = (e) => /* @__PURE__ */ n(N, {
|
|
263
263
|
...e,
|
|
264
264
|
children: [/* @__PURE__ */ t("circle", {
|
|
265
265
|
cx: "12",
|
|
266
266
|
cy: "12",
|
|
267
267
|
r: "10"
|
|
268
268
|
}), /* @__PURE__ */ t("path", { d: "m9 12 2 2 4-4" })]
|
|
269
|
-
}),
|
|
269
|
+
}), be = (e) => /* @__PURE__ */ t(N, {
|
|
270
270
|
...e,
|
|
271
271
|
children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
|
|
272
|
-
}),
|
|
272
|
+
}), xe = (e) => /* @__PURE__ */ n(N, {
|
|
273
273
|
...e,
|
|
274
274
|
children: [/* @__PURE__ */ t("path", { d: "M12 3.5L21 19H3L12 3.5Z" }), /* @__PURE__ */ t("path", { d: "M12 9v4.5M12 16.5v.01" })]
|
|
275
|
-
}),
|
|
275
|
+
}), G = (e) => (n) => /* @__PURE__ */ t(N, {
|
|
276
276
|
...n,
|
|
277
277
|
children: e.map(([e, t], n) => o(e, {
|
|
278
278
|
...t,
|
|
279
279
|
key: t.key ?? `${e}-${n}`
|
|
280
280
|
}))
|
|
281
|
-
}),
|
|
282
|
-
IconActivity:
|
|
281
|
+
}), Se = {
|
|
282
|
+
IconActivity: G([["path", {
|
|
283
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",
|
|
284
284
|
key: "169zse"
|
|
285
285
|
}]]),
|
|
286
|
-
IconAlertTriangle:
|
|
286
|
+
IconAlertTriangle: G([
|
|
287
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" }],
|
|
288
288
|
["path", { d: "M12 9v4" }],
|
|
289
289
|
["path", { d: "M12 17h.01" }]
|
|
290
290
|
]),
|
|
291
|
-
IconArrowDown:
|
|
291
|
+
IconArrowDown: G([["path", {
|
|
292
292
|
d: "M12 5v14",
|
|
293
293
|
key: "s699le"
|
|
294
294
|
}], ["path", {
|
|
295
295
|
d: "m19 12-7 7-7-7",
|
|
296
296
|
key: "1idqje"
|
|
297
297
|
}]]),
|
|
298
|
-
IconArrowLeft:
|
|
298
|
+
IconArrowLeft: G([["path", {
|
|
299
299
|
d: "m12 19-7-7 7-7",
|
|
300
300
|
key: "1l729n"
|
|
301
301
|
}], ["path", {
|
|
302
302
|
d: "M19 12H5",
|
|
303
303
|
key: "x3x0zl"
|
|
304
304
|
}]]),
|
|
305
|
-
IconArrowRight:
|
|
305
|
+
IconArrowRight: G([["path", {
|
|
306
306
|
d: "M5 12h14",
|
|
307
307
|
key: "1ays0h"
|
|
308
308
|
}], ["path", {
|
|
309
309
|
d: "m12 5 7 7-7 7",
|
|
310
310
|
key: "xquz4c"
|
|
311
311
|
}]]),
|
|
312
|
-
IconArrowUp:
|
|
312
|
+
IconArrowUp: G([["path", {
|
|
313
313
|
d: "m5 12 7-7 7 7",
|
|
314
314
|
key: "hav0vg"
|
|
315
315
|
}], ["path", {
|
|
316
316
|
d: "M12 19V5",
|
|
317
317
|
key: "x0mq9r"
|
|
318
318
|
}]]),
|
|
319
|
-
IconArrowUpRight:
|
|
319
|
+
IconArrowUpRight: G([["path", {
|
|
320
320
|
d: "M7 7h10v10",
|
|
321
321
|
key: "1tivn9"
|
|
322
322
|
}], ["path", {
|
|
323
323
|
d: "M7 17 17 7",
|
|
324
324
|
key: "1vkiza"
|
|
325
325
|
}]]),
|
|
326
|
-
IconBarChart3:
|
|
326
|
+
IconBarChart3: G([
|
|
327
327
|
["path", { d: "M3 3v18h18" }],
|
|
328
328
|
["path", { d: "M18 17V9" }],
|
|
329
329
|
["path", { d: "M13 17V5" }],
|
|
330
330
|
["path", { d: "M8 17v-3" }]
|
|
331
331
|
]),
|
|
332
332
|
IconBedDouble: F,
|
|
333
|
-
IconBell:
|
|
333
|
+
IconBell: G([["path", {
|
|
334
334
|
d: "M10.268 21a2 2 0 0 0 3.464 0",
|
|
335
335
|
key: "vwvbt9"
|
|
336
336
|
}], ["path", {
|
|
337
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",
|
|
338
338
|
key: "11g9vi"
|
|
339
339
|
}]]),
|
|
340
|
-
IconBoxes:
|
|
340
|
+
IconBoxes: G([
|
|
341
341
|
["path", {
|
|
342
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",
|
|
343
343
|
key: "lc1i9w"
|
|
@@ -387,7 +387,7 @@ var j = {
|
|
|
387
387
|
key: "1io7kd"
|
|
388
388
|
}]
|
|
389
389
|
]),
|
|
390
|
-
IconBuilding2:
|
|
390
|
+
IconBuilding2: G([
|
|
391
391
|
["path", {
|
|
392
392
|
d: "M10 12h4",
|
|
393
393
|
key: "a56b0p"
|
|
@@ -409,7 +409,7 @@ var j = {
|
|
|
409
409
|
key: "16ra0t"
|
|
410
410
|
}]
|
|
411
411
|
]),
|
|
412
|
-
IconCamera:
|
|
412
|
+
IconCamera: G([["path", {
|
|
413
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",
|
|
414
414
|
key: "18u6gg"
|
|
415
415
|
}], ["circle", {
|
|
@@ -418,7 +418,7 @@ var j = {
|
|
|
418
418
|
r: "3",
|
|
419
419
|
key: "1vg3eu"
|
|
420
420
|
}]]),
|
|
421
|
-
IconChartNoAxesCombined:
|
|
421
|
+
IconChartNoAxesCombined: G([
|
|
422
422
|
["path", {
|
|
423
423
|
d: "M12 16v5",
|
|
424
424
|
key: "zza2cw"
|
|
@@ -444,11 +444,11 @@ var j = {
|
|
|
444
444
|
key: "1t2idw"
|
|
445
445
|
}]
|
|
446
446
|
]),
|
|
447
|
-
IconChevronRight:
|
|
447
|
+
IconChevronRight: G([["path", {
|
|
448
448
|
d: "m9 18 6-6-6-6",
|
|
449
449
|
key: "mthhwq"
|
|
450
450
|
}]]),
|
|
451
|
-
IconCircleAlert:
|
|
451
|
+
IconCircleAlert: G([
|
|
452
452
|
["circle", {
|
|
453
453
|
cx: "12",
|
|
454
454
|
cy: "12",
|
|
@@ -470,7 +470,7 @@ var j = {
|
|
|
470
470
|
key: "4dfq90"
|
|
471
471
|
}]
|
|
472
472
|
]),
|
|
473
|
-
IconClock3:
|
|
473
|
+
IconClock3: G([["circle", {
|
|
474
474
|
cx: "12",
|
|
475
475
|
cy: "12",
|
|
476
476
|
r: "10",
|
|
@@ -479,7 +479,7 @@ var j = {
|
|
|
479
479
|
d: "M12 6v6h4",
|
|
480
480
|
key: "135r8i"
|
|
481
481
|
}]]),
|
|
482
|
-
IconDownload:
|
|
482
|
+
IconDownload: G([
|
|
483
483
|
["path", {
|
|
484
484
|
d: "M12 15V3",
|
|
485
485
|
key: "m9g1x1"
|
|
@@ -493,7 +493,7 @@ var j = {
|
|
|
493
493
|
key: "brsn70"
|
|
494
494
|
}]
|
|
495
495
|
]),
|
|
496
|
-
IconExternalLink:
|
|
496
|
+
IconExternalLink: G([
|
|
497
497
|
["path", {
|
|
498
498
|
d: "M15 3h6v6",
|
|
499
499
|
key: "1q9fwt"
|
|
@@ -507,7 +507,7 @@ var j = {
|
|
|
507
507
|
key: "a6xqqp"
|
|
508
508
|
}]
|
|
509
509
|
]),
|
|
510
|
-
IconFactory:
|
|
510
|
+
IconFactory: G([
|
|
511
511
|
["path", {
|
|
512
512
|
d: "M12 16h.01",
|
|
513
513
|
key: "1drbdi"
|
|
@@ -525,14 +525,14 @@ var j = {
|
|
|
525
525
|
key: "18s6g9"
|
|
526
526
|
}]
|
|
527
527
|
]),
|
|
528
|
-
IconGauge:
|
|
528
|
+
IconGauge: G([["path", {
|
|
529
529
|
d: "m12 14 4-4",
|
|
530
530
|
key: "9kzdfg"
|
|
531
531
|
}], ["path", {
|
|
532
532
|
d: "M3.34 19a10 10 0 1 1 17.32 0",
|
|
533
533
|
key: "19p75a"
|
|
534
534
|
}]]),
|
|
535
|
-
IconGripVertical:
|
|
535
|
+
IconGripVertical: G([
|
|
536
536
|
["circle", {
|
|
537
537
|
cx: "9",
|
|
538
538
|
cy: "12",
|
|
@@ -570,7 +570,7 @@ var j = {
|
|
|
570
570
|
key: "f4zoj3"
|
|
571
571
|
}]
|
|
572
572
|
]),
|
|
573
|
-
IconLayoutDashboard:
|
|
573
|
+
IconLayoutDashboard: G([
|
|
574
574
|
["rect", {
|
|
575
575
|
width: "7",
|
|
576
576
|
height: "9",
|
|
@@ -604,7 +604,7 @@ var j = {
|
|
|
604
604
|
key: "ldoo1y"
|
|
605
605
|
}]
|
|
606
606
|
]),
|
|
607
|
-
IconLockKeyhole:
|
|
607
|
+
IconLockKeyhole: G([
|
|
608
608
|
["circle", {
|
|
609
609
|
cx: "12",
|
|
610
610
|
cy: "16",
|
|
@@ -624,7 +624,7 @@ var j = {
|
|
|
624
624
|
key: "1pqi11"
|
|
625
625
|
}]
|
|
626
626
|
]),
|
|
627
|
-
IconLogOut:
|
|
627
|
+
IconLogOut: G([
|
|
628
628
|
["path", {
|
|
629
629
|
d: "m16 17 5-5-5-5",
|
|
630
630
|
key: "1bji2h"
|
|
@@ -638,7 +638,7 @@ var j = {
|
|
|
638
638
|
key: "1uf3rs"
|
|
639
639
|
}]
|
|
640
640
|
]),
|
|
641
|
-
IconMaximize2:
|
|
641
|
+
IconMaximize2: G([
|
|
642
642
|
["path", {
|
|
643
643
|
d: "M15 3h6v6",
|
|
644
644
|
key: "1q9fwt"
|
|
@@ -656,7 +656,7 @@ var j = {
|
|
|
656
656
|
key: "wtvkvv"
|
|
657
657
|
}]
|
|
658
658
|
]),
|
|
659
|
-
IconMenu:
|
|
659
|
+
IconMenu: G([
|
|
660
660
|
["path", {
|
|
661
661
|
d: "M4 5h16",
|
|
662
662
|
key: "1tepv9"
|
|
@@ -670,7 +670,7 @@ var j = {
|
|
|
670
670
|
key: "1djgab"
|
|
671
671
|
}]
|
|
672
672
|
]),
|
|
673
|
-
IconPackageCheck:
|
|
673
|
+
IconPackageCheck: G([
|
|
674
674
|
["path", {
|
|
675
675
|
d: "M12 22V12",
|
|
676
676
|
key: "d0xqtd"
|
|
@@ -692,7 +692,7 @@ var j = {
|
|
|
692
692
|
key: "9yrvtv"
|
|
693
693
|
}]
|
|
694
694
|
]),
|
|
695
|
-
IconRefreshCw:
|
|
695
|
+
IconRefreshCw: G([
|
|
696
696
|
["path", {
|
|
697
697
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
698
698
|
key: "v9h5vc"
|
|
@@ -710,14 +710,14 @@ var j = {
|
|
|
710
710
|
key: "1cv678"
|
|
711
711
|
}]
|
|
712
712
|
]),
|
|
713
|
-
IconRotateCw:
|
|
713
|
+
IconRotateCw: G([["path", {
|
|
714
714
|
d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",
|
|
715
715
|
key: "1p45f6"
|
|
716
716
|
}], ["path", {
|
|
717
717
|
d: "M21 3v5h-5",
|
|
718
718
|
key: "1q7to0"
|
|
719
719
|
}]]),
|
|
720
|
-
IconSearch:
|
|
720
|
+
IconSearch: G([["path", {
|
|
721
721
|
d: "m21 21-4.34-4.34",
|
|
722
722
|
key: "14j7rj"
|
|
723
723
|
}], ["circle", {
|
|
@@ -726,7 +726,7 @@ var j = {
|
|
|
726
726
|
r: "8",
|
|
727
727
|
key: "4ej97u"
|
|
728
728
|
}]]),
|
|
729
|
-
IconSettings2:
|
|
729
|
+
IconSettings2: G([
|
|
730
730
|
["path", {
|
|
731
731
|
d: "M14 17H5",
|
|
732
732
|
key: "gfn3mx"
|
|
@@ -748,7 +748,7 @@ var j = {
|
|
|
748
748
|
key: "dfmy0x"
|
|
749
749
|
}]
|
|
750
750
|
]),
|
|
751
|
-
IconShieldAlert:
|
|
751
|
+
IconShieldAlert: G([
|
|
752
752
|
["path", {
|
|
753
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",
|
|
754
754
|
key: "oel41y"
|
|
@@ -762,14 +762,14 @@ var j = {
|
|
|
762
762
|
key: "1drbdi"
|
|
763
763
|
}]
|
|
764
764
|
]),
|
|
765
|
-
IconShieldCheck:
|
|
765
|
+
IconShieldCheck: G([["path", {
|
|
766
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",
|
|
767
767
|
key: "oel41y"
|
|
768
768
|
}], ["path", {
|
|
769
769
|
d: "m9 12 2 2 4-4",
|
|
770
770
|
key: "dzmm74"
|
|
771
771
|
}]]),
|
|
772
|
-
IconSmartphone:
|
|
772
|
+
IconSmartphone: G([["rect", {
|
|
773
773
|
width: "14",
|
|
774
774
|
height: "20",
|
|
775
775
|
x: "5",
|
|
@@ -781,7 +781,7 @@ var j = {
|
|
|
781
781
|
d: "M12 18h.01",
|
|
782
782
|
key: "mhygvu"
|
|
783
783
|
}]]),
|
|
784
|
-
IconSparkles:
|
|
784
|
+
IconSparkles: G([
|
|
785
785
|
["path", {
|
|
786
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",
|
|
787
787
|
key: "1s2grr"
|
|
@@ -801,22 +801,22 @@ var j = {
|
|
|
801
801
|
key: "6kqj1y"
|
|
802
802
|
}]
|
|
803
803
|
]),
|
|
804
|
-
IconTable2:
|
|
804
|
+
IconTable2: G([["path", {
|
|
805
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",
|
|
806
806
|
key: "gugj83"
|
|
807
807
|
}]]),
|
|
808
|
-
IconThermometer:
|
|
808
|
+
IconThermometer: G([["path", {
|
|
809
809
|
d: "M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",
|
|
810
810
|
key: "17jzev"
|
|
811
811
|
}]]),
|
|
812
|
-
IconTrendingUp:
|
|
812
|
+
IconTrendingUp: G([["path", {
|
|
813
813
|
d: "M16 7h6v6",
|
|
814
814
|
key: "box55l"
|
|
815
815
|
}], ["path", {
|
|
816
816
|
d: "m22 7-8.5 8.5-5-5L2 17",
|
|
817
817
|
key: "1t1m79"
|
|
818
818
|
}]]),
|
|
819
|
-
IconUserCheck:
|
|
819
|
+
IconUserCheck: G([
|
|
820
820
|
["path", {
|
|
821
821
|
d: "m16 11 2 2 4-4",
|
|
822
822
|
key: "9rsbq5"
|
|
@@ -832,7 +832,7 @@ var j = {
|
|
|
832
832
|
key: "nufk8"
|
|
833
833
|
}]
|
|
834
834
|
]),
|
|
835
|
-
IconUserRound:
|
|
835
|
+
IconUserRound: G([["circle", {
|
|
836
836
|
cx: "12",
|
|
837
837
|
cy: "8",
|
|
838
838
|
r: "5",
|
|
@@ -841,7 +841,7 @@ var j = {
|
|
|
841
841
|
d: "M20 21a8 8 0 0 0-16 0",
|
|
842
842
|
key: "rfgkzh"
|
|
843
843
|
}]]),
|
|
844
|
-
IconUsers:
|
|
844
|
+
IconUsers: G([
|
|
845
845
|
["path", {
|
|
846
846
|
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
847
847
|
key: "1yyitq"
|
|
@@ -861,7 +861,7 @@ var j = {
|
|
|
861
861
|
key: "nufk8"
|
|
862
862
|
}]
|
|
863
863
|
]),
|
|
864
|
-
IconUserX:
|
|
864
|
+
IconUserX: G([
|
|
865
865
|
["path", {
|
|
866
866
|
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
867
867
|
key: "1yyitq"
|
|
@@ -887,7 +887,7 @@ var j = {
|
|
|
887
887
|
key: "1swrse"
|
|
888
888
|
}]
|
|
889
889
|
]),
|
|
890
|
-
IconVideo:
|
|
890
|
+
IconVideo: G([["path", {
|
|
891
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",
|
|
892
892
|
key: "ftymec"
|
|
893
893
|
}], ["rect", {
|
|
@@ -898,7 +898,7 @@ var j = {
|
|
|
898
898
|
rx: "2",
|
|
899
899
|
key: "158x01"
|
|
900
900
|
}]]),
|
|
901
|
-
IconVideoOff:
|
|
901
|
+
IconVideoOff: G([
|
|
902
902
|
["path", {
|
|
903
903
|
d: "M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196",
|
|
904
904
|
key: "w8jjjt"
|
|
@@ -912,7 +912,7 @@ var j = {
|
|
|
912
912
|
key: "1ooewy"
|
|
913
913
|
}]
|
|
914
914
|
]),
|
|
915
|
-
IconVolume2:
|
|
915
|
+
IconVolume2: G([
|
|
916
916
|
["path", {
|
|
917
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",
|
|
918
918
|
key: "uqj9uw"
|
|
@@ -926,7 +926,7 @@ var j = {
|
|
|
926
926
|
key: "ijwkga"
|
|
927
927
|
}]
|
|
928
928
|
]),
|
|
929
|
-
IconX:
|
|
929
|
+
IconX: G([["path", {
|
|
930
930
|
d: "M18 6 6 18",
|
|
931
931
|
key: "1bl5f8"
|
|
932
932
|
}], ["path", {
|
|
@@ -941,47 +941,47 @@ var j = {
|
|
|
941
941
|
IconErrorCircle: B,
|
|
942
942
|
IconEye: V,
|
|
943
943
|
IconEyeOff: H,
|
|
944
|
-
IconInfo:
|
|
945
|
-
IconInfoCircle:
|
|
946
|
-
IconMinus:
|
|
947
|
-
IconList:
|
|
948
|
-
IconPanelsTopLeft:
|
|
949
|
-
IconPause:
|
|
950
|
-
IconPlus:
|
|
951
|
-
IconPictureInPicture:
|
|
952
|
-
IconPlay:
|
|
953
|
-
IconReplay:
|
|
954
|
-
IconSettings:
|
|
955
|
-
IconFullscreen:
|
|
956
|
-
IconFullscreenExit:
|
|
957
|
-
IconCaptions:
|
|
958
|
-
IconVolume:
|
|
959
|
-
IconVolumeMuted:
|
|
960
|
-
IconSort:
|
|
961
|
-
IconSortAscending:
|
|
962
|
-
IconSortDescending:
|
|
963
|
-
IconSuccessCircle:
|
|
964
|
-
IconUpload:
|
|
965
|
-
IconWarning:
|
|
966
|
-
},
|
|
967
|
-
let r =
|
|
944
|
+
IconInfo: ne,
|
|
945
|
+
IconInfoCircle: re,
|
|
946
|
+
IconMinus: ie,
|
|
947
|
+
IconList: ae,
|
|
948
|
+
IconPanelsTopLeft: oe,
|
|
949
|
+
IconPause: se,
|
|
950
|
+
IconPlus: ce,
|
|
951
|
+
IconPictureInPicture: le,
|
|
952
|
+
IconPlay: ue,
|
|
953
|
+
IconReplay: U,
|
|
954
|
+
IconSettings: de,
|
|
955
|
+
IconFullscreen: fe,
|
|
956
|
+
IconFullscreenExit: pe,
|
|
957
|
+
IconCaptions: W,
|
|
958
|
+
IconVolume: me,
|
|
959
|
+
IconVolumeMuted: he,
|
|
960
|
+
IconSort: ge,
|
|
961
|
+
IconSortAscending: _e,
|
|
962
|
+
IconSortDescending: ve,
|
|
963
|
+
IconSuccessCircle: ye,
|
|
964
|
+
IconUpload: be,
|
|
965
|
+
IconWarning: xe
|
|
966
|
+
}, K = ({ name: e, ...n }) => {
|
|
967
|
+
let r = Se[e];
|
|
968
968
|
return /* @__PURE__ */ t(r, { ...n });
|
|
969
|
-
},
|
|
969
|
+
}, Ce = {
|
|
970
970
|
wrapper: "_wrapper_1seon_1",
|
|
971
971
|
label: "_label_1seon_13",
|
|
972
972
|
input: "_input_1seon_35",
|
|
973
973
|
control: "_control_1seon_49",
|
|
974
974
|
disabled: "_disabled_1seon_95",
|
|
975
975
|
controlError: "_controlError_1seon_121"
|
|
976
|
-
},
|
|
976
|
+
}, we = ({ 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, ..._ }) => {
|
|
977
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;
|
|
978
978
|
return d(() => {
|
|
979
979
|
b.current && (b.current.indeterminate = m && !e);
|
|
980
980
|
}, [e, m]), /* @__PURE__ */ n("div", {
|
|
981
|
-
className: `${
|
|
981
|
+
className: `${Ce.wrapper} ${l}`,
|
|
982
982
|
children: [
|
|
983
983
|
/* @__PURE__ */ n("label", {
|
|
984
|
-
className: `${
|
|
984
|
+
className: `${Ce.label} ${s ? Ce.disabled : ""}`,
|
|
985
985
|
htmlFor: y,
|
|
986
986
|
children: [
|
|
987
987
|
/* @__PURE__ */ t("input", {
|
|
@@ -995,20 +995,20 @@ var j = {
|
|
|
995
995
|
"aria-invalid": !!o,
|
|
996
996
|
"aria-describedby": [x, S].filter(Boolean).join(" ") || void 0,
|
|
997
997
|
"aria-label": g,
|
|
998
|
-
className:
|
|
998
|
+
className: Ce.input,
|
|
999
999
|
onChange: (e) => {
|
|
1000
1000
|
c || r?.(e.target.checked, e);
|
|
1001
1001
|
},
|
|
1002
1002
|
..._
|
|
1003
1003
|
}),
|
|
1004
1004
|
/* @__PURE__ */ n("span", {
|
|
1005
|
-
className: `${
|
|
1005
|
+
className: `${Ce.control} ${o ? Ce.controlError : ""}`,
|
|
1006
1006
|
"aria-hidden": "true",
|
|
1007
|
-
children: [m && !e && /* @__PURE__ */ t(
|
|
1007
|
+
children: [m && !e && /* @__PURE__ */ t(K, {
|
|
1008
1008
|
name: "IconMinus",
|
|
1009
1009
|
width: 16,
|
|
1010
1010
|
height: 16
|
|
1011
|
-
}), e && /* @__PURE__ */ t(
|
|
1011
|
+
}), e && /* @__PURE__ */ t(K, {
|
|
1012
1012
|
name: "IconCheck",
|
|
1013
1013
|
width: 16,
|
|
1014
1014
|
height: 16
|
|
@@ -1028,7 +1028,7 @@ var j = {
|
|
|
1028
1028
|
})
|
|
1029
1029
|
]
|
|
1030
1030
|
});
|
|
1031
|
-
},
|
|
1031
|
+
}, q = {
|
|
1032
1032
|
wrapper: "_wrapper_su17c_1",
|
|
1033
1033
|
trigger: "_trigger_su17c_17",
|
|
1034
1034
|
sm: "_sm_su17c_53",
|
|
@@ -1059,7 +1059,7 @@ var j = {
|
|
|
1059
1059
|
timeLabel: "_timeLabel_su17c_533",
|
|
1060
1060
|
previousMonth: "_previousMonth_su17c_593",
|
|
1061
1061
|
nextMonth: "_nextMonth_su17c_601"
|
|
1062
|
-
},
|
|
1062
|
+
}, Te = [
|
|
1063
1063
|
"Пн",
|
|
1064
1064
|
"Вт",
|
|
1065
1065
|
"Ср",
|
|
@@ -1067,7 +1067,7 @@ var j = {
|
|
|
1067
1067
|
"Пт",
|
|
1068
1068
|
"Сб",
|
|
1069
1069
|
"Вс"
|
|
1070
|
-
],
|
|
1070
|
+
], Ee = [
|
|
1071
1071
|
"Январь",
|
|
1072
1072
|
"Февраль",
|
|
1073
1073
|
"Март",
|
|
@@ -1080,33 +1080,33 @@ var j = {
|
|
|
1080
1080
|
"Октябрь",
|
|
1081
1081
|
"Ноябрь",
|
|
1082
1082
|
"Декабрь"
|
|
1083
|
-
],
|
|
1084
|
-
let t = e.replace(/\D/g, "").slice(0,
|
|
1083
|
+
], J = (e) => String(e).padStart(2, "0"), Y = 8, De = "Некорректная дата", Oe = (e) => e ? `${J(e.getDate())}.${J(e.getMonth() + 1)}.${e.getFullYear()}` : "", ke = (e) => {
|
|
1084
|
+
let t = e.replace(/\D/g, "").slice(0, Y);
|
|
1085
1085
|
return [
|
|
1086
1086
|
t.slice(0, 2),
|
|
1087
1087
|
t.slice(2, 4),
|
|
1088
1088
|
t.slice(4, 8)
|
|
1089
1089
|
].filter(Boolean).join(".");
|
|
1090
|
-
},
|
|
1090
|
+
}, Ae = (e) => {
|
|
1091
1091
|
if (!e) return !0;
|
|
1092
1092
|
let t = Number(e.padEnd(4, "0"));
|
|
1093
1093
|
return Number(e.padEnd(4, "9")) >= 1800 && t <= 2500;
|
|
1094
|
-
},
|
|
1094
|
+
}, je = (e) => {
|
|
1095
1095
|
if (!/^\d{0,8}$/.test(e)) return !1;
|
|
1096
1096
|
let t = e.slice(0, 2), n = e.slice(2, 4), r = e.slice(4, 8);
|
|
1097
|
-
return t.length === 1 && Number(t) > 3 || t.length === 2 && (Number(t) < 1 || Number(t) > 31) || n.length === 1 && Number(n) > 1 || n.length === 2 && (Number(n) < 1 || Number(n) > 12) ? !1 :
|
|
1098
|
-
},
|
|
1097
|
+
return t.length === 1 && Number(t) > 3 || t.length === 2 && (Number(t) < 1 || Number(t) > 31) || n.length === 1 && Number(n) > 1 || n.length === 2 && (Number(n) < 1 || Number(n) > 12) ? !1 : Ae(r);
|
|
1098
|
+
}, Me = (e) => {
|
|
1099
1099
|
let t = /^(\d{2})\.(\d{2})\.(\d{4})$/.exec(e);
|
|
1100
1100
|
if (!t) return null;
|
|
1101
1101
|
let n = Number(t[1]), r = Number(t[2]) - 1, i = Number(t[3]);
|
|
1102
1102
|
if (i < 1800 || i > 2500) return null;
|
|
1103
1103
|
let a = new Date(i, r, n, 12);
|
|
1104
1104
|
return a.getFullYear() !== i || a.getMonth() !== r || a.getDate() !== n ? null : a;
|
|
1105
|
-
},
|
|
1105
|
+
}, Ne = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Pe = (e, t) => {
|
|
1106
1106
|
if (!e) return "";
|
|
1107
|
-
let n = `${e.getFullYear()}-${
|
|
1107
|
+
let n = `${e.getFullYear()}-${J(e.getMonth() + 1)}-${J(e.getDate())}`, r = `${J(e.getHours())}:${J(e.getMinutes())}`;
|
|
1108
1108
|
return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
|
|
1109
|
-
},
|
|
1109
|
+
}, Fe = (e, t) => {
|
|
1110
1110
|
if (!e) return null;
|
|
1111
1111
|
if (t === "time") {
|
|
1112
1112
|
let t = /^(\d{2}):(\d{2})$/.exec(e);
|
|
@@ -1124,47 +1124,47 @@ var j = {
|
|
|
1124
1124
|
}
|
|
1125
1125
|
let n = new Date(e);
|
|
1126
1126
|
return Number.isNaN(n.getTime()) ? null : n;
|
|
1127
|
-
},
|
|
1127
|
+
}, Ie = (e, t) => {
|
|
1128
1128
|
if (!e) return "";
|
|
1129
|
-
let n = `${
|
|
1129
|
+
let n = `${J(e.getDate())}.${J(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${J(e.getHours())}:${J(e.getMinutes())}`;
|
|
1130
1130
|
return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
|
|
1131
|
-
},
|
|
1131
|
+
}, Le = (e) => {
|
|
1132
1132
|
let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
|
|
1133
1133
|
return r.setDate(t.getDate() - n), Array.from({ length: 42 }, (e, t) => {
|
|
1134
1134
|
let n = new Date(r);
|
|
1135
1135
|
return n.setDate(r.getDate() + t), n;
|
|
1136
1136
|
});
|
|
1137
|
-
},
|
|
1138
|
-
let r =
|
|
1139
|
-
return !!(t && r <
|
|
1140
|
-
},
|
|
1141
|
-
let E = f(), D = ee ?? `ds-date-time-${w ?? E}`, O = c ? `${D}-hint` : void 0, k = u ? `${D}-error` : void 0, A = h(null), j = h(null), N = h(null), P = h(null), [F, I] = g(!1), [L, R] = g(r ?? /* @__PURE__ */ new Date()), [z, B] = g(
|
|
1137
|
+
}, Re = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), ze = (e, t, n) => {
|
|
1138
|
+
let r = Ne(e).getTime();
|
|
1139
|
+
return !!(t && r < Ne(t).getTime() || n && r > Ne(n).getTime());
|
|
1140
|
+
}, Be = 8, Ve = 6, He = ({ 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: ee, name: w, className: T = "" }) => {
|
|
1141
|
+
let E = f(), D = ee ?? `ds-date-time-${w ?? E}`, O = c ? `${D}-hint` : void 0, k = u ? `${D}-error` : void 0, A = h(null), j = h(null), N = h(null), P = h(null), [F, I] = g(!1), [L, R] = g(r ?? /* @__PURE__ */ new Date()), [z, B] = g(Pe(r, "time")), [V, H] = g(Oe(r)), [ne, re] = g(""), [ie, ae] = g(0), [oe, se] = g(null), ce = m(() => Le(L), [L]), le = a !== "time", ue = a !== "date";
|
|
1142
1142
|
d(() => {
|
|
1143
|
-
r && R(r), B(
|
|
1143
|
+
r && R(r), B(Pe(r, "time")), H(Oe(r));
|
|
1144
1144
|
}, [r]), d(() => () => {
|
|
1145
1145
|
P.current && clearTimeout(P.current);
|
|
1146
1146
|
}, []);
|
|
1147
|
-
let
|
|
1147
|
+
let U = l(() => {
|
|
1148
1148
|
let e = j.current, t = N.current;
|
|
1149
1149
|
if (!e || !t) return;
|
|
1150
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom -
|
|
1151
|
-
|
|
1150
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - Be, o = n.top - Be, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(Be, n.top - r.height - Ve) : n.bottom + Ve, u = n.left, d = i - r.width - Be;
|
|
1151
|
+
se({
|
|
1152
1152
|
top: l,
|
|
1153
|
-
left: Math.max(
|
|
1153
|
+
left: Math.max(Be, Math.min(u, d)),
|
|
1154
1154
|
maxHeight: c
|
|
1155
1155
|
});
|
|
1156
1156
|
}, []);
|
|
1157
1157
|
p(() => {
|
|
1158
1158
|
if (!F) {
|
|
1159
|
-
|
|
1159
|
+
se(null);
|
|
1160
1160
|
return;
|
|
1161
1161
|
}
|
|
1162
|
-
return
|
|
1163
|
-
window.removeEventListener("resize",
|
|
1162
|
+
return U(), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
|
|
1163
|
+
window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
|
|
1164
1164
|
};
|
|
1165
1165
|
}, [
|
|
1166
1166
|
F,
|
|
1167
|
-
|
|
1167
|
+
U,
|
|
1168
1168
|
L,
|
|
1169
1169
|
z
|
|
1170
1170
|
]), d(() => {
|
|
@@ -1179,87 +1179,87 @@ var j = {
|
|
|
1179
1179
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1180
1180
|
};
|
|
1181
1181
|
}, [F]);
|
|
1182
|
-
let
|
|
1183
|
-
if (
|
|
1184
|
-
let t = a === "date" ? Pe(
|
|
1185
|
-
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), H(
|
|
1186
|
-
},
|
|
1187
|
-
|
|
1188
|
-
|
|
1182
|
+
let de = (e) => {
|
|
1183
|
+
if (ze(e, x, S)) return;
|
|
1184
|
+
let t = a === "date" ? Fe(Pe(e, "date"), "date") : new Date(e);
|
|
1185
|
+
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), H(Oe(t)), a === "date" && I(!1));
|
|
1186
|
+
}, fe = () => {
|
|
1187
|
+
re(De), ae((e) => e + 1), P.current && clearTimeout(P.current), P.current = setTimeout(() => {
|
|
1188
|
+
re(""), P.current = null;
|
|
1189
1189
|
}, 3e3);
|
|
1190
|
-
},
|
|
1191
|
-
let t = e.replace(/\D/g, "").slice(0,
|
|
1192
|
-
if (!
|
|
1193
|
-
|
|
1190
|
+
}, pe = (e) => {
|
|
1191
|
+
let t = e.replace(/\D/g, "").slice(0, Y);
|
|
1192
|
+
if (!je(t)) {
|
|
1193
|
+
fe();
|
|
1194
1194
|
return;
|
|
1195
1195
|
}
|
|
1196
|
-
let n =
|
|
1196
|
+
let n = ke(t);
|
|
1197
1197
|
if (H(n), !t) {
|
|
1198
1198
|
i?.(null);
|
|
1199
1199
|
return;
|
|
1200
1200
|
}
|
|
1201
|
-
if (t.length <
|
|
1202
|
-
let o =
|
|
1203
|
-
if (!o ||
|
|
1204
|
-
|
|
1201
|
+
if (t.length < Y) return;
|
|
1202
|
+
let o = Me(n);
|
|
1203
|
+
if (!o || ze(o, x, S)) {
|
|
1204
|
+
fe();
|
|
1205
1205
|
return;
|
|
1206
1206
|
}
|
|
1207
1207
|
a === "datetime" && o.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(o), R(o), I(!1), requestAnimationFrame(() => j.current?.blur());
|
|
1208
|
-
},
|
|
1208
|
+
}, W = (e) => {
|
|
1209
1209
|
if (B(e), !e) {
|
|
1210
1210
|
i?.(null);
|
|
1211
1211
|
return;
|
|
1212
1212
|
}
|
|
1213
|
-
let t =
|
|
1213
|
+
let t = Fe(e, "time");
|
|
1214
1214
|
if (!t) return;
|
|
1215
1215
|
let n = new Date(a === "datetime" ? r ?? L : /* @__PURE__ */ new Date());
|
|
1216
1216
|
n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
|
|
1217
|
-
},
|
|
1217
|
+
}, me = s ?? (a === "date" ? "ДД.ММ.ГГГГ" : a === "time" ? "ЧЧ:ММ" : "ДД.ММ.ГГГГ ЧЧ:ММ"), he = ne ? `${D}-validation` : void 0, ge = [
|
|
1218
1218
|
O,
|
|
1219
1219
|
k,
|
|
1220
|
-
|
|
1221
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1220
|
+
he
|
|
1221
|
+
].filter(Boolean).join(" ") || void 0, _e = F && !y ? /* @__PURE__ */ n("div", {
|
|
1222
1222
|
ref: N,
|
|
1223
|
-
className:
|
|
1223
|
+
className: q.panel,
|
|
1224
1224
|
role: "dialog",
|
|
1225
|
-
"aria-label": o ??
|
|
1226
|
-
style:
|
|
1227
|
-
top:
|
|
1228
|
-
left:
|
|
1229
|
-
maxHeight:
|
|
1225
|
+
"aria-label": o ?? me,
|
|
1226
|
+
style: oe ? {
|
|
1227
|
+
top: oe.top,
|
|
1228
|
+
left: oe.left,
|
|
1229
|
+
maxHeight: oe.maxHeight
|
|
1230
1230
|
} : {
|
|
1231
1231
|
visibility: "hidden",
|
|
1232
1232
|
top: 0,
|
|
1233
1233
|
left: 0
|
|
1234
1234
|
},
|
|
1235
|
-
children: [
|
|
1235
|
+
children: [le && /* @__PURE__ */ n(e, { children: [
|
|
1236
1236
|
/* @__PURE__ */ n("div", {
|
|
1237
|
-
className:
|
|
1237
|
+
className: q.calendarHeader,
|
|
1238
1238
|
children: [
|
|
1239
1239
|
/* @__PURE__ */ t("button", {
|
|
1240
1240
|
type: "button",
|
|
1241
|
-
className:
|
|
1241
|
+
className: q.nav,
|
|
1242
1242
|
"aria-label": "Предыдущий месяц",
|
|
1243
1243
|
onClick: () => R(new Date(L.getFullYear(), L.getMonth() - 1, 1)),
|
|
1244
|
-
children: /* @__PURE__ */ t(
|
|
1244
|
+
children: /* @__PURE__ */ t(K, {
|
|
1245
1245
|
name: "IconChevron",
|
|
1246
1246
|
width: 20,
|
|
1247
1247
|
height: 20,
|
|
1248
|
-
className:
|
|
1248
|
+
className: q.previousMonth
|
|
1249
1249
|
})
|
|
1250
1250
|
}),
|
|
1251
1251
|
/* @__PURE__ */ t("select", {
|
|
1252
|
-
className:
|
|
1252
|
+
className: q.monthSelect,
|
|
1253
1253
|
"aria-label": "Месяц",
|
|
1254
1254
|
value: L.getMonth(),
|
|
1255
1255
|
onChange: (e) => R(new Date(L.getFullYear(), Number(e.target.value), 1)),
|
|
1256
|
-
children:
|
|
1256
|
+
children: Ee.map((e, n) => /* @__PURE__ */ t("option", {
|
|
1257
1257
|
value: n,
|
|
1258
1258
|
children: e
|
|
1259
1259
|
}, e))
|
|
1260
1260
|
}),
|
|
1261
1261
|
/* @__PURE__ */ t("input", {
|
|
1262
|
-
className:
|
|
1262
|
+
className: q.yearInput,
|
|
1263
1263
|
type: "number",
|
|
1264
1264
|
"aria-label": "Год",
|
|
1265
1265
|
value: L.getFullYear(),
|
|
@@ -1267,49 +1267,49 @@ var j = {
|
|
|
1267
1267
|
}),
|
|
1268
1268
|
/* @__PURE__ */ t("button", {
|
|
1269
1269
|
type: "button",
|
|
1270
|
-
className:
|
|
1270
|
+
className: q.nav,
|
|
1271
1271
|
"aria-label": "Следующий месяц",
|
|
1272
1272
|
onClick: () => R(new Date(L.getFullYear(), L.getMonth() + 1, 1)),
|
|
1273
|
-
children: /* @__PURE__ */ t(
|
|
1273
|
+
children: /* @__PURE__ */ t(K, {
|
|
1274
1274
|
name: "IconChevron",
|
|
1275
1275
|
width: 20,
|
|
1276
1276
|
height: 20,
|
|
1277
|
-
className:
|
|
1277
|
+
className: q.nextMonth
|
|
1278
1278
|
})
|
|
1279
1279
|
})
|
|
1280
1280
|
]
|
|
1281
1281
|
}),
|
|
1282
1282
|
/* @__PURE__ */ t("div", {
|
|
1283
|
-
className:
|
|
1284
|
-
children:
|
|
1283
|
+
className: q.weekdays,
|
|
1284
|
+
children: Te.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
|
|
1285
1285
|
}),
|
|
1286
1286
|
/* @__PURE__ */ t("div", {
|
|
1287
|
-
className:
|
|
1288
|
-
children:
|
|
1289
|
-
let n =
|
|
1287
|
+
className: q.days,
|
|
1288
|
+
children: ce.map((e) => {
|
|
1289
|
+
let n = Re(r, e);
|
|
1290
1290
|
return /* @__PURE__ */ t("button", {
|
|
1291
1291
|
type: "button",
|
|
1292
|
-
className: `${
|
|
1293
|
-
disabled:
|
|
1292
|
+
className: `${q.day} ${e.getMonth() === L.getMonth() ? "" : q.outside} ${n ? q.selected : ""}`,
|
|
1293
|
+
disabled: ze(e, x, S),
|
|
1294
1294
|
"aria-pressed": n,
|
|
1295
|
-
onClick: () =>
|
|
1295
|
+
onClick: () => de(e),
|
|
1296
1296
|
children: e.getDate()
|
|
1297
1297
|
}, e.toISOString());
|
|
1298
1298
|
})
|
|
1299
1299
|
})
|
|
1300
|
-
] }),
|
|
1301
|
-
className:
|
|
1300
|
+
] }), ue && /* @__PURE__ */ n("label", {
|
|
1301
|
+
className: q.timeLabel,
|
|
1302
1302
|
children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
|
|
1303
|
-
className:
|
|
1303
|
+
className: q.timeInput,
|
|
1304
1304
|
type: "time",
|
|
1305
1305
|
value: z,
|
|
1306
|
-
onChange: (e) =>
|
|
1306
|
+
onChange: (e) => W(e.target.value)
|
|
1307
1307
|
})]
|
|
1308
1308
|
})]
|
|
1309
1309
|
}) : null;
|
|
1310
1310
|
return /* @__PURE__ */ n("div", {
|
|
1311
1311
|
ref: A,
|
|
1312
|
-
className: `${
|
|
1312
|
+
className: `${q.wrapper} ${T}`,
|
|
1313
1313
|
children: [
|
|
1314
1314
|
o && /* @__PURE__ */ t(te, {
|
|
1315
1315
|
htmlFor: D,
|
|
@@ -1317,16 +1317,16 @@ var j = {
|
|
|
1317
1317
|
disabled: v,
|
|
1318
1318
|
children: o
|
|
1319
1319
|
}),
|
|
1320
|
-
|
|
1321
|
-
className: `${
|
|
1320
|
+
le ? /* @__PURE__ */ n("div", {
|
|
1321
|
+
className: `${q.trigger} ${q[C]} ${u ? q.error : ""} ${v ? q.disabled : ""}`,
|
|
1322
1322
|
children: [
|
|
1323
1323
|
/* @__PURE__ */ t("input", {
|
|
1324
1324
|
ref: j,
|
|
1325
1325
|
id: D,
|
|
1326
1326
|
name: w,
|
|
1327
|
-
className:
|
|
1327
|
+
className: q.dateInput,
|
|
1328
1328
|
value: V,
|
|
1329
|
-
placeholder:
|
|
1329
|
+
placeholder: me.split(" ")[0],
|
|
1330
1330
|
inputMode: "numeric",
|
|
1331
1331
|
autoComplete: "off",
|
|
1332
1332
|
maxLength: 10,
|
|
@@ -1334,23 +1334,23 @@ var j = {
|
|
|
1334
1334
|
readOnly: y,
|
|
1335
1335
|
"aria-expanded": F,
|
|
1336
1336
|
"aria-haspopup": "dialog",
|
|
1337
|
-
"aria-describedby":
|
|
1338
|
-
"aria-invalid": !!(u ||
|
|
1337
|
+
"aria-describedby": ge,
|
|
1338
|
+
"aria-invalid": !!(u || ne) || void 0,
|
|
1339
1339
|
onFocus: () => {
|
|
1340
1340
|
y || I(!0);
|
|
1341
1341
|
},
|
|
1342
1342
|
onClick: () => {
|
|
1343
1343
|
y || I(!0);
|
|
1344
1344
|
},
|
|
1345
|
-
onChange: (e) =>
|
|
1345
|
+
onChange: (e) => pe(e.target.value)
|
|
1346
1346
|
}),
|
|
1347
1347
|
a === "datetime" && z && /* @__PURE__ */ t("span", {
|
|
1348
|
-
className:
|
|
1348
|
+
className: q.timeValue,
|
|
1349
1349
|
children: z
|
|
1350
1350
|
}),
|
|
1351
1351
|
/* @__PURE__ */ t("button", {
|
|
1352
1352
|
type: "button",
|
|
1353
|
-
className:
|
|
1353
|
+
className: q.chevronButton,
|
|
1354
1354
|
disabled: v || y,
|
|
1355
1355
|
"aria-label": F ? "Закрыть календарь" : "Открыть календарь",
|
|
1356
1356
|
tabIndex: -1,
|
|
@@ -1359,9 +1359,9 @@ var j = {
|
|
|
1359
1359
|
I((e) => !e), j.current?.focus();
|
|
1360
1360
|
},
|
|
1361
1361
|
children: /* @__PURE__ */ t("span", {
|
|
1362
|
-
className: `${
|
|
1362
|
+
className: `${q.chevron} ${_e ? q.chevronOpen : ""}`,
|
|
1363
1363
|
"aria-hidden": "true",
|
|
1364
|
-
children: /* @__PURE__ */ t(
|
|
1364
|
+
children: /* @__PURE__ */ t(K, {
|
|
1365
1365
|
name: "IconChevron",
|
|
1366
1366
|
width: 20,
|
|
1367
1367
|
height: 20
|
|
@@ -1374,36 +1374,36 @@ var j = {
|
|
|
1374
1374
|
id: D,
|
|
1375
1375
|
name: w,
|
|
1376
1376
|
type: "button",
|
|
1377
|
-
className: `${
|
|
1377
|
+
className: `${q.trigger} ${q[C]} ${u ? q.error : ""}`,
|
|
1378
1378
|
disabled: v,
|
|
1379
1379
|
"aria-readonly": y || void 0,
|
|
1380
1380
|
"aria-expanded": F,
|
|
1381
1381
|
"aria-haspopup": "dialog",
|
|
1382
|
-
"aria-describedby":
|
|
1382
|
+
"aria-describedby": ge,
|
|
1383
1383
|
onClick: () => {
|
|
1384
1384
|
y || I((e) => !e);
|
|
1385
1385
|
},
|
|
1386
1386
|
children: [/* @__PURE__ */ t("span", {
|
|
1387
|
-
className: r ?
|
|
1388
|
-
children:
|
|
1387
|
+
className: r ? q.value : q.placeholder,
|
|
1388
|
+
children: Ie(r, a) || me
|
|
1389
1389
|
}), /* @__PURE__ */ t("span", {
|
|
1390
|
-
className: `${
|
|
1390
|
+
className: `${q.chevron} ${_e ? q.chevronOpen : ""}`,
|
|
1391
1391
|
"aria-hidden": "true",
|
|
1392
|
-
children: /* @__PURE__ */ t(
|
|
1392
|
+
children: /* @__PURE__ */ t(K, {
|
|
1393
1393
|
name: "IconChevron",
|
|
1394
1394
|
width: 20,
|
|
1395
1395
|
height: 20
|
|
1396
1396
|
})
|
|
1397
1397
|
})]
|
|
1398
1398
|
}),
|
|
1399
|
-
|
|
1400
|
-
id:
|
|
1401
|
-
className:
|
|
1399
|
+
ne && /* @__PURE__ */ t("span", {
|
|
1400
|
+
id: he,
|
|
1401
|
+
className: q.validationTooltip,
|
|
1402
1402
|
role: "status",
|
|
1403
1403
|
"aria-live": "polite",
|
|
1404
|
-
children:
|
|
1405
|
-
},
|
|
1406
|
-
|
|
1404
|
+
children: ne
|
|
1405
|
+
}, ie),
|
|
1406
|
+
_e && _(_e, document.body),
|
|
1407
1407
|
c && !u && /* @__PURE__ */ t(M, {
|
|
1408
1408
|
id: O,
|
|
1409
1409
|
children: c
|
|
@@ -1415,19 +1415,19 @@ var j = {
|
|
|
1415
1415
|
})
|
|
1416
1416
|
]
|
|
1417
1417
|
});
|
|
1418
|
-
},
|
|
1418
|
+
}, Ue = {
|
|
1419
1419
|
root: "_root_19vq2_1",
|
|
1420
1420
|
range: "_range_19vq2_21"
|
|
1421
|
-
},
|
|
1421
|
+
}, We = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), Ge = ({ value: e, onChange: r, onDraftChange: i, mode: a = "date", fromLabel: o = "От", toLabel: s = "До", hint: c, error: l, min: u, max: d, disabled: f = !1, readOnly: p = !1, required: m = !1, className: h = "" }) => {
|
|
1422
1422
|
let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
|
|
1423
|
-
i?.(e),
|
|
1423
|
+
i?.(e), We(e) && r?.(e);
|
|
1424
1424
|
};
|
|
1425
1425
|
return /* @__PURE__ */ n("fieldset", {
|
|
1426
|
-
className: `${
|
|
1426
|
+
className: `${Ue.root} ${h}`,
|
|
1427
1427
|
disabled: f,
|
|
1428
1428
|
children: [/* @__PURE__ */ n("div", {
|
|
1429
|
-
className:
|
|
1430
|
-
children: [/* @__PURE__ */ t(
|
|
1429
|
+
className: Ue.range,
|
|
1430
|
+
children: [/* @__PURE__ */ t(He, {
|
|
1431
1431
|
value: e.from,
|
|
1432
1432
|
mode: a === "datetime" ? "datetime" : a,
|
|
1433
1433
|
label: o,
|
|
@@ -1441,7 +1441,7 @@ var j = {
|
|
|
1441
1441
|
...e,
|
|
1442
1442
|
from: t
|
|
1443
1443
|
})
|
|
1444
|
-
}), /* @__PURE__ */ t(
|
|
1444
|
+
}), /* @__PURE__ */ t(He, {
|
|
1445
1445
|
value: e.to,
|
|
1446
1446
|
mode: a === "datetime" ? "datetime" : a,
|
|
1447
1447
|
label: s,
|
|
@@ -1458,7 +1458,7 @@ var j = {
|
|
|
1458
1458
|
})]
|
|
1459
1459
|
}), c && !g && /* @__PURE__ */ t(M, { children: c })]
|
|
1460
1460
|
});
|
|
1461
|
-
},
|
|
1461
|
+
}, Ke = {
|
|
1462
1462
|
group: "_group_ey6uk_1",
|
|
1463
1463
|
skeleton: "_skeleton_ey6uk_15",
|
|
1464
1464
|
text: "_text_ey6uk_27",
|
|
@@ -1466,53 +1466,54 @@ var j = {
|
|
|
1466
1466
|
circular: "_circular_ey6uk_47",
|
|
1467
1467
|
animated: "_animated_ey6uk_59",
|
|
1468
1468
|
"ds-skeleton": "_ds-skeleton_ey6uk_1"
|
|
1469
|
-
},
|
|
1470
|
-
className: `${
|
|
1469
|
+
}, qe = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
|
|
1470
|
+
className: `${Ke.group} ${o}`,
|
|
1471
1471
|
"aria-hidden": "true",
|
|
1472
1472
|
children: Array.from({ length: Math.max(1, i) }, (i, o) => /* @__PURE__ */ t("span", {
|
|
1473
|
-
className: `${
|
|
1473
|
+
className: `${Ke.skeleton} ${Ke[e]} ${a ? Ke.animated : ""}`,
|
|
1474
1474
|
style: {
|
|
1475
1475
|
width: n,
|
|
1476
1476
|
height: r
|
|
1477
1477
|
}
|
|
1478
1478
|
}, o))
|
|
1479
|
-
}),
|
|
1480
|
-
wrapper: "
|
|
1481
|
-
container: "
|
|
1482
|
-
trigger: "
|
|
1483
|
-
disabledText: "
|
|
1484
|
-
sm: "
|
|
1485
|
-
md: "
|
|
1486
|
-
lg: "
|
|
1487
|
-
value: "
|
|
1488
|
-
placeholder: "
|
|
1489
|
-
chevron: "
|
|
1490
|
-
chevronOpen: "
|
|
1491
|
-
menu: "
|
|
1492
|
-
option: "
|
|
1493
|
-
selected: "
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1479
|
+
}), X = {
|
|
1480
|
+
wrapper: "_wrapper_12twc_1",
|
|
1481
|
+
container: "_container_12twc_17",
|
|
1482
|
+
trigger: "_trigger_12twc_25",
|
|
1483
|
+
disabledText: "_disabledText_12twc_27",
|
|
1484
|
+
sm: "_sm_12twc_53",
|
|
1485
|
+
md: "_md_12twc_67",
|
|
1486
|
+
lg: "_lg_12twc_81",
|
|
1487
|
+
value: "_value_12twc_147",
|
|
1488
|
+
placeholder: "_placeholder_12twc_149",
|
|
1489
|
+
chevron: "_chevron_12twc_205",
|
|
1490
|
+
chevronOpen: "_chevronOpen_12twc_231",
|
|
1491
|
+
menu: "_menu_12twc_239",
|
|
1492
|
+
option: "_option_12twc_269",
|
|
1493
|
+
selected: "_selected_12twc_339",
|
|
1494
|
+
actionOption: "_actionOption_12twc_359",
|
|
1495
|
+
message: "_message_12twc_391",
|
|
1496
|
+
error: "_error_12twc_393",
|
|
1497
|
+
errorState: "_errorState_12twc_419"
|
|
1498
|
+
}, Je = 8, Ye = 6, Xe = 120, Ze = (e, t, n) => {
|
|
1498
1499
|
if (!e.length) return -1;
|
|
1499
1500
|
for (let r = 0; r < e.length; r += 1) {
|
|
1500
1501
|
let i = (t + r * n + e.length) % e.length;
|
|
1501
1502
|
if (!e[i]?.disabled) return i;
|
|
1502
1503
|
}
|
|
1503
1504
|
return -1;
|
|
1504
|
-
},
|
|
1505
|
+
}, Qe = (e) => {
|
|
1505
1506
|
if (typeof e == "number") return e;
|
|
1506
1507
|
if (typeof e == "string") {
|
|
1507
1508
|
let t = Number.parseFloat(e);
|
|
1508
1509
|
if (Number.isFinite(t)) return t;
|
|
1509
1510
|
}
|
|
1510
1511
|
return Infinity;
|
|
1511
|
-
},
|
|
1512
|
+
}, $e = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: ee = !0, maxMenuHeight: w }) => {
|
|
1512
1513
|
let T = f(), E = C ?? `ds-dropdown-${S ?? T}`, D = `${E}-listbox`, [O, k] = g(!1), [A, j] = g(null), M = h(null), N = h(null), P = h(null), F = h([]), I = m(() => e.find((e) => e.value === r), [e, r]), L = y ? `${E}-hint` : void 0, R = u ? `${E}-error` : void 0, z = [L, R].filter(Boolean).join(" ") || void 0, B = o && s, V = l(() => {
|
|
1513
1514
|
let e = N.current, t = P.current;
|
|
1514
1515
|
if (!e || !t) return;
|
|
1515
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom -
|
|
1516
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - Je, o = n.top - Je, s = a < r.height && o > a, c = Math.max(Xe, s ? o : a), l = Qe(w), u = Math.min(c, l), d = n.left, f = i - n.width - Je, p = Math.max(Je, Math.min(d, f)), m = s ? Math.max(Je, n.top - r.height - Ye) : n.bottom + Ye;
|
|
1516
1517
|
j({
|
|
1517
1518
|
top: m,
|
|
1518
1519
|
left: p,
|
|
@@ -1545,16 +1546,16 @@ var j = {
|
|
|
1545
1546
|
};
|
|
1546
1547
|
}, [O]);
|
|
1547
1548
|
let H = (t, n) => {
|
|
1548
|
-
let r =
|
|
1549
|
+
let r = Ze(e, t, n);
|
|
1549
1550
|
if (r === -1) return;
|
|
1550
1551
|
let i = F.current[r];
|
|
1551
1552
|
i?.focus(), i?.scrollIntoView({ block: "nearest" });
|
|
1552
|
-
},
|
|
1553
|
+
}, ne = (e) => {
|
|
1553
1554
|
e.disabled || (i?.(e.value, e), k(!1), N.current?.focus());
|
|
1554
|
-
},
|
|
1555
|
+
}, re = O ? /* @__PURE__ */ t("ul", {
|
|
1555
1556
|
ref: P,
|
|
1556
1557
|
id: D,
|
|
1557
|
-
className:
|
|
1558
|
+
className: X.menu,
|
|
1558
1559
|
role: "listbox",
|
|
1559
1560
|
"aria-label": c,
|
|
1560
1561
|
style: A ? {
|
|
@@ -1582,12 +1583,14 @@ var j = {
|
|
|
1582
1583
|
role: "option",
|
|
1583
1584
|
"aria-selected": o,
|
|
1584
1585
|
disabled: i.disabled,
|
|
1586
|
+
"data-option-variant": i.variant ?? "default",
|
|
1585
1587
|
className: [
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1588
|
+
X[v],
|
|
1589
|
+
X.option,
|
|
1590
|
+
i.variant === "action" ? X.actionOption : "",
|
|
1591
|
+
o ? X.selected : ""
|
|
1589
1592
|
].filter(Boolean).join(" "),
|
|
1590
|
-
onClick: () =>
|
|
1593
|
+
onClick: () => ne(i),
|
|
1591
1594
|
onKeyDown: (t) => {
|
|
1592
1595
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
1593
1596
|
t.preventDefault();
|
|
@@ -1599,9 +1602,9 @@ var j = {
|
|
|
1599
1602
|
let n = t.key === "Home" ? 1 : -1;
|
|
1600
1603
|
H(t.key === "Home" ? 0 : e.length - 1, n);
|
|
1601
1604
|
}
|
|
1602
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
1605
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), ne(i));
|
|
1603
1606
|
},
|
|
1604
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), o && ee && /* @__PURE__ */ t(
|
|
1607
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && ee && /* @__PURE__ */ t(K, {
|
|
1605
1608
|
name: "IconCheck",
|
|
1606
1609
|
width: 16,
|
|
1607
1610
|
height: 16
|
|
@@ -1613,8 +1616,8 @@ var j = {
|
|
|
1613
1616
|
return /* @__PURE__ */ n("div", {
|
|
1614
1617
|
ref: M,
|
|
1615
1618
|
className: [
|
|
1616
|
-
|
|
1617
|
-
u ?
|
|
1619
|
+
X.wrapper,
|
|
1620
|
+
u ? X.errorState : "",
|
|
1618
1621
|
b
|
|
1619
1622
|
].filter(Boolean).join(" "),
|
|
1620
1623
|
children: [
|
|
@@ -1625,10 +1628,10 @@ var j = {
|
|
|
1625
1628
|
children: c
|
|
1626
1629
|
}),
|
|
1627
1630
|
/* @__PURE__ */ t("div", {
|
|
1628
|
-
className:
|
|
1631
|
+
className: X.container,
|
|
1629
1632
|
children: B ? /* @__PURE__ */ t("div", {
|
|
1630
1633
|
id: E,
|
|
1631
|
-
className:
|
|
1634
|
+
className: X.disabledText,
|
|
1632
1635
|
"aria-describedby": z,
|
|
1633
1636
|
children: I?.label ?? a
|
|
1634
1637
|
}) : /* @__PURE__ */ n("button", {
|
|
@@ -1636,7 +1639,7 @@ var j = {
|
|
|
1636
1639
|
id: E,
|
|
1637
1640
|
type: "button",
|
|
1638
1641
|
name: S,
|
|
1639
|
-
className: `${
|
|
1642
|
+
className: `${X.trigger} ${X[v]}`,
|
|
1640
1643
|
disabled: o,
|
|
1641
1644
|
"aria-haspopup": "listbox",
|
|
1642
1645
|
"aria-expanded": O,
|
|
@@ -1659,13 +1662,13 @@ var j = {
|
|
|
1659
1662
|
}
|
|
1660
1663
|
},
|
|
1661
1664
|
children: [/* @__PURE__ */ t("span", {
|
|
1662
|
-
className: `${I ?
|
|
1663
|
-
${
|
|
1665
|
+
className: `${I ? X.value : X.placeholder}
|
|
1666
|
+
${X[v]}`,
|
|
1664
1667
|
children: I?.label ?? a
|
|
1665
1668
|
}), /* @__PURE__ */ t("span", {
|
|
1666
|
-
className: [
|
|
1669
|
+
className: [X.chevron, O ? X.chevronOpen : ""].filter(Boolean).join(" "),
|
|
1667
1670
|
"aria-hidden": "true",
|
|
1668
|
-
children: /* @__PURE__ */ t(
|
|
1671
|
+
children: /* @__PURE__ */ t(K, {
|
|
1669
1672
|
name: "IconChevron",
|
|
1670
1673
|
width: 20,
|
|
1671
1674
|
height: 20
|
|
@@ -1673,38 +1676,38 @@ var j = {
|
|
|
1673
1676
|
})]
|
|
1674
1677
|
})
|
|
1675
1678
|
}),
|
|
1676
|
-
O && _(
|
|
1679
|
+
O && _(re, document.body),
|
|
1677
1680
|
y && !u && /* @__PURE__ */ t("span", {
|
|
1678
1681
|
id: L,
|
|
1679
|
-
className:
|
|
1682
|
+
className: X.message,
|
|
1680
1683
|
children: y
|
|
1681
1684
|
}),
|
|
1682
1685
|
u && /* @__PURE__ */ t("span", {
|
|
1683
1686
|
id: R,
|
|
1684
|
-
className:
|
|
1687
|
+
className: X.error,
|
|
1685
1688
|
children: u
|
|
1686
1689
|
})
|
|
1687
1690
|
]
|
|
1688
1691
|
});
|
|
1689
|
-
},
|
|
1692
|
+
}, et = (e) => `${e.id}:${e.direction}`, tt = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
|
|
1690
1693
|
let c = e.flatMap((e) => [{
|
|
1691
|
-
value:
|
|
1694
|
+
value: et({
|
|
1692
1695
|
id: e.id,
|
|
1693
1696
|
direction: "asc"
|
|
1694
1697
|
}),
|
|
1695
1698
|
label: e.ascLabel ?? `${e.label} · по возрастанию`,
|
|
1696
1699
|
disabled: e.disabled
|
|
1697
1700
|
}, {
|
|
1698
|
-
value:
|
|
1701
|
+
value: et({
|
|
1699
1702
|
id: e.id,
|
|
1700
1703
|
direction: "desc"
|
|
1701
1704
|
}),
|
|
1702
1705
|
label: e.descLabel ?? `${e.label} · по убыванию`,
|
|
1703
1706
|
disabled: e.disabled
|
|
1704
1707
|
}]);
|
|
1705
|
-
return /* @__PURE__ */ t(
|
|
1708
|
+
return /* @__PURE__ */ t($e, {
|
|
1706
1709
|
options: c,
|
|
1707
|
-
value: n ?
|
|
1710
|
+
value: n ? et(n) : "",
|
|
1708
1711
|
label: i,
|
|
1709
1712
|
placeholder: a,
|
|
1710
1713
|
disabled: o,
|
|
@@ -1717,7 +1720,7 @@ var j = {
|
|
|
1717
1720
|
});
|
|
1718
1721
|
}
|
|
1719
1722
|
});
|
|
1720
|
-
},
|
|
1723
|
+
}, nt = {
|
|
1721
1724
|
wrapper: "_wrapper_1khfq_1",
|
|
1722
1725
|
control: "_control_1khfq_15",
|
|
1723
1726
|
input: "_input_1khfq_25",
|
|
@@ -1727,12 +1730,12 @@ var j = {
|
|
|
1727
1730
|
lg: "_lg_1khfq_139",
|
|
1728
1731
|
inputError: "_inputError_1khfq_155",
|
|
1729
1732
|
trailingAction: "_trailingAction_1khfq_163"
|
|
1730
|
-
},
|
|
1733
|
+
}, rt = ({ 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: ee = "Скрыть пароль", passwordHiddenLabel: w = "Показать пароль", onFocus: T, ...E }) => {
|
|
1731
1734
|
let D = f(), O = v ?? `ds-input-${_ ?? D}`, k = h(null), [A, j] = g(!1), N = p ? `${O}-hint` : void 0, P = u ? `${O}-error` : void 0, F = String(e ?? ""), I = [N, P].filter(Boolean).join(" ") || void 0, L = C ? A ? "text" : "password" : i;
|
|
1732
1735
|
return d(() => {
|
|
1733
1736
|
C || j(!1);
|
|
1734
1737
|
}, [C]), /* @__PURE__ */ n("div", {
|
|
1735
|
-
className: `${
|
|
1738
|
+
className: `${nt.wrapper} ${m}`,
|
|
1736
1739
|
children: [
|
|
1737
1740
|
l && /* @__PURE__ */ t(te, {
|
|
1738
1741
|
htmlFor: O,
|
|
@@ -1742,11 +1745,11 @@ var j = {
|
|
|
1742
1745
|
}),
|
|
1743
1746
|
o && c ? /* @__PURE__ */ t("div", {
|
|
1744
1747
|
id: O,
|
|
1745
|
-
className:
|
|
1748
|
+
className: nt.disabledText,
|
|
1746
1749
|
"aria-describedby": I,
|
|
1747
1750
|
children: F || a
|
|
1748
1751
|
}) : /* @__PURE__ */ n("div", {
|
|
1749
|
-
className:
|
|
1752
|
+
className: nt.control,
|
|
1750
1753
|
children: [
|
|
1751
1754
|
/* @__PURE__ */ t("input", {
|
|
1752
1755
|
ref: k,
|
|
@@ -1760,7 +1763,7 @@ var j = {
|
|
|
1760
1763
|
required: x,
|
|
1761
1764
|
"aria-invalid": !!u,
|
|
1762
1765
|
"aria-describedby": I,
|
|
1763
|
-
className: `${
|
|
1766
|
+
className: `${nt.input} ${nt[y]} ${u ? nt.inputError : ""}`,
|
|
1764
1767
|
onChange: (e) => {
|
|
1765
1768
|
if (i === "number" && !C) {
|
|
1766
1769
|
let t = e.target.value === "" ? "" : Number(e.target.value);
|
|
@@ -1776,12 +1779,12 @@ var j = {
|
|
|
1776
1779
|
}),
|
|
1777
1780
|
C && /* @__PURE__ */ t("button", {
|
|
1778
1781
|
type: "button",
|
|
1779
|
-
className:
|
|
1782
|
+
className: nt.trailingAction,
|
|
1780
1783
|
disabled: o,
|
|
1781
1784
|
"aria-label": A ? ee : w,
|
|
1782
1785
|
"aria-pressed": A,
|
|
1783
1786
|
onClick: () => j((e) => !e),
|
|
1784
|
-
children: /* @__PURE__ */ t(
|
|
1787
|
+
children: /* @__PURE__ */ t(K, {
|
|
1785
1788
|
name: A ? "IconEyeOff" : "IconEye",
|
|
1786
1789
|
width: 20,
|
|
1787
1790
|
height: 20
|
|
@@ -1789,13 +1792,13 @@ var j = {
|
|
|
1789
1792
|
}),
|
|
1790
1793
|
!C && b && F && !o && !s && /* @__PURE__ */ t("button", {
|
|
1791
1794
|
type: "button",
|
|
1792
|
-
className:
|
|
1795
|
+
className: nt.trailingAction,
|
|
1793
1796
|
"aria-label": "Очистить поле",
|
|
1794
1797
|
onClick: () => {
|
|
1795
1798
|
let e = k.current;
|
|
1796
1799
|
e && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
|
|
1797
1800
|
},
|
|
1798
|
-
children: /* @__PURE__ */ t(
|
|
1801
|
+
children: /* @__PURE__ */ t(K, {
|
|
1799
1802
|
name: "IconCross",
|
|
1800
1803
|
width: 20,
|
|
1801
1804
|
height: 20
|
|
@@ -1814,23 +1817,23 @@ var j = {
|
|
|
1814
1817
|
})
|
|
1815
1818
|
]
|
|
1816
1819
|
});
|
|
1817
|
-
},
|
|
1820
|
+
}, it = 8, at = 6, ot = 120, st = (e) => {
|
|
1818
1821
|
if (typeof e == "number") return e;
|
|
1819
1822
|
if (typeof e == "string") {
|
|
1820
1823
|
let t = Number.parseFloat(e);
|
|
1821
1824
|
if (Number.isFinite(t)) return t;
|
|
1822
1825
|
}
|
|
1823
1826
|
return Infinity;
|
|
1824
|
-
},
|
|
1827
|
+
}, ct = ({ 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: ee = !1, needMark: w = !0, maxMenuHeight: T }) => {
|
|
1825
1828
|
let E = f(), D = C ?? `ds-dropdown-multiple-${S ?? E}`, O = `${D}-listbox`, [k, A] = g(!1), [j, M] = g(null), N = h(null), P = h(null), F = h(null), I = h([]), L = m(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), R = b ? `${D}-hint` : void 0, z = u ? `${D}-error` : void 0, B = [R, z].filter(Boolean).join(" ") || void 0, V = o && s, H = l(() => {
|
|
1826
1829
|
let e = P.current, t = F.current;
|
|
1827
1830
|
if (!e || !t) return;
|
|
1828
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom -
|
|
1831
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - it, a = n.top - it, o = i < r.height && a > i, s = Math.max(ot, o ? a : i), c = window.innerWidth - n.width - it;
|
|
1829
1832
|
M({
|
|
1830
|
-
top: o ? Math.max(
|
|
1831
|
-
left: Math.max(
|
|
1833
|
+
top: o ? Math.max(it, n.top - r.height - at) : n.bottom + at,
|
|
1834
|
+
left: Math.max(it, Math.min(n.left, c)),
|
|
1832
1835
|
width: n.width,
|
|
1833
|
-
maxHeight: Math.min(s,
|
|
1836
|
+
maxHeight: Math.min(s, st(T))
|
|
1834
1837
|
});
|
|
1835
1838
|
}, [T]);
|
|
1836
1839
|
p(() => {
|
|
@@ -1857,17 +1860,17 @@ var j = {
|
|
|
1857
1860
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1858
1861
|
};
|
|
1859
1862
|
}, [k]);
|
|
1860
|
-
let
|
|
1861
|
-
let r =
|
|
1863
|
+
let ne = (t, n) => {
|
|
1864
|
+
let r = Ze(e, t, n);
|
|
1862
1865
|
r !== -1 && (I.current[r]?.focus(), I.current[r]?.scrollIntoView({ block: "nearest" }));
|
|
1863
|
-
},
|
|
1866
|
+
}, re = (t) => {
|
|
1864
1867
|
if (t.disabled) return;
|
|
1865
1868
|
let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
|
|
1866
1869
|
i?.(n, e.filter((e) => n.includes(e.value))), ee && (A(!1), P.current?.focus());
|
|
1867
|
-
},
|
|
1870
|
+
}, ie = k ? /* @__PURE__ */ t("ul", {
|
|
1868
1871
|
ref: F,
|
|
1869
1872
|
id: O,
|
|
1870
|
-
className:
|
|
1873
|
+
className: X.menu,
|
|
1871
1874
|
role: "listbox",
|
|
1872
1875
|
"aria-label": c,
|
|
1873
1876
|
"aria-multiselectable": "true",
|
|
@@ -1896,26 +1899,28 @@ var j = {
|
|
|
1896
1899
|
role: "option",
|
|
1897
1900
|
"aria-selected": o,
|
|
1898
1901
|
disabled: i.disabled,
|
|
1902
|
+
"data-option-variant": i.variant ?? "default",
|
|
1899
1903
|
className: [
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1904
|
+
X[v],
|
|
1905
|
+
X.option,
|
|
1906
|
+
i.variant === "action" ? X.actionOption : "",
|
|
1907
|
+
o ? X.selected : ""
|
|
1903
1908
|
].filter(Boolean).join(" "),
|
|
1904
|
-
onClick: () =>
|
|
1909
|
+
onClick: () => re(i),
|
|
1905
1910
|
onKeyDown: (t) => {
|
|
1906
1911
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
1907
1912
|
t.preventDefault();
|
|
1908
1913
|
let e = t.key === "ArrowDown" ? 1 : -1;
|
|
1909
|
-
|
|
1914
|
+
ne(a + e, e);
|
|
1910
1915
|
}
|
|
1911
1916
|
if (t.key === "Home" || t.key === "End") {
|
|
1912
1917
|
t.preventDefault();
|
|
1913
1918
|
let n = t.key === "Home" ? 1 : -1;
|
|
1914
|
-
|
|
1919
|
+
ne(t.key === "Home" ? 0 : e.length - 1, n);
|
|
1915
1920
|
}
|
|
1916
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
1921
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), re(i)), t.key === "Tab" && A(!1);
|
|
1917
1922
|
},
|
|
1918
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(
|
|
1923
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(K, {
|
|
1919
1924
|
name: "IconCheck",
|
|
1920
1925
|
width: 16,
|
|
1921
1926
|
height: 16
|
|
@@ -1927,8 +1932,8 @@ var j = {
|
|
|
1927
1932
|
return /* @__PURE__ */ n("div", {
|
|
1928
1933
|
ref: N,
|
|
1929
1934
|
className: [
|
|
1930
|
-
|
|
1931
|
-
u ?
|
|
1935
|
+
X.wrapper,
|
|
1936
|
+
u ? X.errorState : "",
|
|
1932
1937
|
x
|
|
1933
1938
|
].filter(Boolean).join(" "),
|
|
1934
1939
|
children: [
|
|
@@ -1939,10 +1944,10 @@ var j = {
|
|
|
1939
1944
|
children: c
|
|
1940
1945
|
}),
|
|
1941
1946
|
/* @__PURE__ */ t("div", {
|
|
1942
|
-
className:
|
|
1947
|
+
className: X.container,
|
|
1943
1948
|
children: V ? /* @__PURE__ */ t("div", {
|
|
1944
1949
|
id: D,
|
|
1945
|
-
className: `${
|
|
1950
|
+
className: `${X.disabledText} ${X[v]}`,
|
|
1946
1951
|
"aria-describedby": B,
|
|
1947
1952
|
children: L || a
|
|
1948
1953
|
}) : /* @__PURE__ */ n("button", {
|
|
@@ -1950,7 +1955,7 @@ var j = {
|
|
|
1950
1955
|
id: D,
|
|
1951
1956
|
type: "button",
|
|
1952
1957
|
name: S,
|
|
1953
|
-
className: `${
|
|
1958
|
+
className: `${X.trigger} ${X[v]}`,
|
|
1954
1959
|
disabled: o,
|
|
1955
1960
|
"aria-haspopup": "listbox",
|
|
1956
1961
|
"aria-expanded": k,
|
|
@@ -1962,16 +1967,16 @@ var j = {
|
|
|
1962
1967
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
1963
1968
|
t.preventDefault(), A(!0);
|
|
1964
1969
|
let n = t.key === "ArrowDown" ? 1 : -1;
|
|
1965
|
-
requestAnimationFrame(() =>
|
|
1970
|
+
requestAnimationFrame(() => ne(t.key === "ArrowDown" ? 0 : e.length - 1, n));
|
|
1966
1971
|
}
|
|
1967
1972
|
},
|
|
1968
1973
|
children: [/* @__PURE__ */ t("span", {
|
|
1969
|
-
className: `${L ?
|
|
1974
|
+
className: `${L ? X.value : X.placeholder} ${X[v]}`,
|
|
1970
1975
|
children: L || a
|
|
1971
1976
|
}), /* @__PURE__ */ t("span", {
|
|
1972
|
-
className: [
|
|
1977
|
+
className: [X.chevron, k ? X.chevronOpen : ""].filter(Boolean).join(" "),
|
|
1973
1978
|
"aria-hidden": "true",
|
|
1974
|
-
children: /* @__PURE__ */ t(
|
|
1979
|
+
children: /* @__PURE__ */ t(K, {
|
|
1975
1980
|
name: "IconChevron",
|
|
1976
1981
|
width: 20,
|
|
1977
1982
|
height: 20
|
|
@@ -1979,35 +1984,35 @@ var j = {
|
|
|
1979
1984
|
})]
|
|
1980
1985
|
})
|
|
1981
1986
|
}),
|
|
1982
|
-
k && _(
|
|
1987
|
+
k && _(ie, document.body),
|
|
1983
1988
|
b && !u && /* @__PURE__ */ t("span", {
|
|
1984
1989
|
id: R,
|
|
1985
|
-
className:
|
|
1990
|
+
className: X.message,
|
|
1986
1991
|
children: b
|
|
1987
1992
|
}),
|
|
1988
1993
|
u && /* @__PURE__ */ t("span", {
|
|
1989
1994
|
id: z,
|
|
1990
|
-
className:
|
|
1995
|
+
className: X.error,
|
|
1991
1996
|
children: u
|
|
1992
1997
|
})
|
|
1993
1998
|
]
|
|
1994
1999
|
});
|
|
1995
|
-
},
|
|
2000
|
+
}, lt = {
|
|
1996
2001
|
wrapper: "_wrapper_1jspu_1",
|
|
1997
2002
|
input: "_input_1jspu_21",
|
|
1998
2003
|
switch: "_switch_1jspu_35",
|
|
1999
2004
|
thumb: "_thumb_1jspu_67",
|
|
2000
2005
|
label: "_label_1jspu_113",
|
|
2001
2006
|
disabled: "_disabled_1jspu_125"
|
|
2002
|
-
},
|
|
2007
|
+
}, ut = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: c, id: l, value: u }) => {
|
|
2003
2008
|
let d = f(), p = l ?? `ds-radio-button-${c ?? d}`;
|
|
2004
2009
|
return /* @__PURE__ */ n("label", {
|
|
2005
2010
|
htmlFor: p,
|
|
2006
|
-
className: `${
|
|
2011
|
+
className: `${lt.wrapper} ${a ? lt.disabled : ""} ${s}`,
|
|
2007
2012
|
children: [
|
|
2008
2013
|
/* @__PURE__ */ t("input", {
|
|
2009
2014
|
id: p,
|
|
2010
|
-
className:
|
|
2015
|
+
className: lt.input,
|
|
2011
2016
|
type: "checkbox",
|
|
2012
2017
|
role: "switch",
|
|
2013
2018
|
name: c,
|
|
@@ -2020,17 +2025,17 @@ var j = {
|
|
|
2020
2025
|
}
|
|
2021
2026
|
}),
|
|
2022
2027
|
/* @__PURE__ */ t("span", {
|
|
2023
|
-
className:
|
|
2028
|
+
className: lt.switch,
|
|
2024
2029
|
"aria-hidden": "true",
|
|
2025
|
-
children: /* @__PURE__ */ t("span", { className:
|
|
2030
|
+
children: /* @__PURE__ */ t("span", { className: lt.thumb })
|
|
2026
2031
|
}),
|
|
2027
2032
|
i && /* @__PURE__ */ t("span", {
|
|
2028
|
-
className:
|
|
2033
|
+
className: lt.label,
|
|
2029
2034
|
children: i
|
|
2030
2035
|
})
|
|
2031
2036
|
]
|
|
2032
2037
|
});
|
|
2033
|
-
},
|
|
2038
|
+
}, Z = {
|
|
2034
2039
|
root: "_root_y4bhr_1",
|
|
2035
2040
|
toolbar: "_toolbar_y4bhr_15",
|
|
2036
2041
|
totalWidget: "_totalWidget_y4bhr_31",
|
|
@@ -2089,10 +2094,10 @@ var j = {
|
|
|
2089
2094
|
default: "_default_y4bhr_1011",
|
|
2090
2095
|
tableOnMobile: "_tableOnMobile_y4bhr_1011",
|
|
2091
2096
|
wide: "_wide_y4bhr_1041"
|
|
2092
|
-
},
|
|
2097
|
+
}, dt = b({
|
|
2093
2098
|
rowSortingFeature: y,
|
|
2094
2099
|
sortedRowModel: v()
|
|
2095
|
-
}),
|
|
2100
|
+
}), ft = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
2096
2101
|
let o = e.type === "multi-select" ? e.options : void 0, [s, c] = g(Array.isArray(o) ? o : []), [l, u] = g(!1);
|
|
2097
2102
|
return d(() => {
|
|
2098
2103
|
if (o === void 0) return;
|
|
@@ -2108,7 +2113,7 @@ var j = {
|
|
|
2108
2113
|
}), () => {
|
|
2109
2114
|
e = !1;
|
|
2110
2115
|
};
|
|
2111
|
-
}, [o]), e.type === "multi-select" ? /* @__PURE__ */ t(
|
|
2116
|
+
}, [o]), e.type === "multi-select" ? /* @__PURE__ */ t(ct, {
|
|
2112
2117
|
label: e.label,
|
|
2113
2118
|
options: s,
|
|
2114
2119
|
value: Array.isArray(n) ? n.map(String) : [],
|
|
@@ -2116,7 +2121,7 @@ var j = {
|
|
|
2116
2121
|
placeholder: l ? "Загрузка…" : e.placeholder,
|
|
2117
2122
|
error: a,
|
|
2118
2123
|
onChange: (e) => r(e)
|
|
2119
|
-
}) : e.type === "switch" ? /* @__PURE__ */ t(
|
|
2124
|
+
}) : e.type === "switch" ? /* @__PURE__ */ t(ut, {
|
|
2120
2125
|
label: e.label,
|
|
2121
2126
|
checked: !!n,
|
|
2122
2127
|
disabled: i,
|
|
@@ -2126,7 +2131,7 @@ var j = {
|
|
|
2126
2131
|
setValue: r,
|
|
2127
2132
|
disabled: i,
|
|
2128
2133
|
error: a
|
|
2129
|
-
}) : /* @__PURE__ */ t(
|
|
2134
|
+
}) : /* @__PURE__ */ t(rt, {
|
|
2130
2135
|
label: e.label,
|
|
2131
2136
|
type: e.type === "search" ? "search" : "text",
|
|
2132
2137
|
value: String(n ?? ""),
|
|
@@ -2135,20 +2140,20 @@ var j = {
|
|
|
2135
2140
|
error: a,
|
|
2136
2141
|
onChange: (e) => r(e)
|
|
2137
2142
|
});
|
|
2138
|
-
},
|
|
2143
|
+
}, pt = (e, t, n) => {
|
|
2139
2144
|
let r = new Set(e);
|
|
2140
2145
|
return t.forEach((e) => {
|
|
2141
2146
|
n ? r.add(e) : r.delete(e);
|
|
2142
2147
|
}), Array.from(r);
|
|
2143
|
-
},
|
|
2148
|
+
}, mt = (e) => {
|
|
2144
2149
|
if (!(!e || e.width === void 0 && e.minWidth === void 0 && e.maxWidth === void 0)) return {
|
|
2145
2150
|
width: e.width,
|
|
2146
2151
|
minWidth: e.minWidth,
|
|
2147
2152
|
maxWidth: e.maxWidth
|
|
2148
2153
|
};
|
|
2149
|
-
},
|
|
2154
|
+
}, ht = (e) => {
|
|
2150
2155
|
if (e?.sticky) return e.sticky === "start" ? { insetInlineStart: e.stickyOffset ?? 0 } : { insetInlineEnd: e.stickyOffset ?? 0 };
|
|
2151
|
-
},
|
|
2156
|
+
}, gt = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
|
|
2152
2157
|
0,
|
|
2153
2158
|
1,
|
|
2154
2159
|
2,
|
|
@@ -2172,7 +2177,7 @@ var j = {
|
|
|
2172
2177
|
e + 1,
|
|
2173
2178
|
"ellipsis-end",
|
|
2174
2179
|
t - 1
|
|
2175
|
-
],
|
|
2180
|
+
], _t = (e, t) => {
|
|
2176
2181
|
let n = /* @__PURE__ */ new Set();
|
|
2177
2182
|
for (let t of e) {
|
|
2178
2183
|
if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
|
|
@@ -2184,36 +2189,36 @@ var j = {
|
|
|
2184
2189
|
for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
|
|
2185
2190
|
}
|
|
2186
2191
|
return null;
|
|
2187
|
-
},
|
|
2192
|
+
}, vt = (e, t) => typeof e == "function" ? e(t) : t[e], yt = (e) => {
|
|
2188
2193
|
if (e == null || e === "") return null;
|
|
2189
2194
|
let t = Date.parse(String(e));
|
|
2190
2195
|
return Number.isNaN(t) ? null : t;
|
|
2191
|
-
}, yt = (e, t, n) => {
|
|
2192
|
-
let r = vt(e.getValue(n)), i = vt(t.getValue(n));
|
|
2193
|
-
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
2194
2196
|
}, bt = (e, t, n) => {
|
|
2197
|
+
let r = yt(e.getValue(n)), i = yt(t.getValue(n));
|
|
2198
|
+
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
2199
|
+
}, xt = (e, t, n) => {
|
|
2195
2200
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2196
2201
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
2197
|
-
},
|
|
2202
|
+
}, St = (e, t, n) => {
|
|
2198
2203
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2199
2204
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
2200
|
-
},
|
|
2205
|
+
}, Ct = (e, t, n) => {
|
|
2201
2206
|
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
2202
2207
|
return r.localeCompare(i, void 0, {
|
|
2203
2208
|
numeric: !0,
|
|
2204
2209
|
sensitivity: "base"
|
|
2205
2210
|
});
|
|
2206
|
-
},
|
|
2211
|
+
}, wt = (e) => {
|
|
2207
2212
|
switch (e) {
|
|
2208
|
-
case "date": return
|
|
2209
|
-
case "number": return
|
|
2210
|
-
case "boolean": return
|
|
2213
|
+
case "date": return bt;
|
|
2214
|
+
case "number": return xt;
|
|
2215
|
+
case "boolean": return St;
|
|
2211
2216
|
case "text":
|
|
2212
|
-
case void 0: return
|
|
2217
|
+
case void 0: return Ct;
|
|
2213
2218
|
case "custom": return;
|
|
2214
2219
|
}
|
|
2215
|
-
},
|
|
2216
|
-
let t = (t) =>
|
|
2220
|
+
}, Tt = (e) => {
|
|
2221
|
+
let t = (t) => vt(e.accessor, t), n = e.sortFn ?? wt(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
|
|
2217
2222
|
id: e.id,
|
|
2218
2223
|
accessorFn: t,
|
|
2219
2224
|
header: () => e.header,
|
|
@@ -2225,290 +2230,290 @@ var j = {
|
|
|
2225
2230
|
sortDescFirst: e.sortDescFirst
|
|
2226
2231
|
};
|
|
2227
2232
|
return n !== void 0 && (i.sortFn = n), i;
|
|
2228
|
-
},
|
|
2233
|
+
}, Et = ({ columns: e, data: i, tableOnMobile: a = !1, mobileView: o, breakpoint: s = "default", sorting: c, onSortingChange: l, renderMobileCard: u, getRowId: f, getRowClassName: p, getRowStyle: h, toolbarContent: _, totalCountVariant: v = "default", totalCountLabel: y = "Всего", caption: b, ariaLabel: S, loading: C = !1, error: ee, emptyState: w = "Нет данных", stickyHeader: T = !1, maxHeight: E, className: D = "", onRowClick: O, selectable: k = !1, selectedRowIds: j, onSelectedRowIdsChange: te, onRowDoubleClick: M, getRowSelectionLabel: N, selectAllRowsLabel: P = "Выбрать все строки на этой странице", resetSelectionLabel: F = "Сбросить выбор", openRowLabel: I = "Открыть строку", pagination: L = !1, paginationMode: R = "client", page: z = 1, pageSize: B = 30, onPageSizeChange: V, pageSizeOptions: H = [
|
|
2229
2234
|
10,
|
|
2230
2235
|
30,
|
|
2231
2236
|
50,
|
|
2232
2237
|
-1
|
|
2233
|
-
], pageSizeDraft:
|
|
2234
|
-
let [
|
|
2238
|
+
], pageSizeDraft: ne, onPageSizeDraftChange: re, pageSizeApplyMode: ie = "table", totalCount: ae, onPageChange: oe, visibleColumnIds: se, density: ce = "comfortable", renderBulkActions: le, renderExpandedRow: ue, expandedRowIds: U, onExpandedRowIdsChange: de, getRowExpansionLabel: fe, resultsAnnouncement: pe, filterBar: W }) => {
|
|
2239
|
+
let [me, he] = g([]), [ge, _e] = g([]), [ve, ye] = g([]), [be, xe] = g(0), [G, Se] = g(B === -1 ? -1 : [
|
|
2235
2240
|
10,
|
|
2236
2241
|
30,
|
|
2237
2242
|
50
|
|
2238
|
-
].includes(B) ? B : 30),
|
|
2239
|
-
if (
|
|
2240
|
-
let t = new Set(
|
|
2243
|
+
].includes(B) ? B : 30), Ce = c ?? me, q = Ce.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), Te = B === -1, Ee = Te ? Math.max(1, (R === "server" ? Number(ae) : i.length) || i.length || 1) : Number.isFinite(B) && B > 0 ? Math.floor(B) : 30, J = L && R === "server", Y = m(() => {
|
|
2244
|
+
if (se === void 0) return e;
|
|
2245
|
+
let t = new Set(se);
|
|
2241
2246
|
return e.filter((e) => t.has(e.id));
|
|
2242
|
-
}, [e,
|
|
2243
|
-
features:
|
|
2244
|
-
columns:
|
|
2247
|
+
}, [e, se]), De = m(() => Y.length === 0 ? "Должна быть видима хотя бы одна колонка" : _t(Y, i), [i, Y]), Oe = m(() => Y.map(Tt), [Y]), ke = Y.some((e) => mt(e) !== void 0), Ae = x({
|
|
2248
|
+
features: dt,
|
|
2249
|
+
columns: Oe,
|
|
2245
2250
|
data: i,
|
|
2246
|
-
state: { sorting:
|
|
2251
|
+
state: { sorting: Ce },
|
|
2247
2252
|
onSortingChange: (e) => {
|
|
2248
|
-
let t = typeof e == "function" ? e(
|
|
2249
|
-
c === void 0 &&
|
|
2253
|
+
let t = typeof e == "function" ? e(Ce) : e;
|
|
2254
|
+
c === void 0 && he(t), xe(0), l?.(t);
|
|
2250
2255
|
},
|
|
2251
2256
|
getRowId: f
|
|
2252
|
-
}),
|
|
2253
|
-
|
|
2254
|
-
|
|
2257
|
+
}), je = Ae.getRowModel().rows, Me = J && Number.isFinite(ae) && Number(ae) >= 0 ? Math.floor(Number(ae)) : je.length, Ne = L ? Math.max(1, Math.ceil(Me / Ee)) : 1, Pe = Number.isFinite(z) && z > 0 ? Math.floor(z) - 1 : 0, Fe = Math.min(J ? Pe : be, Ne - 1), Ie = m(() => L && !J ? je.slice(Fe * Ee, (Fe + 1) * Ee) : je, [
|
|
2258
|
+
J,
|
|
2259
|
+
Ee,
|
|
2255
2260
|
L,
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
]),
|
|
2261
|
+
Fe,
|
|
2262
|
+
je
|
|
2263
|
+
]), Le = j ?? ge, Re = m(() => new Set(Le), [Le]), ze = U ?? ve, Be = m(() => new Set(ze), [ze]), Ve = m(() => Ie.map((e) => e.id), [Ie]), He = Ve.filter((e) => Re.has(e)).length, Ue = Ve.length > 0 && He === Ve.length, We = He > 0 && !Ue, Ge = m(() => Y.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
2259
2264
|
id: e.id,
|
|
2260
2265
|
label: typeof e.header == "string" ? e.header : e.id
|
|
2261
|
-
})), [
|
|
2262
|
-
|
|
2263
|
-
s === "wide" ?
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
+
})), [Y]), Ke = m(() => gt(Fe, Ne), [Ne, Fe]), X = o === void 0 ? a : o === "table", Je = [
|
|
2267
|
+
Z.root,
|
|
2268
|
+
s === "wide" ? Z.wide : Z.default,
|
|
2269
|
+
X ? Z.tableOnMobile : "",
|
|
2270
|
+
ce === "compact" ? Z.compact : "",
|
|
2266
2271
|
D
|
|
2267
|
-
].filter(Boolean).join(" "),
|
|
2268
|
-
|
|
2269
|
-
},
|
|
2270
|
-
let i =
|
|
2272
|
+
].filter(Boolean).join(" "), Ye = De ?? ee, Xe = L && !Te && !Ye && Me > Ee && (!C || J), Ze = L && !!(V || re || W), Qe = ne ?? G, $e = W ? (typeof W.validation == "function" ? W.validation(W.draftValues) : W.validation) ?? {} : {}, et = W ? JSON.stringify(W.draftValues) !== JSON.stringify(W.appliedValues) || Qe !== B : !1, nt = Object.values($e).some(Boolean), rt = Me === 0 ? 0 : Fe * Ee + 1, it = Math.min((Fe + 1) * Ee, Me), at = () => {
|
|
2273
|
+
Qe !== B && (xe(0), oe?.(1), V?.(Qe));
|
|
2274
|
+
}, ot = (e, r = !1) => {
|
|
2275
|
+
let i = Qe !== B, a = `ds-data-table-page-size-warning-${e}`;
|
|
2271
2276
|
return /* @__PURE__ */ n("div", {
|
|
2272
|
-
className: `${
|
|
2277
|
+
className: `${Z.pageSizePanel} ${Z[e]} ${r ? Z.embedded : ""}`,
|
|
2273
2278
|
children: [
|
|
2274
2279
|
/* @__PURE__ */ n("div", {
|
|
2275
|
-
className:
|
|
2280
|
+
className: Z.pageSizeMain,
|
|
2276
2281
|
children: [/* @__PURE__ */ n("fieldset", {
|
|
2277
|
-
className:
|
|
2278
|
-
disabled: C ||
|
|
2282
|
+
className: Z.pageSizeFieldset,
|
|
2283
|
+
disabled: C || W?.applying,
|
|
2279
2284
|
children: [/* @__PURE__ */ t("legend", { children: "На странице" }), /* @__PURE__ */ t("div", {
|
|
2280
|
-
className:
|
|
2285
|
+
className: Z.pageSizeOptions,
|
|
2281
2286
|
children: H.map((e) => /* @__PURE__ */ t("button", {
|
|
2282
2287
|
type: "button",
|
|
2283
|
-
className: `${
|
|
2284
|
-
"aria-pressed":
|
|
2288
|
+
className: `${Z.pageSizeOption} ${Qe === e ? Z.pageSizeOptionActive : ""}`,
|
|
2289
|
+
"aria-pressed": Qe === e,
|
|
2285
2290
|
onClick: () => {
|
|
2286
|
-
|
|
2291
|
+
ne === void 0 && Se(e), re?.(e);
|
|
2287
2292
|
},
|
|
2288
2293
|
children: e === -1 ? "Все" : e
|
|
2289
2294
|
}, e))
|
|
2290
2295
|
})]
|
|
2291
|
-
}),
|
|
2296
|
+
}), ie === "table" && !W && /* @__PURE__ */ t(A, {
|
|
2292
2297
|
size: "sm",
|
|
2293
2298
|
disabled: C || !i,
|
|
2294
|
-
"aria-describedby":
|
|
2295
|
-
onClick:
|
|
2299
|
+
"aria-describedby": Qe === -1 && i && e === "top" ? a : void 0,
|
|
2300
|
+
onClick: at,
|
|
2296
2301
|
children: "Применить"
|
|
2297
2302
|
})]
|
|
2298
2303
|
}),
|
|
2299
2304
|
/* @__PURE__ */ n("span", {
|
|
2300
|
-
className:
|
|
2305
|
+
className: Z.paginationRange,
|
|
2301
2306
|
children: [
|
|
2302
2307
|
"Показано ",
|
|
2303
|
-
nt,
|
|
2304
|
-
"–",
|
|
2305
2308
|
rt,
|
|
2309
|
+
"–",
|
|
2310
|
+
it,
|
|
2306
2311
|
" из ",
|
|
2307
|
-
|
|
2312
|
+
Me
|
|
2308
2313
|
]
|
|
2309
2314
|
}),
|
|
2310
|
-
|
|
2311
|
-
className:
|
|
2315
|
+
et && e === "top" && /* @__PURE__ */ t("span", {
|
|
2316
|
+
className: Z.pendingChanges,
|
|
2312
2317
|
role: "status",
|
|
2313
2318
|
children: "Есть неприменённые изменения"
|
|
2314
2319
|
}),
|
|
2315
|
-
|
|
2320
|
+
J && Qe === -1 && i && /* @__PURE__ */ n("span", {
|
|
2316
2321
|
id: a,
|
|
2317
|
-
className:
|
|
2322
|
+
className: Z.pageSizeWarning,
|
|
2318
2323
|
"aria-hidden": e === "bottom" || void 0,
|
|
2319
2324
|
children: [
|
|
2320
2325
|
"Будут загружены все ",
|
|
2321
|
-
|
|
2326
|
+
Me,
|
|
2322
2327
|
" записей"
|
|
2323
2328
|
]
|
|
2324
2329
|
})
|
|
2325
2330
|
]
|
|
2326
2331
|
});
|
|
2327
|
-
},
|
|
2328
|
-
let t = Math.max(0, Math.min(
|
|
2329
|
-
if (
|
|
2330
|
-
t !==
|
|
2332
|
+
}, st = (e) => {
|
|
2333
|
+
let t = Math.max(0, Math.min(Ne - 1, e));
|
|
2334
|
+
if (J) {
|
|
2335
|
+
t !== Fe && oe?.(t + 1);
|
|
2331
2336
|
return;
|
|
2332
2337
|
}
|
|
2333
|
-
|
|
2334
|
-
}, st = (e) => {
|
|
2335
|
-
let t = Array.from(e);
|
|
2336
|
-
j === void 0 && ge(t), te?.(t);
|
|
2338
|
+
xe(t);
|
|
2337
2339
|
}, ct = (e) => {
|
|
2338
|
-
let t =
|
|
2339
|
-
|
|
2340
|
-
}, lt = () => {
|
|
2341
|
-
let
|
|
2342
|
-
|
|
2343
|
-
},
|
|
2344
|
-
let
|
|
2340
|
+
let t = Array.from(e);
|
|
2341
|
+
j === void 0 && _e(t), te?.(t);
|
|
2342
|
+
}, lt = (e) => {
|
|
2343
|
+
let t = new Set(Re);
|
|
2344
|
+
t.has(e) ? t.delete(e) : t.add(e), ct(t);
|
|
2345
|
+
}, ut = () => {
|
|
2346
|
+
let e = pt(Re, Ve, !Ue);
|
|
2347
|
+
j === void 0 && _e(e), te?.(e);
|
|
2348
|
+
}, yt = () => ct(/* @__PURE__ */ new Set()), bt = (e) => {
|
|
2349
|
+
let t = new Set(Be);
|
|
2345
2350
|
t.has(e) ? t.delete(e) : t.add(e);
|
|
2346
2351
|
let n = Array.from(t);
|
|
2347
|
-
|
|
2348
|
-
},
|
|
2349
|
-
visibleCount:
|
|
2350
|
-
totalCount:
|
|
2351
|
-
selectedCount:
|
|
2352
|
-
}) ?? `Показано строк: ${
|
|
2352
|
+
U === void 0 && ye(n), de?.(n);
|
|
2353
|
+
}, xt = i.filter((e, t) => Re.has(f?.(e, t) ?? String(t))), St = pe?.({
|
|
2354
|
+
visibleCount: Ie.length,
|
|
2355
|
+
totalCount: Me,
|
|
2356
|
+
selectedCount: Re.size
|
|
2357
|
+
}) ?? `Показано строк: ${Ie.length} из ${Me}. Выбрано: ${Re.size}.`;
|
|
2353
2358
|
return d(() => {
|
|
2354
|
-
|
|
2359
|
+
J || xe(0);
|
|
2355
2360
|
}, [
|
|
2356
2361
|
i,
|
|
2357
|
-
|
|
2358
|
-
|
|
2362
|
+
J,
|
|
2363
|
+
Ee,
|
|
2359
2364
|
L,
|
|
2360
|
-
|
|
2365
|
+
q
|
|
2361
2366
|
]), d(() => {
|
|
2362
|
-
!
|
|
2367
|
+
!J && be >= Ne && xe(Ne - 1);
|
|
2363
2368
|
}, [
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2369
|
+
J,
|
|
2370
|
+
Ne,
|
|
2371
|
+
be
|
|
2367
2372
|
]), d(() => {
|
|
2368
|
-
|
|
2373
|
+
Se(B === -1 ? -1 : [
|
|
2369
2374
|
10,
|
|
2370
2375
|
30,
|
|
2371
2376
|
50
|
|
2372
2377
|
].includes(B) ? B : 30);
|
|
2373
2378
|
}, [B]), /* @__PURE__ */ n("section", {
|
|
2374
|
-
className:
|
|
2379
|
+
className: Je,
|
|
2375
2380
|
"aria-busy": C,
|
|
2376
2381
|
children: [
|
|
2377
2382
|
/* @__PURE__ */ t("div", {
|
|
2378
|
-
className:
|
|
2383
|
+
className: Z.srOnly,
|
|
2379
2384
|
"aria-live": "polite",
|
|
2380
2385
|
"aria-atomic": "true",
|
|
2381
|
-
children:
|
|
2386
|
+
children: St
|
|
2382
2387
|
}),
|
|
2383
|
-
|
|
2384
|
-
className:
|
|
2388
|
+
le && Re.size > 0 && /* @__PURE__ */ t("div", {
|
|
2389
|
+
className: Z.bulkActions,
|
|
2385
2390
|
role: "region",
|
|
2386
2391
|
"aria-label": "Действия с выбранными строками",
|
|
2387
|
-
children:
|
|
2388
|
-
selectedRowIds: Array.from(
|
|
2389
|
-
selectedRows:
|
|
2390
|
-
clearSelection:
|
|
2392
|
+
children: le({
|
|
2393
|
+
selectedRowIds: Array.from(Re),
|
|
2394
|
+
selectedRows: xt,
|
|
2395
|
+
clearSelection: yt
|
|
2391
2396
|
})
|
|
2392
2397
|
}),
|
|
2393
|
-
|
|
2394
|
-
className:
|
|
2398
|
+
W && /* @__PURE__ */ n("form", {
|
|
2399
|
+
className: Z.filterBar,
|
|
2395
2400
|
role: "search",
|
|
2396
2401
|
"aria-label": "Фильтры таблицы",
|
|
2397
2402
|
onSubmit: (e) => {
|
|
2398
|
-
e.preventDefault(), !(
|
|
2399
|
-
filters:
|
|
2400
|
-
pageSize:
|
|
2403
|
+
e.preventDefault(), !(!et || nt || W.applying || C) && (xe(0), oe?.(1), W.onApply({
|
|
2404
|
+
filters: W.draftValues,
|
|
2405
|
+
pageSize: Qe
|
|
2401
2406
|
}));
|
|
2402
2407
|
},
|
|
2403
2408
|
children: [
|
|
2404
2409
|
/* @__PURE__ */ t("div", {
|
|
2405
|
-
className:
|
|
2406
|
-
children:
|
|
2410
|
+
className: Z.filterFields,
|
|
2411
|
+
children: W.fields.map((e) => /* @__PURE__ */ t(ft, {
|
|
2407
2412
|
field: e,
|
|
2408
|
-
value:
|
|
2409
|
-
disabled: !!(e.disabled ||
|
|
2410
|
-
error:
|
|
2411
|
-
setValue: (t) =>
|
|
2412
|
-
...
|
|
2413
|
+
value: W.draftValues[e.key],
|
|
2414
|
+
disabled: !!(e.disabled || W.applying || C),
|
|
2415
|
+
error: $e[e.key],
|
|
2416
|
+
setValue: (t) => W.onDraftValuesChange({
|
|
2417
|
+
...W.draftValues,
|
|
2413
2418
|
[e.key]: t
|
|
2414
2419
|
})
|
|
2415
2420
|
}, e.key))
|
|
2416
2421
|
}),
|
|
2417
|
-
|
|
2422
|
+
Ze && ot("top", !0),
|
|
2418
2423
|
/* @__PURE__ */ n("div", {
|
|
2419
|
-
className:
|
|
2424
|
+
className: Z.filterActions,
|
|
2420
2425
|
children: [/* @__PURE__ */ t(A, {
|
|
2421
2426
|
variant: "empty",
|
|
2422
|
-
disabled:
|
|
2427
|
+
disabled: W.applying || C,
|
|
2423
2428
|
onClick: () => {
|
|
2424
|
-
let e =
|
|
2425
|
-
|
|
2426
|
-
let t =
|
|
2427
|
-
|
|
2429
|
+
let e = W.resetValues ?? W.appliedValues;
|
|
2430
|
+
W.onDraftValuesChange(e);
|
|
2431
|
+
let t = W.resetPageSize ?? H[0] ?? 30;
|
|
2432
|
+
ne === void 0 && Se(t), re?.(t), W.onReset?.({
|
|
2428
2433
|
filters: e,
|
|
2429
2434
|
pageSize: t
|
|
2430
2435
|
});
|
|
2431
2436
|
},
|
|
2432
|
-
children:
|
|
2437
|
+
children: W.resetLabel ?? "Сбросить"
|
|
2433
2438
|
}), /* @__PURE__ */ t(A, {
|
|
2434
2439
|
type: "submit",
|
|
2435
|
-
isLoading:
|
|
2436
|
-
disabled:
|
|
2437
|
-
children:
|
|
2440
|
+
isLoading: W.applying,
|
|
2441
|
+
disabled: !et || nt || C,
|
|
2442
|
+
children: W.applyLabel ?? "Применить"
|
|
2438
2443
|
})]
|
|
2439
2444
|
})
|
|
2440
2445
|
]
|
|
2441
2446
|
}),
|
|
2442
|
-
|
|
2447
|
+
Ze && !W && ot("top"),
|
|
2443
2448
|
(v === "highlighted" || _ != null) && /* @__PURE__ */ n("div", {
|
|
2444
|
-
className:
|
|
2449
|
+
className: Z.toolbar,
|
|
2445
2450
|
children: [v === "highlighted" && /* @__PURE__ */ n("div", {
|
|
2446
|
-
className:
|
|
2447
|
-
"aria-label": `${y}: ${
|
|
2451
|
+
className: Z.totalWidget,
|
|
2452
|
+
"aria-label": `${y}: ${Me}`,
|
|
2448
2453
|
children: [/* @__PURE__ */ t("span", {
|
|
2449
|
-
className:
|
|
2454
|
+
className: Z.totalLabel,
|
|
2450
2455
|
children: y
|
|
2451
2456
|
}), /* @__PURE__ */ t("strong", {
|
|
2452
|
-
className:
|
|
2453
|
-
children:
|
|
2457
|
+
className: Z.totalValue,
|
|
2458
|
+
children: Me
|
|
2454
2459
|
})]
|
|
2455
2460
|
}), _]
|
|
2456
2461
|
}),
|
|
2457
|
-
!
|
|
2458
|
-
className:
|
|
2459
|
-
options:
|
|
2460
|
-
value:
|
|
2461
|
-
id:
|
|
2462
|
-
direction:
|
|
2462
|
+
!X && !C && !Ye && Ie.length > 0 && Ge.length > 0 && /* @__PURE__ */ t(tt, {
|
|
2463
|
+
className: Z.mobileSort,
|
|
2464
|
+
options: Ge,
|
|
2465
|
+
value: Ce[0] ? {
|
|
2466
|
+
id: Ce[0].id,
|
|
2467
|
+
direction: Ce[0].desc ? "desc" : "asc"
|
|
2463
2468
|
} : null,
|
|
2464
|
-
onChange: (e) =>
|
|
2469
|
+
onChange: (e) => Ae.setSorting([{
|
|
2465
2470
|
id: e.id,
|
|
2466
2471
|
desc: e.direction === "desc"
|
|
2467
2472
|
}])
|
|
2468
2473
|
}),
|
|
2469
2474
|
/* @__PURE__ */ t("div", {
|
|
2470
|
-
className:
|
|
2475
|
+
className: Z.tableWrap,
|
|
2471
2476
|
style: { maxHeight: E },
|
|
2472
2477
|
children: /* @__PURE__ */ n("table", {
|
|
2473
|
-
className:
|
|
2478
|
+
className: Z.table,
|
|
2474
2479
|
"aria-label": S,
|
|
2475
2480
|
children: [
|
|
2476
2481
|
b && /* @__PURE__ */ t("caption", { children: b }),
|
|
2477
|
-
(
|
|
2478
|
-
|
|
2479
|
-
k && /* @__PURE__ */ t("col", { className:
|
|
2480
|
-
|
|
2482
|
+
(ke || k || !!ue) && /* @__PURE__ */ n("colgroup", { children: [
|
|
2483
|
+
ue && /* @__PURE__ */ t("col", { className: Z.expansionColumn }),
|
|
2484
|
+
k && /* @__PURE__ */ t("col", { className: Z.selectionColumn }),
|
|
2485
|
+
Y.map((e) => /* @__PURE__ */ t("col", { style: mt(e) }, e.id))
|
|
2481
2486
|
] }),
|
|
2482
2487
|
/* @__PURE__ */ t("thead", {
|
|
2483
|
-
className: T ?
|
|
2484
|
-
children:
|
|
2485
|
-
|
|
2486
|
-
className:
|
|
2488
|
+
className: T ? Z.sticky : "",
|
|
2489
|
+
children: Ae.getHeaderGroups().map((e) => /* @__PURE__ */ n("tr", { children: [
|
|
2490
|
+
ue && /* @__PURE__ */ t("th", {
|
|
2491
|
+
className: Z.expansionCell,
|
|
2487
2492
|
scope: "col",
|
|
2488
2493
|
children: /* @__PURE__ */ t("span", {
|
|
2489
|
-
className:
|
|
2494
|
+
className: Z.srOnly,
|
|
2490
2495
|
children: "Подробности"
|
|
2491
2496
|
})
|
|
2492
2497
|
}),
|
|
2493
2498
|
k && /* @__PURE__ */ t("th", {
|
|
2494
|
-
className:
|
|
2499
|
+
className: Z.selectionHeaderCell,
|
|
2495
2500
|
scope: "col",
|
|
2496
2501
|
children: /* @__PURE__ */ n("div", {
|
|
2497
|
-
className:
|
|
2498
|
-
children: [/* @__PURE__ */ t(
|
|
2499
|
-
checked:
|
|
2500
|
-
indeterminate:
|
|
2501
|
-
disabled: C ||
|
|
2502
|
+
className: Z.selectionHeaderControls,
|
|
2503
|
+
children: [/* @__PURE__ */ t(we, {
|
|
2504
|
+
checked: Ue,
|
|
2505
|
+
indeterminate: We,
|
|
2506
|
+
disabled: C || Ve.length === 0,
|
|
2502
2507
|
ariaLabel: P,
|
|
2503
|
-
onChange:
|
|
2508
|
+
onChange: ut
|
|
2504
2509
|
}), /* @__PURE__ */ t(A, {
|
|
2505
2510
|
size: "sm",
|
|
2506
2511
|
variant: "empty",
|
|
2507
|
-
disabled:
|
|
2512
|
+
disabled: Re.size === 0,
|
|
2508
2513
|
"aria-label": F,
|
|
2509
2514
|
title: F,
|
|
2510
|
-
onClick:
|
|
2511
|
-
children: /* @__PURE__ */ t(
|
|
2515
|
+
onClick: yt,
|
|
2516
|
+
children: /* @__PURE__ */ t(K, {
|
|
2512
2517
|
name: "IconX",
|
|
2513
2518
|
width: 16,
|
|
2514
2519
|
height: 16
|
|
@@ -2521,17 +2526,17 @@ var j = {
|
|
|
2521
2526
|
return /* @__PURE__ */ t("th", {
|
|
2522
2527
|
scope: "col",
|
|
2523
2528
|
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
2524
|
-
className:
|
|
2529
|
+
className: Y.find((t) => t.id === e.column.id)?.sticky ? Z.stickyColumn : void 0,
|
|
2525
2530
|
style: {
|
|
2526
|
-
...
|
|
2527
|
-
...
|
|
2531
|
+
...mt(Y.find((t) => t.id === e.column.id)),
|
|
2532
|
+
...ht(Y.find((t) => t.id === e.column.id))
|
|
2528
2533
|
},
|
|
2529
2534
|
children: /* @__PURE__ */ n("button", {
|
|
2530
2535
|
type: "button",
|
|
2531
|
-
className:
|
|
2536
|
+
className: Z.sortButton,
|
|
2532
2537
|
disabled: !i,
|
|
2533
2538
|
onClick: a,
|
|
2534
|
-
children: [/* @__PURE__ */ t(
|
|
2539
|
+
children: [/* @__PURE__ */ t(Ae.FlexRender, { header: e }), /* @__PURE__ */ t(K, {
|
|
2535
2540
|
name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
|
|
2536
2541
|
width: 16,
|
|
2537
2542
|
height: 16
|
|
@@ -2542,86 +2547,86 @@ var j = {
|
|
|
2542
2547
|
] }, e.id))
|
|
2543
2548
|
}),
|
|
2544
2549
|
/* @__PURE__ */ t("tbody", { children: C ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2545
|
-
colSpan:
|
|
2546
|
-
children: /* @__PURE__ */ t(
|
|
2550
|
+
colSpan: Y.length + +!!k + +!!ue,
|
|
2551
|
+
children: /* @__PURE__ */ t(qe, {
|
|
2547
2552
|
lines: 3,
|
|
2548
2553
|
height: 65
|
|
2549
2554
|
})
|
|
2550
|
-
}) }) :
|
|
2551
|
-
className:
|
|
2552
|
-
colSpan:
|
|
2553
|
-
children:
|
|
2554
|
-
}) }) :
|
|
2555
|
-
className:
|
|
2556
|
-
colSpan:
|
|
2555
|
+
}) }) : Ye ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2556
|
+
className: Z.state,
|
|
2557
|
+
colSpan: Y.length + +!!k + +!!ue,
|
|
2558
|
+
children: Ye
|
|
2559
|
+
}) }) : Ie.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2560
|
+
className: Z.state,
|
|
2561
|
+
colSpan: Y.length + +!!k + +!!ue,
|
|
2557
2562
|
children: w
|
|
2558
|
-
}) }) :
|
|
2559
|
-
let i =
|
|
2563
|
+
}) }) : Ie.map((e) => {
|
|
2564
|
+
let i = Re.has(e.id), a = N?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = Be.has(e.id);
|
|
2560
2565
|
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ n("tr", {
|
|
2561
2566
|
className: [
|
|
2562
|
-
O || k ?
|
|
2563
|
-
i ?
|
|
2567
|
+
O || k ? Z.clickableRow : "",
|
|
2568
|
+
i ? Z.selectedRow : "",
|
|
2564
2569
|
p?.(e.original)
|
|
2565
2570
|
].filter(Boolean).join(" "),
|
|
2566
2571
|
style: h?.(e.original),
|
|
2567
2572
|
"aria-selected": k ? i : void 0,
|
|
2568
2573
|
onClick: () => {
|
|
2569
|
-
k ?
|
|
2574
|
+
k ? lt(e.id) : O?.(e.original);
|
|
2570
2575
|
},
|
|
2571
2576
|
onDoubleClick: () => {
|
|
2572
2577
|
k && M?.(e.original);
|
|
2573
2578
|
},
|
|
2574
2579
|
onKeyDown: (t) => {
|
|
2575
|
-
t.key === "Enter" ? (t.preventDefault(), k ? M?.(e.original) : O?.(e.original)) : t.key === " " && k && (t.preventDefault(),
|
|
2580
|
+
t.key === "Enter" ? (t.preventDefault(), k ? M?.(e.original) : O?.(e.original)) : t.key === " " && k && (t.preventDefault(), lt(e.id));
|
|
2576
2581
|
},
|
|
2577
2582
|
tabIndex: O || k || M ? 0 : void 0,
|
|
2578
2583
|
role: !k && O ? "button" : void 0,
|
|
2579
2584
|
children: [
|
|
2580
|
-
|
|
2581
|
-
className:
|
|
2585
|
+
ue && /* @__PURE__ */ t("td", {
|
|
2586
|
+
className: Z.expansionCell,
|
|
2582
2587
|
onClick: (e) => e.stopPropagation(),
|
|
2583
2588
|
children: /* @__PURE__ */ t(A, {
|
|
2584
2589
|
size: "sm",
|
|
2585
2590
|
variant: "empty",
|
|
2586
2591
|
"aria-expanded": o,
|
|
2587
|
-
"aria-label":
|
|
2588
|
-
onClick: () =>
|
|
2589
|
-
children: /* @__PURE__ */ t(
|
|
2592
|
+
"aria-label": fe?.(e.original, o) ?? (o ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2593
|
+
onClick: () => bt(e.id),
|
|
2594
|
+
children: /* @__PURE__ */ t(K, {
|
|
2590
2595
|
name: "IconChevron",
|
|
2591
2596
|
width: 16,
|
|
2592
2597
|
height: 16,
|
|
2593
|
-
className: o ?
|
|
2598
|
+
className: o ? Z.expansionIconOpen : Z.expansionIcon
|
|
2594
2599
|
})
|
|
2595
2600
|
})
|
|
2596
2601
|
}),
|
|
2597
2602
|
k && /* @__PURE__ */ t("td", {
|
|
2598
|
-
className:
|
|
2603
|
+
className: Z.selectionCell,
|
|
2599
2604
|
children: /* @__PURE__ */ t("div", {
|
|
2600
2605
|
onClick: (e) => e.stopPropagation(),
|
|
2601
|
-
children: /* @__PURE__ */ t(
|
|
2606
|
+
children: /* @__PURE__ */ t(we, {
|
|
2602
2607
|
checked: i,
|
|
2603
2608
|
ariaLabel: a,
|
|
2604
|
-
onChange: () =>
|
|
2609
|
+
onChange: () => lt(e.id)
|
|
2605
2610
|
})
|
|
2606
2611
|
})
|
|
2607
2612
|
}),
|
|
2608
2613
|
e.getAllCells().map((e) => /* @__PURE__ */ t("td", {
|
|
2609
|
-
className:
|
|
2614
|
+
className: Y.find((t) => t.id === e.column.id)?.sticky ? Z.stickyColumn : void 0,
|
|
2610
2615
|
style: {
|
|
2611
|
-
...
|
|
2612
|
-
...
|
|
2616
|
+
...mt(Y.find((t) => t.id === e.column.id)),
|
|
2617
|
+
...ht(Y.find((t) => t.id === e.column.id))
|
|
2613
2618
|
},
|
|
2614
|
-
children: /* @__PURE__ */ t(
|
|
2619
|
+
children: /* @__PURE__ */ t(Ae.FlexRender, { cell: e })
|
|
2615
2620
|
}, e.id))
|
|
2616
2621
|
]
|
|
2617
|
-
}), o &&
|
|
2618
|
-
className:
|
|
2622
|
+
}), o && ue && /* @__PURE__ */ t("tr", {
|
|
2623
|
+
className: Z.detailRow,
|
|
2619
2624
|
children: /* @__PURE__ */ t("td", {
|
|
2620
|
-
colSpan:
|
|
2621
|
-
children:
|
|
2625
|
+
colSpan: Y.length + +!!k + 1,
|
|
2626
|
+
children: ue({
|
|
2622
2627
|
row: e.original,
|
|
2623
2628
|
rowId: e.id,
|
|
2624
|
-
collapse: () =>
|
|
2629
|
+
collapse: () => bt(e.id)
|
|
2625
2630
|
})
|
|
2626
2631
|
})
|
|
2627
2632
|
})] }, e.id);
|
|
@@ -2629,175 +2634,175 @@ var j = {
|
|
|
2629
2634
|
]
|
|
2630
2635
|
})
|
|
2631
2636
|
}),
|
|
2632
|
-
!
|
|
2633
|
-
className:
|
|
2637
|
+
!X && /* @__PURE__ */ n("div", {
|
|
2638
|
+
className: Z.cards,
|
|
2634
2639
|
role: "list",
|
|
2635
2640
|
"aria-label": S ?? b,
|
|
2636
|
-
children: [k && !C && !
|
|
2637
|
-
className:
|
|
2638
|
-
children: [/* @__PURE__ */ t(
|
|
2639
|
-
checked:
|
|
2640
|
-
indeterminate:
|
|
2641
|
+
children: [k && !C && !Ye && Ie.length > 0 && /* @__PURE__ */ n("div", {
|
|
2642
|
+
className: Z.mobileSelectionControls,
|
|
2643
|
+
children: [/* @__PURE__ */ t(we, {
|
|
2644
|
+
checked: Ue,
|
|
2645
|
+
indeterminate: We,
|
|
2641
2646
|
ariaLabel: P,
|
|
2642
2647
|
label: P,
|
|
2643
|
-
onChange:
|
|
2648
|
+
onChange: ut
|
|
2644
2649
|
}), /* @__PURE__ */ t(A, {
|
|
2645
2650
|
size: "sm",
|
|
2646
2651
|
variant: "empty",
|
|
2647
|
-
disabled:
|
|
2648
|
-
onClick:
|
|
2652
|
+
disabled: Re.size === 0,
|
|
2653
|
+
onClick: yt,
|
|
2649
2654
|
children: F
|
|
2650
2655
|
})]
|
|
2651
|
-
}), C ? /* @__PURE__ */ t(
|
|
2656
|
+
}), C ? /* @__PURE__ */ t(qe, {
|
|
2652
2657
|
lines: 4,
|
|
2653
2658
|
height: 65
|
|
2654
|
-
}) :
|
|
2655
|
-
className:
|
|
2656
|
-
children:
|
|
2657
|
-
}) :
|
|
2658
|
-
className:
|
|
2659
|
+
}) : Ye ? /* @__PURE__ */ t("div", {
|
|
2660
|
+
className: Z.state,
|
|
2661
|
+
children: Ye
|
|
2662
|
+
}) : Ie.length === 0 ? /* @__PURE__ */ t("div", {
|
|
2663
|
+
className: Z.state,
|
|
2659
2664
|
children: w
|
|
2660
|
-
}) :
|
|
2661
|
-
let r =
|
|
2662
|
-
className:
|
|
2665
|
+
}) : Ie.map((e) => {
|
|
2666
|
+
let r = Re.has(e.id), i = Be.has(e.id), a = N?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = k && /* @__PURE__ */ n("div", {
|
|
2667
|
+
className: Z.cardSelectionControls,
|
|
2663
2668
|
onClick: (e) => e.stopPropagation(),
|
|
2664
|
-
children: [/* @__PURE__ */ t(
|
|
2669
|
+
children: [/* @__PURE__ */ t(we, {
|
|
2665
2670
|
checked: r,
|
|
2666
2671
|
ariaLabel: a,
|
|
2667
|
-
onChange: () =>
|
|
2672
|
+
onChange: () => lt(e.id)
|
|
2668
2673
|
}), M && /* @__PURE__ */ t(A, {
|
|
2669
2674
|
size: "sm",
|
|
2670
2675
|
variant: "empty",
|
|
2671
2676
|
onClick: () => M(e.original),
|
|
2672
2677
|
children: I
|
|
2673
2678
|
})]
|
|
2674
|
-
}), s =
|
|
2679
|
+
}), s = ue && /* @__PURE__ */ t(A, {
|
|
2675
2680
|
size: "sm",
|
|
2676
2681
|
variant: "empty",
|
|
2677
2682
|
"aria-expanded": i,
|
|
2678
|
-
"aria-label":
|
|
2683
|
+
"aria-label": fe?.(e.original, i) ?? (i ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2679
2684
|
onClick: (t) => {
|
|
2680
|
-
t.stopPropagation(),
|
|
2685
|
+
t.stopPropagation(), bt(e.id);
|
|
2681
2686
|
},
|
|
2682
|
-
children: /* @__PURE__ */ t(
|
|
2687
|
+
children: /* @__PURE__ */ t(K, {
|
|
2683
2688
|
name: "IconChevron",
|
|
2684
2689
|
width: 16,
|
|
2685
2690
|
height: 16,
|
|
2686
|
-
className: i ?
|
|
2691
|
+
className: i ? Z.expansionIconOpen : Z.expansionIcon
|
|
2687
2692
|
})
|
|
2688
2693
|
});
|
|
2689
2694
|
if (u) return /* @__PURE__ */ n("div", {
|
|
2690
2695
|
role: "listitem",
|
|
2691
2696
|
className: [
|
|
2692
|
-
|
|
2693
|
-
r ?
|
|
2697
|
+
Z.customCardShell,
|
|
2698
|
+
r ? Z.selectedCard : "",
|
|
2694
2699
|
p?.(e.original)
|
|
2695
2700
|
].filter(Boolean).join(" "),
|
|
2696
2701
|
style: h?.(e.original),
|
|
2697
2702
|
"aria-selected": k ? r : void 0,
|
|
2698
2703
|
onClick: () => {
|
|
2699
|
-
k &&
|
|
2704
|
+
k && lt(e.id);
|
|
2700
2705
|
},
|
|
2701
2706
|
children: [
|
|
2702
2707
|
o,
|
|
2703
2708
|
u({
|
|
2704
2709
|
row: e.original,
|
|
2705
|
-
columns:
|
|
2710
|
+
columns: Y
|
|
2706
2711
|
}),
|
|
2707
2712
|
s,
|
|
2708
2713
|
i && /* @__PURE__ */ t("div", {
|
|
2709
|
-
className:
|
|
2710
|
-
children:
|
|
2714
|
+
className: Z.cardDetail,
|
|
2715
|
+
children: ue?.({
|
|
2711
2716
|
row: e.original,
|
|
2712
2717
|
rowId: e.id,
|
|
2713
|
-
collapse: () =>
|
|
2718
|
+
collapse: () => bt(e.id)
|
|
2714
2719
|
})
|
|
2715
2720
|
})
|
|
2716
2721
|
]
|
|
2717
2722
|
}, e.id);
|
|
2718
|
-
let c =
|
|
2723
|
+
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) => vt(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
|
|
2719
2724
|
return /* @__PURE__ */ n("article", {
|
|
2720
2725
|
role: "listitem",
|
|
2721
2726
|
className: [
|
|
2722
|
-
|
|
2723
|
-
r ?
|
|
2727
|
+
Z.card,
|
|
2728
|
+
r ? Z.selectedCard : "",
|
|
2724
2729
|
p?.(e.original)
|
|
2725
2730
|
].filter(Boolean).join(" "),
|
|
2726
2731
|
style: h?.(e.original),
|
|
2727
2732
|
"aria-selected": k ? r : void 0,
|
|
2728
2733
|
onClick: () => {
|
|
2729
|
-
k &&
|
|
2734
|
+
k && lt(e.id);
|
|
2730
2735
|
},
|
|
2731
2736
|
children: [
|
|
2732
2737
|
o,
|
|
2733
2738
|
s,
|
|
2734
2739
|
/* @__PURE__ */ t("h3", { children: l ? f(l) : `Строка ${e.index + 1}` }),
|
|
2735
2740
|
/* @__PURE__ */ t("dl", { children: c.filter((e) => e !== l && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
|
|
2736
|
-
className: e.mobile?.mobileSpan === 2 ?
|
|
2741
|
+
className: e.mobile?.mobileSpan === 2 ? Z.spanTwo : "",
|
|
2737
2742
|
children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: f(e) })]
|
|
2738
2743
|
}, e.id)) }),
|
|
2739
2744
|
c.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: f(e) }, e.id)),
|
|
2740
2745
|
i && /* @__PURE__ */ t("div", {
|
|
2741
|
-
className:
|
|
2742
|
-
children:
|
|
2746
|
+
className: Z.cardDetail,
|
|
2747
|
+
children: ue?.({
|
|
2743
2748
|
row: e.original,
|
|
2744
2749
|
rowId: e.id,
|
|
2745
|
-
collapse: () =>
|
|
2750
|
+
collapse: () => bt(e.id)
|
|
2746
2751
|
})
|
|
2747
2752
|
})
|
|
2748
2753
|
]
|
|
2749
2754
|
}, e.id);
|
|
2750
2755
|
})]
|
|
2751
2756
|
}),
|
|
2752
|
-
(
|
|
2753
|
-
className:
|
|
2757
|
+
(Xe || Ze && !C && !Ye && Ie.length > 0) && /* @__PURE__ */ n("nav", {
|
|
2758
|
+
className: Z.pagination,
|
|
2754
2759
|
"aria-label": "Пагинация таблицы",
|
|
2755
|
-
children: [
|
|
2756
|
-
className:
|
|
2760
|
+
children: [Ze ? ot("bottom") : /* @__PURE__ */ n("span", {
|
|
2761
|
+
className: Z.paginationRange,
|
|
2757
2762
|
"aria-live": "polite",
|
|
2758
2763
|
children: [
|
|
2759
|
-
nt,
|
|
2760
|
-
"–",
|
|
2761
2764
|
rt,
|
|
2765
|
+
"–",
|
|
2766
|
+
it,
|
|
2762
2767
|
" из ",
|
|
2763
|
-
|
|
2768
|
+
Me
|
|
2764
2769
|
]
|
|
2765
|
-
}),
|
|
2766
|
-
className:
|
|
2770
|
+
}), Xe && /* @__PURE__ */ n("div", {
|
|
2771
|
+
className: Z.paginationControls,
|
|
2767
2772
|
children: [
|
|
2768
2773
|
/* @__PURE__ */ n(A, {
|
|
2769
2774
|
variant: "empty",
|
|
2770
2775
|
size: "md",
|
|
2771
|
-
disabled: C ||
|
|
2776
|
+
disabled: C || Fe === 0,
|
|
2772
2777
|
"aria-label": "Предыдущая страница",
|
|
2773
2778
|
onClick: () => {
|
|
2774
|
-
|
|
2779
|
+
st(Fe - 1);
|
|
2775
2780
|
},
|
|
2776
|
-
children: [/* @__PURE__ */ t(
|
|
2781
|
+
children: [/* @__PURE__ */ t(K, {
|
|
2777
2782
|
name: "IconChevron",
|
|
2778
2783
|
width: 18,
|
|
2779
2784
|
height: 18,
|
|
2780
|
-
className:
|
|
2785
|
+
className: Z.previousIcon
|
|
2781
2786
|
}), /* @__PURE__ */ t("span", {
|
|
2782
|
-
className:
|
|
2787
|
+
className: Z.paginationButtonLabel,
|
|
2783
2788
|
children: "Назад"
|
|
2784
2789
|
})]
|
|
2785
2790
|
}),
|
|
2786
2791
|
/* @__PURE__ */ t("div", {
|
|
2787
|
-
className:
|
|
2788
|
-
children:
|
|
2789
|
-
variant: e ===
|
|
2792
|
+
className: Z.pageNumbers,
|
|
2793
|
+
children: Ke.map((e) => typeof e == "number" ? /* @__PURE__ */ t(A, {
|
|
2794
|
+
variant: e === Fe ? "secondary" : "empty",
|
|
2790
2795
|
size: "md",
|
|
2791
|
-
className:
|
|
2796
|
+
className: Z.pageButton,
|
|
2792
2797
|
"aria-label": `Перейти на страницу ${e + 1}`,
|
|
2793
|
-
"aria-current": e ===
|
|
2798
|
+
"aria-current": e === Fe ? "page" : void 0,
|
|
2794
2799
|
disabled: C,
|
|
2795
2800
|
onClick: () => {
|
|
2796
|
-
|
|
2801
|
+
st(e);
|
|
2797
2802
|
},
|
|
2798
2803
|
children: e + 1
|
|
2799
2804
|
}, e) : /* @__PURE__ */ t("span", {
|
|
2800
|
-
className:
|
|
2805
|
+
className: Z.ellipsis,
|
|
2801
2806
|
"aria-hidden": "true",
|
|
2802
2807
|
children: "…"
|
|
2803
2808
|
}, e))
|
|
@@ -2805,19 +2810,19 @@ var j = {
|
|
|
2805
2810
|
/* @__PURE__ */ n(A, {
|
|
2806
2811
|
variant: "empty",
|
|
2807
2812
|
size: "md",
|
|
2808
|
-
disabled: C ||
|
|
2813
|
+
disabled: C || Fe === Ne - 1,
|
|
2809
2814
|
"aria-label": "Следующая страница",
|
|
2810
2815
|
onClick: () => {
|
|
2811
|
-
|
|
2816
|
+
st(Fe + 1);
|
|
2812
2817
|
},
|
|
2813
2818
|
children: [/* @__PURE__ */ t("span", {
|
|
2814
|
-
className:
|
|
2819
|
+
className: Z.paginationButtonLabel,
|
|
2815
2820
|
children: "Вперёд"
|
|
2816
|
-
}), /* @__PURE__ */ t(
|
|
2821
|
+
}), /* @__PURE__ */ t(K, {
|
|
2817
2822
|
name: "IconChevron",
|
|
2818
2823
|
width: 18,
|
|
2819
2824
|
height: 18,
|
|
2820
|
-
className:
|
|
2825
|
+
className: Z.nextIcon
|
|
2821
2826
|
})]
|
|
2822
2827
|
})
|
|
2823
2828
|
]
|
|
@@ -2825,34 +2830,35 @@ var j = {
|
|
|
2825
2830
|
})
|
|
2826
2831
|
]
|
|
2827
2832
|
});
|
|
2828
|
-
},
|
|
2833
|
+
}, Dt = (e, t) => {
|
|
2829
2834
|
let n = t.trim().toLocaleLowerCase();
|
|
2830
2835
|
return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
|
|
2831
|
-
},
|
|
2836
|
+
}, Ot = (e, t, n) => {
|
|
2832
2837
|
if (!e.length) return -1;
|
|
2833
2838
|
for (let r = 0; r < e.length; r += 1) {
|
|
2834
2839
|
let i = (t + r * n + e.length) % e.length;
|
|
2835
2840
|
if (!e[i]?.disabled) return i;
|
|
2836
2841
|
}
|
|
2837
2842
|
return -1;
|
|
2838
|
-
},
|
|
2839
|
-
wrapper: "
|
|
2840
|
-
control: "
|
|
2841
|
-
inputHost: "
|
|
2842
|
-
sm: "
|
|
2843
|
-
md: "
|
|
2844
|
-
lg: "
|
|
2845
|
-
errorState: "
|
|
2846
|
-
disabledText: "
|
|
2847
|
-
chevron: "
|
|
2848
|
-
chevronOpen: "
|
|
2849
|
-
menu: "
|
|
2850
|
-
menuEmpty: "
|
|
2851
|
-
option: "
|
|
2852
|
-
empty: "
|
|
2853
|
-
selected: "
|
|
2854
|
-
active: "
|
|
2855
|
-
|
|
2843
|
+
}, Q = {
|
|
2844
|
+
wrapper: "_wrapper_1os84_1",
|
|
2845
|
+
control: "_control_1os84_17",
|
|
2846
|
+
inputHost: "_inputHost_1os84_25",
|
|
2847
|
+
sm: "_sm_1os84_41",
|
|
2848
|
+
md: "_md_1os84_57",
|
|
2849
|
+
lg: "_lg_1os84_71",
|
|
2850
|
+
errorState: "_errorState_1os84_85",
|
|
2851
|
+
disabledText: "_disabledText_1os84_93",
|
|
2852
|
+
chevron: "_chevron_1os84_163",
|
|
2853
|
+
chevronOpen: "_chevronOpen_1os84_197",
|
|
2854
|
+
menu: "_menu_1os84_205",
|
|
2855
|
+
menuEmpty: "_menuEmpty_1os84_233",
|
|
2856
|
+
option: "_option_1os84_241",
|
|
2857
|
+
empty: "_empty_1os84_241",
|
|
2858
|
+
selected: "_selected_1os84_321",
|
|
2859
|
+
active: "_active_1os84_321",
|
|
2860
|
+
actionOption: "_actionOption_1os84_341",
|
|
2861
|
+
visuallyHidden: "_visuallyHidden_1os84_375"
|
|
2856
2862
|
}, kt = 8, At = 6, jt = 5, Mt = 10, Nt = {
|
|
2857
2863
|
sm: 30,
|
|
2858
2864
|
md: 40,
|
|
@@ -2862,34 +2868,34 @@ var j = {
|
|
|
2862
2868
|
k,
|
|
2863
2869
|
A,
|
|
2864
2870
|
j
|
|
2865
|
-
].filter(Boolean).join(" "), P = h(null), F = h(null), I = h([]), [L, R] = g(!1), [z, B] = g(""), [V, H] = g(-1), [
|
|
2866
|
-
d(() => B(
|
|
2867
|
-
let
|
|
2871
|
+
].filter(Boolean).join(" "), P = h(null), F = h(null), I = h([]), [L, R] = g(!1), [z, B] = g(""), [V, H] = g(-1), [ne, re] = g(null), ie = m(() => e.find((e) => e.value === r), [e, r]), ae = m(() => Dt(e, z), [e, z]), oe = s && u, se = V >= 0 ? ae[V] : void 0;
|
|
2872
|
+
d(() => B(ie?.label ?? ""), [ie?.label, r]);
|
|
2873
|
+
let ce = l(() => P.current?.querySelector("input") ?? null, []), le = l((e, t) => Ot(ae, e, t), [ae]), ue = l((e) => {
|
|
2868
2874
|
H(e), !(e < 0) && requestAnimationFrame(() => I.current[e]?.scrollIntoView({ block: "nearest" }));
|
|
2869
|
-
}, []),
|
|
2870
|
-
let e =
|
|
2875
|
+
}, []), U = l(() => {
|
|
2876
|
+
let e = ce();
|
|
2871
2877
|
if (!e) return;
|
|
2872
|
-
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(
|
|
2873
|
-
|
|
2878
|
+
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(ae.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;
|
|
2879
|
+
re({
|
|
2874
2880
|
top: u,
|
|
2875
2881
|
left: l,
|
|
2876
2882
|
width: t.width,
|
|
2877
2883
|
maxHeight: s
|
|
2878
2884
|
});
|
|
2879
2885
|
}, [
|
|
2880
|
-
|
|
2881
|
-
|
|
2886
|
+
ae.length,
|
|
2887
|
+
ce,
|
|
2882
2888
|
x
|
|
2883
2889
|
]);
|
|
2884
2890
|
p(() => {
|
|
2885
2891
|
if (!L) {
|
|
2886
|
-
|
|
2892
|
+
re(null);
|
|
2887
2893
|
return;
|
|
2888
2894
|
}
|
|
2889
|
-
return
|
|
2890
|
-
window.removeEventListener("resize",
|
|
2895
|
+
return U(), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
|
|
2896
|
+
window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
|
|
2891
2897
|
};
|
|
2892
|
-
}, [L,
|
|
2898
|
+
}, [L, U]), d(() => {
|
|
2893
2899
|
if (!L) return;
|
|
2894
2900
|
let e = (e) => {
|
|
2895
2901
|
let t = e.target;
|
|
@@ -2897,31 +2903,31 @@ var j = {
|
|
|
2897
2903
|
};
|
|
2898
2904
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
2899
2905
|
}, [L]);
|
|
2900
|
-
let
|
|
2901
|
-
s || c || (R(!0), H(
|
|
2902
|
-
},
|
|
2903
|
-
e.disabled || (B(e.label), R(!1), H(-1), i?.(e.value, e),
|
|
2904
|
-
},
|
|
2906
|
+
let de = () => {
|
|
2907
|
+
s || c || (R(!0), H(le(0, 1)));
|
|
2908
|
+
}, fe = (e) => {
|
|
2909
|
+
e.disabled || (B(e.label), R(!1), H(-1), i?.(e.value, e), ce()?.focus());
|
|
2910
|
+
}, pe = L ? /* @__PURE__ */ t("ul", {
|
|
2905
2911
|
ref: F,
|
|
2906
2912
|
id: O,
|
|
2907
|
-
className: `${
|
|
2913
|
+
className: `${Q.menu} ${ae.length === 0 ? Q.menuEmpty : ""}`,
|
|
2908
2914
|
role: "listbox",
|
|
2909
2915
|
"aria-label": v,
|
|
2910
|
-
style:
|
|
2911
|
-
top:
|
|
2912
|
-
left:
|
|
2913
|
-
width:
|
|
2914
|
-
maxHeight:
|
|
2916
|
+
style: ne ? {
|
|
2917
|
+
top: ne.top,
|
|
2918
|
+
left: ne.left,
|
|
2919
|
+
width: ne.width,
|
|
2920
|
+
maxHeight: ne.maxHeight
|
|
2915
2921
|
} : {
|
|
2916
2922
|
top: 0,
|
|
2917
2923
|
left: 0,
|
|
2918
2924
|
visibility: "hidden",
|
|
2919
2925
|
maxHeight: 0
|
|
2920
2926
|
},
|
|
2921
|
-
children:
|
|
2922
|
-
className: `${
|
|
2927
|
+
children: ae.length === 0 ? /* @__PURE__ */ t("li", {
|
|
2928
|
+
className: `${Q.empty} ${Q[x]}`,
|
|
2923
2929
|
children: o
|
|
2924
|
-
}) :
|
|
2930
|
+
}) : ae.map((e, i) => {
|
|
2925
2931
|
let a = e.value === r, o = i === V;
|
|
2926
2932
|
return /* @__PURE__ */ t("li", {
|
|
2927
2933
|
role: "presentation",
|
|
@@ -2936,17 +2942,19 @@ var j = {
|
|
|
2936
2942
|
disabled: e.disabled,
|
|
2937
2943
|
"aria-disabled": e.disabled,
|
|
2938
2944
|
"aria-selected": a,
|
|
2945
|
+
"data-option-variant": e.variant ?? "default",
|
|
2939
2946
|
className: [
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2947
|
+
Q.option,
|
|
2948
|
+
Q[x],
|
|
2949
|
+
e.variant === "action" ? Q.actionOption : "",
|
|
2950
|
+
a ? Q.selected : "",
|
|
2951
|
+
o ? Q.active : ""
|
|
2944
2952
|
].filter(Boolean).join(" "),
|
|
2945
2953
|
onPointerMove: () => {
|
|
2946
2954
|
e.disabled || H(i);
|
|
2947
2955
|
},
|
|
2948
|
-
onClick: () =>
|
|
2949
|
-
children: [/* @__PURE__ */ t("span", { children: e.label }), a && T && /* @__PURE__ */ t(
|
|
2956
|
+
onClick: () => fe(e),
|
|
2957
|
+
children: [/* @__PURE__ */ t("span", { children: e.label }), a && T && /* @__PURE__ */ t(K, {
|
|
2950
2958
|
name: "IconCheck",
|
|
2951
2959
|
width: 16,
|
|
2952
2960
|
height: 16
|
|
@@ -2958,23 +2966,23 @@ var j = {
|
|
|
2958
2966
|
return /* @__PURE__ */ n("div", {
|
|
2959
2967
|
ref: P,
|
|
2960
2968
|
className: [
|
|
2961
|
-
|
|
2962
|
-
y ?
|
|
2969
|
+
Q.wrapper,
|
|
2970
|
+
y ? Q.errorState : "",
|
|
2963
2971
|
C
|
|
2964
2972
|
].filter(Boolean).join(" "),
|
|
2965
2973
|
children: [
|
|
2966
2974
|
v && /* @__PURE__ */ t(te, {
|
|
2967
|
-
htmlFor:
|
|
2975
|
+
htmlFor: oe ? void 0 : D,
|
|
2968
2976
|
required: S,
|
|
2969
2977
|
disabled: s,
|
|
2970
2978
|
children: v
|
|
2971
2979
|
}),
|
|
2972
|
-
|
|
2973
|
-
className: `${
|
|
2974
|
-
children:
|
|
2980
|
+
oe ? /* @__PURE__ */ t("div", {
|
|
2981
|
+
className: `${Q.disabledText} ${Q[x]}`,
|
|
2982
|
+
children: ie?.label ?? a
|
|
2975
2983
|
}) : /* @__PURE__ */ n("div", {
|
|
2976
|
-
className:
|
|
2977
|
-
children: [/* @__PURE__ */ t(
|
|
2984
|
+
className: Q.control,
|
|
2985
|
+
children: [/* @__PURE__ */ t(rt, {
|
|
2978
2986
|
id: D,
|
|
2979
2987
|
name: ee,
|
|
2980
2988
|
value: z,
|
|
@@ -2985,50 +2993,50 @@ var j = {
|
|
|
2985
2993
|
size: x,
|
|
2986
2994
|
clearable: !1,
|
|
2987
2995
|
autoComplete: "off",
|
|
2988
|
-
className: `${
|
|
2989
|
-
onFocus:
|
|
2996
|
+
className: `${Q.inputHost} ${Q[x]}`,
|
|
2997
|
+
onFocus: de,
|
|
2990
2998
|
onChange: (t) => {
|
|
2991
|
-
let n = String(t), r =
|
|
2992
|
-
B(n), R(!0), H(
|
|
2999
|
+
let n = String(t), r = Dt(e, n);
|
|
3000
|
+
B(n), R(!0), H(Ot(r, 0, 1));
|
|
2993
3001
|
},
|
|
2994
3002
|
role: "combobox",
|
|
2995
3003
|
"aria-autocomplete": "list",
|
|
2996
3004
|
"aria-expanded": L,
|
|
2997
3005
|
"aria-controls": O,
|
|
2998
|
-
"aria-activedescendant":
|
|
3006
|
+
"aria-activedescendant": se ? `${D}-option-${V}` : void 0,
|
|
2999
3007
|
"aria-invalid": !!y,
|
|
3000
3008
|
"aria-describedby": N,
|
|
3001
|
-
onClick:
|
|
3009
|
+
onClick: de,
|
|
3002
3010
|
onKeyDown: (e) => {
|
|
3003
3011
|
if (!(s || c)) {
|
|
3004
3012
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
3005
3013
|
e.preventDefault();
|
|
3006
|
-
let t = e.key === "ArrowDown" ? 1 : -1, n = V >= 0 ? V + t : t === 1 ? 0 :
|
|
3007
|
-
R(!0), le(
|
|
3014
|
+
let t = e.key === "ArrowDown" ? 1 : -1, n = V >= 0 ? V + t : t === 1 ? 0 : ae.length - 1;
|
|
3015
|
+
R(!0), ue(le(n, t));
|
|
3008
3016
|
} else if (e.key === "Home" || e.key === "End") {
|
|
3009
3017
|
if (!L) return;
|
|
3010
3018
|
e.preventDefault();
|
|
3011
3019
|
let t = e.key === "Home" ? 1 : -1;
|
|
3012
|
-
le(
|
|
3013
|
-
} else e.key === "Enter" && L &&
|
|
3020
|
+
ue(le(e.key === "Home" ? 0 : ae.length - 1, t));
|
|
3021
|
+
} else e.key === "Enter" && L && se ? (e.preventDefault(), fe(se)) : e.key === "Escape" && L ? (e.preventDefault(), R(!1), H(-1)) : e.key === "Tab" && (R(!1), H(-1));
|
|
3014
3022
|
}
|
|
3015
3023
|
}
|
|
3016
3024
|
}), /* @__PURE__ */ t("span", {
|
|
3017
|
-
className: `${
|
|
3025
|
+
className: `${Q.chevron} ${L ? Q.chevronOpen : ""}`,
|
|
3018
3026
|
"aria-hidden": "true",
|
|
3019
|
-
children: /* @__PURE__ */ t(
|
|
3027
|
+
children: /* @__PURE__ */ t(K, {
|
|
3020
3028
|
name: "IconChevron",
|
|
3021
3029
|
width: 20,
|
|
3022
3030
|
height: 20
|
|
3023
3031
|
})
|
|
3024
3032
|
})]
|
|
3025
3033
|
}),
|
|
3026
|
-
L && typeof document < "u" && _(
|
|
3034
|
+
L && typeof document < "u" && _(pe, document.body),
|
|
3027
3035
|
/* @__PURE__ */ n("span", {
|
|
3028
3036
|
id: k,
|
|
3029
|
-
className:
|
|
3037
|
+
className: Q.visuallyHidden,
|
|
3030
3038
|
"aria-live": "polite",
|
|
3031
|
-
children: ["Найдено вариантов: ",
|
|
3039
|
+
children: ["Найдено вариантов: ", ae.length]
|
|
3032
3040
|
}),
|
|
3033
3041
|
b && !y && /* @__PURE__ */ t(M, {
|
|
3034
3042
|
id: A,
|
|
@@ -3063,7 +3071,7 @@ var j = {
|
|
|
3063
3071
|
variant: "empty",
|
|
3064
3072
|
onClick: a,
|
|
3065
3073
|
"aria-label": o,
|
|
3066
|
-
children: /* @__PURE__ */ t(
|
|
3074
|
+
children: /* @__PURE__ */ t(K, {
|
|
3067
3075
|
name: "IconCross",
|
|
3068
3076
|
width: 20,
|
|
3069
3077
|
height: 20
|
|
@@ -3101,19 +3109,19 @@ var j = {
|
|
|
3101
3109
|
placeholder: e.placeholder,
|
|
3102
3110
|
disabled: n
|
|
3103
3111
|
};
|
|
3104
|
-
return e.inputType === "number" ? /* @__PURE__ */ t(
|
|
3112
|
+
return e.inputType === "number" ? /* @__PURE__ */ t(rt, {
|
|
3105
3113
|
...r,
|
|
3106
3114
|
type: "number",
|
|
3107
3115
|
value: i ?? "",
|
|
3108
3116
|
onChange: (t) => d(e.id, t)
|
|
3109
|
-
}, e.id) : /* @__PURE__ */ t(
|
|
3117
|
+
}, e.id) : /* @__PURE__ */ t(rt, {
|
|
3110
3118
|
...r,
|
|
3111
3119
|
type: "text",
|
|
3112
3120
|
value: String(i ?? ""),
|
|
3113
3121
|
onChange: (t) => d(e.id, t)
|
|
3114
3122
|
}, e.id);
|
|
3115
3123
|
}
|
|
3116
|
-
if (e.type === "dropdown") return /* @__PURE__ */ t(
|
|
3124
|
+
if (e.type === "dropdown") return /* @__PURE__ */ t($e, {
|
|
3117
3125
|
label: e.label,
|
|
3118
3126
|
hint: e.hint,
|
|
3119
3127
|
placeholder: e.placeholder,
|
|
@@ -3122,7 +3130,7 @@ var j = {
|
|
|
3122
3130
|
disabled: n,
|
|
3123
3131
|
onChange: (t) => d(e.id, t)
|
|
3124
3132
|
}, e.id);
|
|
3125
|
-
if (e.type === "multiple") return /* @__PURE__ */ t(
|
|
3133
|
+
if (e.type === "multiple") return /* @__PURE__ */ t(ct, {
|
|
3126
3134
|
label: e.label,
|
|
3127
3135
|
hint: e.hint,
|
|
3128
3136
|
placeholder: e.placeholder,
|
|
@@ -3131,14 +3139,14 @@ var j = {
|
|
|
3131
3139
|
disabled: n,
|
|
3132
3140
|
onChange: (t) => d(e.id, t)
|
|
3133
3141
|
}, e.id);
|
|
3134
|
-
if (e.type === "checkbox") return /* @__PURE__ */ t(
|
|
3142
|
+
if (e.type === "checkbox") return /* @__PURE__ */ t(we, {
|
|
3135
3143
|
label: e.label,
|
|
3136
3144
|
hint: e.hint,
|
|
3137
3145
|
checked: !!i,
|
|
3138
3146
|
disabled: n,
|
|
3139
3147
|
onChange: (t) => d(e.id, t)
|
|
3140
3148
|
}, e.id);
|
|
3141
|
-
if (e.type === "radio") return /* @__PURE__ */ t(
|
|
3149
|
+
if (e.type === "radio") return /* @__PURE__ */ t(ut, {
|
|
3142
3150
|
label: e.label,
|
|
3143
3151
|
checked: !!i,
|
|
3144
3152
|
disabled: n,
|
|
@@ -3148,7 +3156,7 @@ var j = {
|
|
|
3148
3156
|
from: null,
|
|
3149
3157
|
to: null
|
|
3150
3158
|
};
|
|
3151
|
-
return /* @__PURE__ */ t(
|
|
3159
|
+
return /* @__PURE__ */ t(Ge, {
|
|
3152
3160
|
hint: e.hint,
|
|
3153
3161
|
mode: e.mode,
|
|
3154
3162
|
min: e.min,
|
|
@@ -3297,7 +3305,7 @@ var j = {
|
|
|
3297
3305
|
size: "sm",
|
|
3298
3306
|
"aria-label": `Удалить файл ${e.name}`,
|
|
3299
3307
|
onClick: () => i?.(r.filter((e, t) => t !== a)),
|
|
3300
|
-
children: /* @__PURE__ */ t(
|
|
3308
|
+
children: /* @__PURE__ */ t(K, {
|
|
3301
3309
|
name: "IconCross",
|
|
3302
3310
|
width: 16,
|
|
3303
3311
|
height: 16
|
|
@@ -3324,7 +3332,7 @@ var j = {
|
|
|
3324
3332
|
/* @__PURE__ */ t("span", {
|
|
3325
3333
|
className: Ut.uploadIcon,
|
|
3326
3334
|
"aria-hidden": "true",
|
|
3327
|
-
children: /* @__PURE__ */ t(
|
|
3335
|
+
children: /* @__PURE__ */ t(K, {
|
|
3328
3336
|
name: "IconUpload",
|
|
3329
3337
|
width: 24,
|
|
3330
3338
|
height: 24
|
|
@@ -3490,7 +3498,7 @@ function $t({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3490
3498
|
className: Xt.clearAction,
|
|
3491
3499
|
"aria-label": "Очистить поле",
|
|
3492
3500
|
onClick: R,
|
|
3493
|
-
children: /* @__PURE__ */ t(
|
|
3501
|
+
children: /* @__PURE__ */ t(K, {
|
|
3494
3502
|
name: "IconCross",
|
|
3495
3503
|
width: 20,
|
|
3496
3504
|
height: 20
|
|
@@ -3651,7 +3659,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3651
3659
|
size: "sm",
|
|
3652
3660
|
"aria-label": o,
|
|
3653
3661
|
onClick: E,
|
|
3654
|
-
children: /* @__PURE__ */ t(
|
|
3662
|
+
children: /* @__PURE__ */ t(K, {
|
|
3655
3663
|
name: "IconCross",
|
|
3656
3664
|
width: 24,
|
|
3657
3665
|
height: 24
|
|
@@ -3915,7 +3923,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3915
3923
|
"aria-label": v,
|
|
3916
3924
|
disabled: g,
|
|
3917
3925
|
onClick: () => w("close-button"),
|
|
3918
|
-
children: /* @__PURE__ */ t(
|
|
3926
|
+
children: /* @__PURE__ */ t(K, {
|
|
3919
3927
|
name: "IconCross",
|
|
3920
3928
|
width: 20,
|
|
3921
3929
|
height: 20
|
|
@@ -4035,7 +4043,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4035
4043
|
/* @__PURE__ */ t("div", {
|
|
4036
4044
|
className: Vn.icon,
|
|
4037
4045
|
"aria-hidden": "true",
|
|
4038
|
-
children: /* @__PURE__ */ t(
|
|
4046
|
+
children: /* @__PURE__ */ t(K, {
|
|
4039
4047
|
name: Hn[e.variant],
|
|
4040
4048
|
color: "var(--ds-toast-accent)",
|
|
4041
4049
|
width: 20,
|
|
@@ -4068,7 +4076,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4068
4076
|
size: "sm",
|
|
4069
4077
|
"aria-label": "Закрыть уведомление",
|
|
4070
4078
|
onClick: () => r(e.id),
|
|
4071
|
-
children: /* @__PURE__ */ t(
|
|
4079
|
+
children: /* @__PURE__ */ t(K, {
|
|
4072
4080
|
name: "IconCross",
|
|
4073
4081
|
width: 20,
|
|
4074
4082
|
height: 20
|
|
@@ -4296,29 +4304,29 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4296
4304
|
1.5,
|
|
4297
4305
|
2
|
|
4298
4306
|
], 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 }) => {
|
|
4299
|
-
let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, ee] = g(!1), [w, T] = g(r.length > 0), [E, D] = g(!1), [k, j] = g(!1), [te, M] = g(!1), [N, P] = g(0), [F, I] = g(0), [L, R] = g(0), [z, B] = g(1), [V, H] = g(!!v.muted), [
|
|
4307
|
+
let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, ee] = g(!1), [w, T] = g(r.length > 0), [E, D] = g(!1), [k, j] = g(!1), [te, M] = g(!1), [N, P] = g(0), [F, I] = g(0), [L, R] = g(0), [z, B] = g(1), [V, H] = g(!!v.muted), [ne, re] = g(1), [ie, ae] = g(!!v.loop), [oe, se] = g(-1), [ce, le] = g(!1), [ue, U] = g(!0), [de, fe] = g(!1), [pe, W] = g(!1), me = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), he = i.map((e, t) => ({
|
|
4300
4308
|
track: e,
|
|
4301
4309
|
index: t
|
|
4302
|
-
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"),
|
|
4303
|
-
|
|
4304
|
-
}, [k,
|
|
4310
|
+
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), ge = u ?? (C ? "Не удалось воспроизвести видео" : void 0), _e = c || w && !ge && r.length > 0, ve = !_e && !ge && r.length === 0, ye = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, be = l(() => {
|
|
4311
|
+
U(!0), window.clearTimeout(S.current), k && !ce && (S.current = window.setTimeout(() => U(!1), er));
|
|
4312
|
+
}, [k, ce]);
|
|
4305
4313
|
d(() => {
|
|
4306
4314
|
ee(!1), T(r.length > 0), D(!1), j(!1), M(!1), P(0), I(0), R(0);
|
|
4307
|
-
}, [
|
|
4308
|
-
let e = () =>
|
|
4315
|
+
}, [me, r.length]), d(() => (be(), () => window.clearTimeout(S.current)), [be]), d(() => {
|
|
4316
|
+
let e = () => fe(document.fullscreenElement === b.current), t = () => W(document.pictureInPictureElement === x.current);
|
|
4309
4317
|
return document.addEventListener("fullscreenchange", e), document.addEventListener("enterpictureinpicture", t), document.addEventListener("leavepictureinpicture", t), () => {
|
|
4310
4318
|
document.removeEventListener("fullscreenchange", e), document.removeEventListener("enterpictureinpicture", t), document.removeEventListener("leavepictureinpicture", t);
|
|
4311
4319
|
};
|
|
4312
4320
|
}, []), d(() => {
|
|
4313
|
-
if (!
|
|
4321
|
+
if (!ce) return;
|
|
4314
4322
|
let e = (e) => {
|
|
4315
|
-
y.current?.contains(e.target) ||
|
|
4323
|
+
y.current?.contains(e.target) || le(!1);
|
|
4316
4324
|
};
|
|
4317
4325
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
4318
|
-
}, [
|
|
4319
|
-
let
|
|
4326
|
+
}, [ce]);
|
|
4327
|
+
let xe = async () => {
|
|
4320
4328
|
let e = x.current;
|
|
4321
|
-
if (!(!e ||
|
|
4329
|
+
if (!(!e || ge || _e)) {
|
|
4322
4330
|
if (e.paused || e.ended) {
|
|
4323
4331
|
e.ended && (e.currentTime = 0);
|
|
4324
4332
|
try {
|
|
@@ -4328,60 +4336,60 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4328
4336
|
}
|
|
4329
4337
|
} else e.pause();
|
|
4330
4338
|
}
|
|
4331
|
-
},
|
|
4339
|
+
}, G = () => {
|
|
4332
4340
|
let e = x.current;
|
|
4333
4341
|
e && (e.muted = !e.muted);
|
|
4334
|
-
},
|
|
4342
|
+
}, Se = (e) => {
|
|
4335
4343
|
let t = x.current;
|
|
4336
4344
|
t && (t.volume = Math.min(1, Math.max(0, e)), t.muted = t.volume === 0);
|
|
4337
|
-
},
|
|
4345
|
+
}, Ce = (e) => {
|
|
4338
4346
|
let t = x.current;
|
|
4339
4347
|
!t || !F || (t.currentTime = Math.min(F, Math.max(0, e)), P(t.currentTime));
|
|
4340
|
-
},
|
|
4348
|
+
}, we = async () => {
|
|
4341
4349
|
if (b.current) try {
|
|
4342
4350
|
document.fullscreenElement ? await document.exitFullscreen() : await b.current.requestFullscreen();
|
|
4343
4351
|
} catch {
|
|
4344
|
-
|
|
4352
|
+
fe(!1);
|
|
4345
4353
|
}
|
|
4346
|
-
},
|
|
4354
|
+
}, q = async () => {
|
|
4347
4355
|
let e = x.current;
|
|
4348
|
-
if (!(!e || !
|
|
4356
|
+
if (!(!e || !ye)) try {
|
|
4349
4357
|
document.pictureInPictureElement ? await document.exitPictureInPicture() : await e.requestPictureInPicture();
|
|
4350
4358
|
} catch {
|
|
4351
|
-
|
|
4359
|
+
W(!1);
|
|
4352
4360
|
}
|
|
4353
|
-
},
|
|
4361
|
+
}, Te = (e) => {
|
|
4354
4362
|
let t = x.current;
|
|
4355
4363
|
t && (Array.from(t.textTracks).forEach((t, n) => {
|
|
4356
4364
|
t.mode = n === e ? "showing" : "disabled";
|
|
4357
|
-
}),
|
|
4358
|
-
},
|
|
4365
|
+
}), se(e));
|
|
4366
|
+
}, Ee = (e) => {
|
|
4359
4367
|
let t = e.target;
|
|
4360
4368
|
if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
|
|
4361
4369
|
let n = e.key.toLowerCase();
|
|
4362
|
-
n === " " || n === "k" ? (e.preventDefault(),
|
|
4363
|
-
},
|
|
4370
|
+
n === " " || n === "k" ? (e.preventDefault(), xe()) : n === "m" ? (e.preventDefault(), G()) : n === "f" ? (e.preventDefault(), we()) : n === "c" && he.length ? (e.preventDefault(), Te(oe === -1 ? he[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Ce(N + (e.key === "ArrowRight" ? tr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), Se(z + (e.key === "ArrowUp" ? nr : -.05))) : e.key === "Escape" && le(!1), be();
|
|
4371
|
+
}, J = () => {
|
|
4364
4372
|
let e = x.current;
|
|
4365
4373
|
ee(!1), T(!0), e?.load();
|
|
4366
|
-
},
|
|
4374
|
+
}, Y = {
|
|
4367
4375
|
"--video-progress": `${F ? N / F * 100 : 0}%`,
|
|
4368
4376
|
"--video-buffered": `${L * 100}%`
|
|
4369
4377
|
};
|
|
4370
4378
|
return /* @__PURE__ */ n("figure", {
|
|
4371
4379
|
ref: y,
|
|
4372
4380
|
className: `${$.root} ${p}`,
|
|
4373
|
-
onKeyDown:
|
|
4381
|
+
onKeyDown: Ee,
|
|
4374
4382
|
children: [/* @__PURE__ */ n("div", {
|
|
4375
4383
|
ref: b,
|
|
4376
|
-
className: `${$.frame} ${
|
|
4384
|
+
className: `${$.frame} ${de ? $.fullscreen : ""}`,
|
|
4377
4385
|
style: { aspectRatio: o },
|
|
4378
|
-
"aria-busy":
|
|
4386
|
+
"aria-busy": _e || void 0,
|
|
4379
4387
|
tabIndex: m && r.length ? 0 : void 0,
|
|
4380
|
-
onPointerMove:
|
|
4381
|
-
onPointerDown:
|
|
4382
|
-
onFocusCapture:
|
|
4388
|
+
onPointerMove: be,
|
|
4389
|
+
onPointerDown: be,
|
|
4390
|
+
onFocusCapture: be,
|
|
4383
4391
|
onMouseLeave: () => {
|
|
4384
|
-
k && !
|
|
4392
|
+
k && !ce && U(!1);
|
|
4385
4393
|
},
|
|
4386
4394
|
children: [
|
|
4387
4395
|
r.length > 0 && /* @__PURE__ */ n("video", {
|
|
@@ -4390,22 +4398,22 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4390
4398
|
"aria-label": a,
|
|
4391
4399
|
controls: !1,
|
|
4392
4400
|
playsInline: _,
|
|
4393
|
-
loop:
|
|
4401
|
+
loop: ie,
|
|
4394
4402
|
className: $.video,
|
|
4395
4403
|
style: { objectFit: s },
|
|
4396
4404
|
onClick: (e) => {
|
|
4397
|
-
v.onClick?.(e),
|
|
4405
|
+
v.onClick?.(e), xe();
|
|
4398
4406
|
},
|
|
4399
4407
|
onDoubleClick: (e) => {
|
|
4400
|
-
v.onDoubleClick?.(e),
|
|
4408
|
+
v.onDoubleClick?.(e), we();
|
|
4401
4409
|
},
|
|
4402
4410
|
onLoadStart: (e) => {
|
|
4403
4411
|
T(!0), v.onLoadStart?.(e);
|
|
4404
4412
|
},
|
|
4405
4413
|
onLoadedMetadata: (e) => {
|
|
4406
4414
|
I(e.currentTarget.duration || 0);
|
|
4407
|
-
let t =
|
|
4408
|
-
|
|
4415
|
+
let t = he.find(({ track: e }) => e.default);
|
|
4416
|
+
Te(t?.index ?? -1), v.onLoadedMetadata?.(e);
|
|
4409
4417
|
},
|
|
4410
4418
|
onDurationChange: (e) => {
|
|
4411
4419
|
I(e.currentTarget.duration || 0), v.onDurationChange?.(e);
|
|
@@ -4436,20 +4444,20 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4436
4444
|
j(!1), v.onPause?.(e);
|
|
4437
4445
|
},
|
|
4438
4446
|
onEnded: (e) => {
|
|
4439
|
-
j(!1), M(!0),
|
|
4447
|
+
j(!1), M(!0), U(!0), v.onEnded?.(e);
|
|
4440
4448
|
},
|
|
4441
4449
|
onVolumeChange: (e) => {
|
|
4442
4450
|
B(e.currentTarget.volume), H(e.currentTarget.muted), v.onVolumeChange?.(e);
|
|
4443
4451
|
},
|
|
4444
4452
|
onRateChange: (e) => {
|
|
4445
|
-
|
|
4453
|
+
re(e.currentTarget.playbackRate), v.onRateChange?.(e);
|
|
4446
4454
|
},
|
|
4447
4455
|
onError: (e) => {
|
|
4448
4456
|
T(!1), D(!1), ee(!0), v.onError?.(e);
|
|
4449
4457
|
},
|
|
4450
4458
|
children: [r.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), i.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
|
|
4451
4459
|
}),
|
|
4452
|
-
|
|
4460
|
+
_e && /* @__PURE__ */ n("div", {
|
|
4453
4461
|
className: $.overlay,
|
|
4454
4462
|
role: "status",
|
|
4455
4463
|
"aria-live": "polite",
|
|
@@ -4462,17 +4470,17 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4462
4470
|
})
|
|
4463
4471
|
}), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
|
|
4464
4472
|
}),
|
|
4465
|
-
!
|
|
4473
|
+
!_e && E && !ge && /* @__PURE__ */ t("div", {
|
|
4466
4474
|
className: $.buffering,
|
|
4467
4475
|
role: "status",
|
|
4468
4476
|
"aria-label": "Буферизация видео",
|
|
4469
4477
|
children: /* @__PURE__ */ t(O, { variant: "primary" })
|
|
4470
4478
|
}),
|
|
4471
|
-
|
|
4479
|
+
ve && /* @__PURE__ */ n("div", {
|
|
4472
4480
|
className: `${$.state} ${$.empty}`,
|
|
4473
4481
|
role: "status",
|
|
4474
4482
|
children: [
|
|
4475
|
-
/* @__PURE__ */ t(
|
|
4483
|
+
/* @__PURE__ */ t(K, {
|
|
4476
4484
|
name: "IconInfoCircle",
|
|
4477
4485
|
className: $.stateIcon,
|
|
4478
4486
|
width: 40,
|
|
@@ -4482,46 +4490,46 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4482
4490
|
f ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
|
|
4483
4491
|
]
|
|
4484
4492
|
}),
|
|
4485
|
-
!
|
|
4493
|
+
!_e && ge && /* @__PURE__ */ n("div", {
|
|
4486
4494
|
className: `${$.state} ${$.error}`,
|
|
4487
4495
|
role: "alert",
|
|
4488
4496
|
children: [
|
|
4489
|
-
/* @__PURE__ */ t(
|
|
4497
|
+
/* @__PURE__ */ t(K, {
|
|
4490
4498
|
name: "IconWarning",
|
|
4491
4499
|
className: $.stateIcon,
|
|
4492
4500
|
width: 40,
|
|
4493
4501
|
height: 40
|
|
4494
4502
|
}),
|
|
4495
|
-
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children:
|
|
4503
|
+
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: ge })] }),
|
|
4496
4504
|
r.length > 0 && /* @__PURE__ */ t(A, {
|
|
4497
4505
|
size: "sm",
|
|
4498
4506
|
variant: "secondary",
|
|
4499
|
-
onClick:
|
|
4507
|
+
onClick: J,
|
|
4500
4508
|
children: "Повторить"
|
|
4501
4509
|
})
|
|
4502
4510
|
]
|
|
4503
4511
|
}),
|
|
4504
|
-
!
|
|
4512
|
+
!_e && !ge && te && /* @__PURE__ */ t("button", {
|
|
4505
4513
|
type: "button",
|
|
4506
4514
|
className: $.replay,
|
|
4507
4515
|
"aria-label": "Воспроизвести заново",
|
|
4508
|
-
onClick: () => void
|
|
4509
|
-
children: /* @__PURE__ */ t(
|
|
4516
|
+
onClick: () => void xe(),
|
|
4517
|
+
children: /* @__PURE__ */ t(K, {
|
|
4510
4518
|
name: "IconReplay",
|
|
4511
4519
|
width: 28,
|
|
4512
4520
|
height: 28
|
|
4513
4521
|
})
|
|
4514
4522
|
}),
|
|
4515
|
-
m && r.length > 0 && !
|
|
4516
|
-
className: `${$.controlsLayer} ${
|
|
4523
|
+
m && r.length > 0 && !_e && !ge && /* @__PURE__ */ n("div", {
|
|
4524
|
+
className: `${$.controlsLayer} ${ue || !k ? $.controlsVisible : ""}`,
|
|
4517
4525
|
onClick: (e) => e.stopPropagation(),
|
|
4518
|
-
children: [
|
|
4526
|
+
children: [ce && /* @__PURE__ */ n("div", {
|
|
4519
4527
|
className: $.settings,
|
|
4520
4528
|
role: "dialog",
|
|
4521
4529
|
"aria-label": "Настройки видео",
|
|
4522
4530
|
children: [
|
|
4523
4531
|
/* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Скорость" }), /* @__PURE__ */ t("select", {
|
|
4524
|
-
value:
|
|
4532
|
+
value: ne,
|
|
4525
4533
|
onChange: (e) => {
|
|
4526
4534
|
let t = Number(e.target.value);
|
|
4527
4535
|
x.current && (x.current.playbackRate = t);
|
|
@@ -4531,13 +4539,13 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4531
4539
|
children: [e, "×"]
|
|
4532
4540
|
}, e))
|
|
4533
4541
|
})] }),
|
|
4534
|
-
|
|
4535
|
-
value:
|
|
4536
|
-
onChange: (e) =>
|
|
4542
|
+
he.length > 0 && /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Субтитры" }), /* @__PURE__ */ n("select", {
|
|
4543
|
+
value: oe,
|
|
4544
|
+
onChange: (e) => Te(Number(e.target.value)),
|
|
4537
4545
|
children: [/* @__PURE__ */ t("option", {
|
|
4538
4546
|
value: -1,
|
|
4539
4547
|
children: "Выключены"
|
|
4540
|
-
}),
|
|
4548
|
+
}), he.map(({ track: e, index: n }) => /* @__PURE__ */ t("option", {
|
|
4541
4549
|
value: n,
|
|
4542
4550
|
children: e.label
|
|
4543
4551
|
}, `${e.srcLang}-${e.label}`))]
|
|
@@ -4545,18 +4553,18 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4545
4553
|
/* @__PURE__ */ n("button", {
|
|
4546
4554
|
type: "button",
|
|
4547
4555
|
className: $.settingsAction,
|
|
4548
|
-
"aria-pressed":
|
|
4549
|
-
onClick: () =>
|
|
4550
|
-
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children:
|
|
4556
|
+
"aria-pressed": ie,
|
|
4557
|
+
onClick: () => ae((e) => !e),
|
|
4558
|
+
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: ie ? "Вкл." : "Выкл." })]
|
|
4551
4559
|
}),
|
|
4552
|
-
|
|
4560
|
+
ye && /* @__PURE__ */ t("button", {
|
|
4553
4561
|
type: "button",
|
|
4554
4562
|
className: $.settingsAction,
|
|
4555
|
-
"aria-pressed":
|
|
4556
|
-
onClick: () => void
|
|
4563
|
+
"aria-pressed": pe,
|
|
4564
|
+
onClick: () => void q(),
|
|
4557
4565
|
children: /* @__PURE__ */ n("span", {
|
|
4558
4566
|
className: $.settingsActionLabel,
|
|
4559
|
-
children: [/* @__PURE__ */ t(
|
|
4567
|
+
children: [/* @__PURE__ */ t(K, {
|
|
4560
4568
|
name: "IconPictureInPicture",
|
|
4561
4569
|
width: 18,
|
|
4562
4570
|
height: 18
|
|
@@ -4574,8 +4582,8 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4574
4582
|
className: `${$.controlButton} ${$.playButton}`,
|
|
4575
4583
|
"aria-label": k ? "Пауза" : "Воспроизвести",
|
|
4576
4584
|
title: k ? "Пауза (K)" : "Воспроизвести (K)",
|
|
4577
|
-
onClick: () => void
|
|
4578
|
-
children: /* @__PURE__ */ t(
|
|
4585
|
+
onClick: () => void xe(),
|
|
4586
|
+
children: /* @__PURE__ */ t(K, {
|
|
4579
4587
|
name: k ? "IconPause" : "IconPlay",
|
|
4580
4588
|
width: 24,
|
|
4581
4589
|
height: 24
|
|
@@ -4590,8 +4598,8 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4590
4598
|
"aria-label": V ? "Включить звук" : "Выключить звук",
|
|
4591
4599
|
"aria-pressed": V,
|
|
4592
4600
|
title: "Звук (M)",
|
|
4593
|
-
onClick:
|
|
4594
|
-
children: /* @__PURE__ */ t(
|
|
4601
|
+
onClick: G,
|
|
4602
|
+
children: /* @__PURE__ */ t(K, {
|
|
4595
4603
|
name: V || z === 0 ? "IconVolumeMuted" : "IconVolume",
|
|
4596
4604
|
width: 22,
|
|
4597
4605
|
height: 22
|
|
@@ -4605,7 +4613,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4605
4613
|
value: V ? 0 : z,
|
|
4606
4614
|
"aria-label": "Громкость",
|
|
4607
4615
|
"aria-valuetext": `${Math.round((V ? 0 : z) * 100)}%`,
|
|
4608
|
-
onChange: (e) =>
|
|
4616
|
+
onChange: (e) => Se(Number(e.target.value))
|
|
4609
4617
|
})]
|
|
4610
4618
|
}),
|
|
4611
4619
|
/* @__PURE__ */ n("div", {
|
|
@@ -4617,7 +4625,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4617
4625
|
}),
|
|
4618
4626
|
/* @__PURE__ */ t("input", {
|
|
4619
4627
|
className: $.timeline,
|
|
4620
|
-
style:
|
|
4628
|
+
style: Y,
|
|
4621
4629
|
type: "range",
|
|
4622
4630
|
min: 0,
|
|
4623
4631
|
max: F || 0,
|
|
@@ -4625,7 +4633,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4625
4633
|
value: Math.min(N, F || 0),
|
|
4626
4634
|
"aria-label": "Позиция воспроизведения",
|
|
4627
4635
|
"aria-valuetext": `${$n(N)} из ${$n(F)}`,
|
|
4628
|
-
onChange: (e) =>
|
|
4636
|
+
onChange: (e) => Ce(Number(e.target.value))
|
|
4629
4637
|
}),
|
|
4630
4638
|
/* @__PURE__ */ t("span", {
|
|
4631
4639
|
className: $.time,
|
|
@@ -4639,10 +4647,10 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4639
4647
|
type: "button",
|
|
4640
4648
|
className: $.controlButton,
|
|
4641
4649
|
"aria-label": "Настройки",
|
|
4642
|
-
"aria-expanded":
|
|
4650
|
+
"aria-expanded": ce,
|
|
4643
4651
|
title: "Настройки",
|
|
4644
|
-
onClick: () =>
|
|
4645
|
-
children: /* @__PURE__ */ t(
|
|
4652
|
+
onClick: () => le((e) => !e),
|
|
4653
|
+
children: /* @__PURE__ */ t(K, {
|
|
4646
4654
|
name: "IconSettings",
|
|
4647
4655
|
width: 22,
|
|
4648
4656
|
height: 22
|
|
@@ -4650,11 +4658,11 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4650
4658
|
}), /* @__PURE__ */ t("button", {
|
|
4651
4659
|
type: "button",
|
|
4652
4660
|
className: $.controlButton,
|
|
4653
|
-
"aria-label":
|
|
4661
|
+
"aria-label": de ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
|
|
4654
4662
|
title: "Полноэкранный режим (F)",
|
|
4655
|
-
onClick: () => void
|
|
4656
|
-
children: /* @__PURE__ */ t(
|
|
4657
|
-
name:
|
|
4663
|
+
onClick: () => void we(),
|
|
4664
|
+
children: /* @__PURE__ */ t(K, {
|
|
4665
|
+
name: de ? "IconFullscreenExit" : "IconFullscreen",
|
|
4658
4666
|
width: 22,
|
|
4659
4667
|
height: 22
|
|
4660
4668
|
})
|
|
@@ -4754,7 +4762,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4754
4762
|
}), /* @__PURE__ */ t("span", {
|
|
4755
4763
|
className: ar.icon,
|
|
4756
4764
|
"aria-hidden": "true",
|
|
4757
|
-
children: /* @__PURE__ */ t(
|
|
4765
|
+
children: /* @__PURE__ */ t(K, {
|
|
4758
4766
|
name: "IconChevron",
|
|
4759
4767
|
width: 20,
|
|
4760
4768
|
height: 20
|
|
@@ -4996,4 +5004,4 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4996
5004
|
});
|
|
4997
5005
|
};
|
|
4998
5006
|
//#endregion
|
|
4999
|
-
export { xn as ConfirmModal, sr as DSAccordion, ee as DSBadge, fr as DSBottomNavigation, Ln as DSBottomSheet, A as DSButton,
|
|
5007
|
+
export { xn as ConfirmModal, sr as DSAccordion, ee as DSBadge, fr as DSBottomNavigation, Ln as DSBottomSheet, A as DSButton, we as DSCheckbox, E as DSCounterBadge, Et as DSDataTable, Ge as DSDateRange, He as DSDateTimePicker, In as DSDrawer, $e as DSDropDown, ct as DSDropDownMultiple, te as DSFieldLabel, M as DSFieldMessage, qt as DSFileInput, Rt as DSFilters, Yt as DSFloatingMenu, Bt as DSFormGrid, Vt as DSFormGridItem, Rn as DSFullscreenDialog, K as DSIcon, It as DSInfoBlock, rt as DSInput, O as DSLoader, hn as DSModal, mn as DSModalFrame, ur as DSNavigationSurface, Fn as DSOverlay, Bn as DSPageLoader, Jt as DSPortal, ut as DSRadioButton, Pt as DSSearchDropDown, qe as DSSkeleton, tt 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, T as formatDSCounterValue, Oe as formatDateInputValue, Pe as formatDateTimeLocalValue, or as getDSAccordionScrollTarget, mt as getDSDataTableColumnStyle, gt as getDSDataTablePaginationItems, ht as getDSDataTableStickyColumnStyle, Tn as getErrorMessage, pt as getNextDSDataTablePageSelection, Ze as getNextEnabledOptionIndex, je as isValidDateInputPrefix, We as isValidDateRange, ke as maskDateInputValue, Me as parseDateInputValue, Fe 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, _t as validateDSDataTableData };
|