@efficiency-point/design-system 0.0.29 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -153,23 +153,24 @@ var T = {
153
153
  ]
154
154
  });
155
155
  }, A = {
156
- wrapper: "_wrapper_qvnxe_1",
157
- trigger: "_trigger_qvnxe_17",
158
- nav: "_nav_qvnxe_53",
159
- day: "_day_qvnxe_55",
160
- monthSelect: "_monthSelect_qvnxe_57",
161
- yearInput: "_yearInput_qvnxe_59",
162
- timeInput: "_timeInput_qvnxe_61",
163
- value: "_value_qvnxe_85",
164
- placeholder: "_placeholder_qvnxe_93",
165
- error: "_error_qvnxe_101",
166
- panel: "_panel_qvnxe_109",
167
- calendarHeader: "_calendarHeader_qvnxe_135",
168
- weekdays: "_weekdays_qvnxe_225",
169
- days: "_days_qvnxe_227",
170
- outside: "_outside_qvnxe_263",
171
- selected: "_selected_qvnxe_271",
172
- timeLabel: "_timeLabel_qvnxe_291"
156
+ wrapper: "_wrapper_nwuhv_1",
157
+ trigger: "_trigger_nwuhv_17",
158
+ lg: "_lg_nwuhv_51",
159
+ nav: "_nav_nwuhv_63",
160
+ day: "_day_nwuhv_65",
161
+ monthSelect: "_monthSelect_nwuhv_67",
162
+ yearInput: "_yearInput_nwuhv_69",
163
+ timeInput: "_timeInput_nwuhv_71",
164
+ value: "_value_nwuhv_95",
165
+ placeholder: "_placeholder_nwuhv_103",
166
+ error: "_error_nwuhv_111",
167
+ panel: "_panel_nwuhv_119",
168
+ calendarHeader: "_calendarHeader_nwuhv_145",
169
+ weekdays: "_weekdays_nwuhv_235",
170
+ days: "_days_nwuhv_237",
171
+ outside: "_outside_nwuhv_273",
172
+ selected: "_selected_nwuhv_281",
173
+ timeLabel: "_timeLabel_nwuhv_301"
173
174
  }, j = [
174
175
  "Пн",
175
176
  "Вт",
@@ -220,50 +221,50 @@ var T = {
220
221
  }, ee = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), te = (e, t, n) => {
221
222
  let r = P(e).getTime();
222
223
  return !!(t && r < P(t).getTime() || n && r > P(n).getTime());
223
- }, z = 8, ne = 6, B = ({ value: r, onChange: i, mode: a = "date", label: m, placeholder: h, hint: g, error: _, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, id: C, name: w, className: T = "" }) => {
224
- let O = c(), k = C ?? `ds-date-time-${w ?? O}`, N = g ? `${k}-hint` : void 0, P = _ ? `${k}-error` : void 0, B = d(null), re = d(null), ie = d(null), [V, H] = f(!1), [U, W] = f(r ?? /* @__PURE__ */ new Date()), [G, ae] = f(F(r, "time")), [oe, se] = f(null), ce = u(() => R(U), [U]), le = a !== "time", ue = a !== "date";
224
+ }, z = 8, ne = 6, B = ({ value: r, onChange: i, mode: a = "date", label: m, placeholder: h, hint: g, error: _, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: w, name: T, className: O = "" }) => {
225
+ let k = c(), N = w ?? `ds-date-time-${T ?? k}`, P = g ? `${N}-hint` : void 0, B = _ ? `${N}-error` : void 0, V = d(null), H = d(null), re = d(null), [U, W] = f(!1), [G, K] = f(r ?? /* @__PURE__ */ new Date()), [ie, ae] = f(F(r, "time")), [q, oe] = f(null), se = u(() => R(G), [G]), ce = a !== "time", le = a !== "date";
225
226
  s(() => {
226
- r && W(r), ae(F(r, "time"));
227
+ r && K(r), ae(F(r, "time"));
227
228
  }, [r]);
228
- let K = o(() => {
229
- let e = re.current, t = ie.current;
229
+ let J = o(() => {
230
+ let e = H.current, t = re.current;
230
231
  if (!e || !t) return;
231
232
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - z, o = n.top - z, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(z, n.top - r.height - ne) : n.bottom + ne, u = n.left, d = i - r.width - z;
232
- se({
233
+ oe({
233
234
  top: l,
234
235
  left: Math.max(z, Math.min(u, d)),
235
236
  maxHeight: c
236
237
  });
237
238
  }, []);
238
239
  l(() => {
239
- if (!V) {
240
- se(null);
240
+ if (!U) {
241
+ oe(null);
241
242
  return;
242
243
  }
243
- return K(), window.addEventListener("resize", K), window.addEventListener("scroll", K, !0), () => {
244
- window.removeEventListener("resize", K), window.removeEventListener("scroll", K, !0);
244
+ return J(), window.addEventListener("resize", J), window.addEventListener("scroll", J, !0), () => {
245
+ window.removeEventListener("resize", J), window.removeEventListener("scroll", J, !0);
245
246
  };
246
247
  }, [
247
- V,
248
- K,
249
248
  U,
250
- G
249
+ J,
250
+ G,
251
+ ie
251
252
  ]), s(() => {
252
- if (!V) return;
253
+ if (!U) return;
253
254
  let e = (e) => {
254
- let t = e.target, n = B.current?.contains(t), r = ie.current?.contains(t);
255
- !n && !r && H(!1);
255
+ let t = e.target, n = V.current?.contains(t), r = re.current?.contains(t);
256
+ !n && !r && W(!1);
256
257
  }, t = (e) => {
257
- e.key === "Escape" && (H(!1), re.current?.focus());
258
+ e.key === "Escape" && (W(!1), H.current?.focus());
258
259
  };
259
260
  return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
260
261
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
261
262
  };
262
- }, [V]);
263
- let q = (e) => {
263
+ }, [U]);
264
+ let ue = (e) => {
264
265
  if (te(e, x, S)) return;
265
266
  let t = new Date(e);
266
- t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && H(!1);
267
+ t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && W(!1);
267
268
  }, de = (e) => {
268
269
  if (ae(e), !e) {
269
270
  i?.(null);
@@ -271,23 +272,23 @@ var T = {
271
272
  }
272
273
  let t = I(e, "time");
273
274
  if (!t) return;
274
- let n = new Date(a === "datetime" ? r ?? U : /* @__PURE__ */ new Date());
275
+ let n = new Date(a === "datetime" ? r ?? G : /* @__PURE__ */ new Date());
275
276
  n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
276
- }, fe = h ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), pe = [N, P].filter(Boolean).join(" ") || void 0, me = V && !y ? /* @__PURE__ */ n("div", {
277
- ref: ie,
277
+ }, fe = h ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), pe = [P, B].filter(Boolean).join(" ") || void 0, me = U && !y ? /* @__PURE__ */ n("div", {
278
+ ref: re,
278
279
  className: A.panel,
279
280
  role: "dialog",
280
281
  "aria-label": m ?? fe,
281
- style: oe ? {
282
- top: oe.top,
283
- left: oe.left,
284
- maxHeight: oe.maxHeight
282
+ style: q ? {
283
+ top: q.top,
284
+ left: q.left,
285
+ maxHeight: q.maxHeight
285
286
  } : {
286
287
  visibility: "hidden",
287
288
  top: 0,
288
289
  left: 0
289
290
  },
290
- children: [le && /* @__PURE__ */ n(e, { children: [
291
+ children: [ce && /* @__PURE__ */ n(e, { children: [
291
292
  /* @__PURE__ */ n("div", {
292
293
  className: A.calendarHeader,
293
294
  children: [
@@ -295,14 +296,14 @@ var T = {
295
296
  type: "button",
296
297
  className: A.nav,
297
298
  "aria-label": "Предыдущий месяц",
298
- onClick: () => W(new Date(U.getFullYear(), U.getMonth() - 1, 1)),
299
+ onClick: () => K(new Date(G.getFullYear(), G.getMonth() - 1, 1)),
299
300
  children: "‹"
300
301
  }),
301
302
  /* @__PURE__ */ t("select", {
302
303
  className: A.monthSelect,
303
304
  "aria-label": "Месяц",
304
- value: U.getMonth(),
305
- onChange: (e) => W(new Date(U.getFullYear(), Number(e.target.value), 1)),
305
+ value: G.getMonth(),
306
+ onChange: (e) => K(new Date(G.getFullYear(), Number(e.target.value), 1)),
306
307
  children: M.map((e, n) => /* @__PURE__ */ t("option", {
307
308
  value: n,
308
309
  children: e
@@ -312,14 +313,14 @@ var T = {
312
313
  className: A.yearInput,
313
314
  type: "number",
314
315
  "aria-label": "Год",
315
- value: U.getFullYear(),
316
- onChange: (e) => W(new Date(Number(e.target.value), U.getMonth(), 1))
316
+ value: G.getFullYear(),
317
+ onChange: (e) => K(new Date(Number(e.target.value), G.getMonth(), 1))
317
318
  }),
318
319
  /* @__PURE__ */ t("button", {
319
320
  type: "button",
320
321
  className: A.nav,
321
322
  "aria-label": "Следующий месяц",
322
- onClick: () => W(new Date(U.getFullYear(), U.getMonth() + 1, 1)),
323
+ onClick: () => K(new Date(G.getFullYear(), G.getMonth() + 1, 1)),
323
324
  children: "›"
324
325
  })
325
326
  ]
@@ -330,51 +331,51 @@ var T = {
330
331
  }),
331
332
  /* @__PURE__ */ t("div", {
332
333
  className: A.days,
333
- children: ce.map((e) => {
334
+ children: se.map((e) => {
334
335
  let n = ee(r, e);
335
336
  return /* @__PURE__ */ t("button", {
336
337
  type: "button",
337
- className: `${A.day} ${e.getMonth() === U.getMonth() ? "" : A.outside} ${n ? A.selected : ""}`,
338
+ className: `${A.day} ${e.getMonth() === G.getMonth() ? "" : A.outside} ${n ? A.selected : ""}`,
338
339
  disabled: te(e, x, S),
339
340
  "aria-pressed": n,
340
- onClick: () => q(e),
341
+ onClick: () => ue(e),
341
342
  children: e.getDate()
342
343
  }, e.toISOString());
343
344
  })
344
345
  })
345
- ] }), ue && /* @__PURE__ */ n("label", {
346
+ ] }), le && /* @__PURE__ */ n("label", {
346
347
  className: A.timeLabel,
347
348
  children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
348
349
  className: A.timeInput,
349
350
  type: "time",
350
- value: G,
351
+ value: ie,
351
352
  onChange: (e) => de(e.target.value)
352
353
  })]
353
354
  })]
354
355
  }) : null;
355
356
  return /* @__PURE__ */ n("div", {
356
- ref: B,
357
- className: `${A.wrapper} ${T}`,
357
+ ref: V,
358
+ className: `${A.wrapper} ${O}`,
358
359
  children: [
359
360
  m && /* @__PURE__ */ t(E, {
360
- htmlFor: k,
361
+ htmlFor: N,
361
362
  required: b,
362
363
  disabled: v,
363
364
  children: m
364
365
  }),
365
366
  /* @__PURE__ */ n("button", {
366
- ref: re,
367
- id: k,
368
- name: w,
367
+ ref: H,
368
+ id: N,
369
+ name: T,
369
370
  type: "button",
370
- className: `${A.trigger} ${_ ? A.error : ""}`,
371
+ className: `${A.trigger} ${A[C]} ${_ ? A.error : ""}`,
371
372
  disabled: v,
372
373
  "aria-readonly": y || void 0,
373
- "aria-expanded": V,
374
+ "aria-expanded": U,
374
375
  "aria-haspopup": "dialog",
375
376
  "aria-describedby": pe,
376
377
  onClick: () => {
377
- y || H((e) => !e);
378
+ y || W((e) => !e);
378
379
  },
379
380
  children: [/* @__PURE__ */ t("span", {
380
381
  className: r ? A.value : A.placeholder,
@@ -386,29 +387,29 @@ var T = {
386
387
  }),
387
388
  me && p(me, document.body),
388
389
  g && !_ && /* @__PURE__ */ t(D, {
389
- id: N,
390
+ id: P,
390
391
  children: g
391
392
  }),
392
393
  _ && /* @__PURE__ */ t(D, {
393
- id: P,
394
+ id: B,
394
395
  variant: "error",
395
396
  children: _
396
397
  })
397
398
  ]
398
399
  });
399
- }, re = {
400
+ }, V = {
400
401
  root: "_root_1q42e_1",
401
402
  legend: "_legend_1q42e_3",
402
403
  range: "_range_1q42e_5"
403
- }, ie = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), V = ({ 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 = "" }) => {
404
+ }, H = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), re = ({ 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 = "" }) => {
404
405
  let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
405
- i?.(e), ie(e) && r?.(e);
406
+ i?.(e), H(e) && r?.(e);
406
407
  };
407
408
  return /* @__PURE__ */ n("fieldset", {
408
- className: `${re.root} ${h}`,
409
+ className: `${V.root} ${h}`,
409
410
  disabled: f,
410
411
  children: [/* @__PURE__ */ n("div", {
411
- className: re.range,
412
+ className: V.range,
412
413
  children: [/* @__PURE__ */ t(B, {
413
414
  value: e.from,
414
415
  mode: a === "datetime" ? "datetime" : a,
@@ -440,7 +441,7 @@ var T = {
440
441
  })]
441
442
  }), c && !g && /* @__PURE__ */ t(D, { children: c })]
442
443
  });
443
- }, H = {
444
+ }, U = {
444
445
  group: "_group_1fs9e_1",
445
446
  skeleton: "_skeleton_1fs9e_3",
446
447
  text: "_text_1fs9e_5",
@@ -448,17 +449,17 @@ var T = {
448
449
  circular: "_circular_1fs9e_9",
449
450
  animated: "_animated_1fs9e_11",
450
451
  "ds-skeleton": "_ds-skeleton_1fs9e_1"
451
- }, U = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
452
- className: `${H.group} ${o}`,
452
+ }, W = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
453
+ className: `${U.group} ${o}`,
453
454
  "aria-hidden": "true",
454
455
  children: Array.from({ length: Math.max(1, i) }, (o, s) => /* @__PURE__ */ t("span", {
455
- className: `${H.skeleton} ${H[e]} ${a ? H.animated : ""}`,
456
+ className: `${U.skeleton} ${U[e]} ${a ? U.animated : ""}`,
456
457
  style: {
457
458
  width: s === i - 1 && i > 1 ? "70%" : n,
458
459
  height: r
459
460
  }
460
461
  }, s))
461
- }), W = {
462
+ }), G = {
462
463
  wrapper: "_wrapper_q0qut_1",
463
464
  label: "_label_q0qut_17",
464
465
  lg: "_lg_q0qut_29",
@@ -477,75 +478,75 @@ var T = {
477
478
  message: "_message_q0qut_355",
478
479
  error: "_error_q0qut_357",
479
480
  errorState: "_errorState_q0qut_383"
480
- }, G = 8, ae = 6, oe = 120, se = (e, t, n) => {
481
+ }, K = 8, ie = 6, ae = 120, q = (e, t, n) => {
481
482
  if (!e.length) return -1;
482
483
  for (let r = 0; r < e.length; r += 1) {
483
484
  let i = (t + r * n + e.length) % e.length;
484
485
  if (!e[i]?.disabled) return i;
485
486
  }
486
487
  return -1;
487
- }, ce = (e) => {
488
+ }, oe = (e) => {
488
489
  if (typeof e == "number") return e;
489
490
  if (typeof e == "string") {
490
491
  let t = Number.parseFloat(e);
491
492
  if (Number.isFinite(t)) return t;
492
493
  }
493
494
  return Infinity;
494
- }, le = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: m = !1, stringWhileDisabled: h = !1, label: g, error: _, size: v = "md", hint: y, className: b = "", name: x, id: S, needMark: C = !0, maxMenuHeight: w }) => {
495
- let T = c(), E = S ?? `ds-dropdown-${x ?? T}`, D = `${E}-listbox`, [O, k] = f(!1), [A, j] = f(null), M = d(null), N = d(null), P = d(null), F = d([]), I = u(() => e.find((e) => e.value === r), [e, r]), L = y ? `${E}-hint` : void 0, R = _ ? `${E}-error` : void 0, ee = [L, R].filter(Boolean).join(" ") || void 0, te = m && h, z = o(() => {
496
- let e = N.current, t = P.current;
495
+ }, se = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: m = !1, stringWhileDisabled: h = !1, label: g, error: _, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: w = !0, maxMenuHeight: T }) => {
496
+ let D = c(), O = C ?? `ds-dropdown-${S ?? D}`, k = `${O}-listbox`, [A, j] = f(!1), [M, N] = f(null), P = d(null), F = d(null), I = d(null), L = d([]), R = u(() => e.find((e) => e.value === r), [e, r]), ee = y ? `${O}-hint` : void 0, te = _ ? `${O}-error` : void 0, z = [ee, te].filter(Boolean).join(" ") || void 0, ne = m && h, B = o(() => {
497
+ let e = F.current, t = I.current;
497
498
  if (!e || !t) return;
498
- let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - G, o = n.top - G, s = a < r.height && o > a, c = Math.max(oe, s ? o : a), l = ce(w), u = Math.min(c, l), d = n.left, f = i - n.width - G, p = Math.max(G, Math.min(d, f)), m = s ? Math.max(G, n.top - r.height - ae) : n.bottom + ae;
499
- j({
499
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - K, o = n.top - K, s = a < r.height && o > a, c = Math.max(ae, s ? o : a), l = oe(T), u = Math.min(c, l), d = n.left, f = i - n.width - K, p = Math.max(K, Math.min(d, f)), m = s ? Math.max(K, n.top - r.height - ie) : n.bottom + ie;
500
+ N({
500
501
  top: m,
501
502
  left: p,
502
503
  width: n.width,
503
504
  maxHeight: u
504
505
  });
505
- }, [w]);
506
+ }, [T]);
506
507
  l(() => {
507
- if (!O) {
508
- j(null);
508
+ if (!A) {
509
+ N(null);
509
510
  return;
510
511
  }
511
- return z(), window.addEventListener("resize", z), window.addEventListener("scroll", z, !0), () => {
512
- window.removeEventListener("resize", z), window.removeEventListener("scroll", z, !0);
512
+ return B(), window.addEventListener("resize", B), window.addEventListener("scroll", B, !0), () => {
513
+ window.removeEventListener("resize", B), window.removeEventListener("scroll", B, !0);
513
514
  };
514
515
  }, [
515
- O,
516
- z,
516
+ A,
517
+ B,
517
518
  e.length
518
519
  ]), s(() => {
519
- if (!O) return;
520
+ if (!A) return;
520
521
  let e = (e) => {
521
- let t = e.target, n = M.current?.contains(t), r = P.current?.contains(t);
522
- !n && !r && k(!1);
522
+ let t = e.target, n = P.current?.contains(t), r = I.current?.contains(t);
523
+ !n && !r && j(!1);
523
524
  }, t = (e) => {
524
- e.key === "Escape" && (k(!1), N.current?.focus());
525
+ e.key === "Escape" && (j(!1), F.current?.focus());
525
526
  };
526
527
  return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
527
528
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
528
529
  };
529
- }, [O]);
530
- let ne = (t, n) => {
531
- let r = se(e, t, n);
530
+ }, [A]);
531
+ let V = (t, n) => {
532
+ let r = q(e, t, n);
532
533
  if (r === -1) return;
533
- let i = F.current[r];
534
+ let i = L.current[r];
534
535
  i?.focus(), i?.scrollIntoView({ block: "nearest" });
535
- }, B = (e) => {
536
- e.disabled || (i?.(e.value, e), k(!1), N.current?.focus());
537
- }, re = O ? /* @__PURE__ */ t("ul", {
538
- ref: P,
539
- id: D,
540
- className: W.menu,
536
+ }, H = (e) => {
537
+ e.disabled || (i?.(e.value, e), j(!1), F.current?.focus());
538
+ }, re = A ? /* @__PURE__ */ t("ul", {
539
+ ref: I,
540
+ id: k,
541
+ className: G.menu,
541
542
  role: "listbox",
542
543
  "aria-label": g,
543
- style: A ? {
544
+ style: M ? {
544
545
  position: "fixed",
545
- top: A.top,
546
- left: A.left,
547
- width: A.width,
548
- maxHeight: A.maxHeight
546
+ top: M.top,
547
+ left: M.left,
548
+ width: M.width,
549
+ maxHeight: M.maxHeight
549
550
  } : {
550
551
  position: "fixed",
551
552
  top: 0,
@@ -559,32 +560,32 @@ var T = {
559
560
  role: "presentation",
560
561
  children: /* @__PURE__ */ n("button", {
561
562
  ref: (e) => {
562
- F.current[a] = e;
563
+ L.current[a] = e;
563
564
  },
564
565
  type: "button",
565
566
  role: "option",
566
567
  "aria-selected": o,
567
568
  disabled: i.disabled,
568
569
  className: [
569
- W[v],
570
- W.option,
571
- o ? W.selected : ""
570
+ G[v],
571
+ G.option,
572
+ o ? G.selected : ""
572
573
  ].filter(Boolean).join(" "),
573
- onClick: () => B(i),
574
+ onClick: () => H(i),
574
575
  onKeyDown: (t) => {
575
576
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
576
577
  t.preventDefault();
577
578
  let e = t.key === "ArrowDown" ? 1 : -1;
578
- ne(a + e, e);
579
+ V(a + e, e);
579
580
  }
580
- if (t.key === "Tab" && k(!1), t.key === "Home" || t.key === "End") {
581
+ if (t.key === "Tab" && j(!1), t.key === "Home" || t.key === "End") {
581
582
  t.preventDefault();
582
583
  let n = t.key === "Home" ? 1 : -1;
583
- ne(t.key === "Home" ? 0 : e.length - 1, n);
584
+ V(t.key === "Home" ? 0 : e.length - 1, n);
584
585
  }
585
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), B(i));
586
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), H(i));
586
587
  },
587
- children: [/* @__PURE__ */ t("span", { children: i.label }), o && C && /* @__PURE__ */ t("span", {
588
+ children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t("span", {
588
589
  "aria-hidden": "true",
589
590
  children: "✓"
590
591
  })]
@@ -593,58 +594,60 @@ var T = {
593
594
  })
594
595
  }) : null;
595
596
  return /* @__PURE__ */ n("div", {
596
- ref: M,
597
+ ref: P,
597
598
  className: [
598
- W.wrapper,
599
- _ ? W.errorState : "",
599
+ G.wrapper,
600
+ _ ? G.errorState : "",
600
601
  b
601
602
  ].filter(Boolean).join(" "),
602
603
  children: [
603
- g && /* @__PURE__ */ t("label", {
604
- htmlFor: te ? void 0 : E,
605
- className: W.label,
604
+ g && /* @__PURE__ */ t(E, {
605
+ required: x,
606
+ disabled: m,
607
+ htmlFor: ne ? void 0 : O,
608
+ className: `${G.label} ${G[v]}`,
606
609
  children: g
607
610
  }),
608
611
  /* @__PURE__ */ t("div", {
609
- className: W.container,
610
- children: te ? /* @__PURE__ */ t("div", {
611
- id: E,
612
- className: W.disabledText,
613
- "aria-describedby": ee,
614
- children: I?.label ?? a
612
+ className: G.container,
613
+ children: ne ? /* @__PURE__ */ t("div", {
614
+ id: O,
615
+ className: G.disabledText,
616
+ "aria-describedby": z,
617
+ children: R?.label ?? a
615
618
  }) : /* @__PURE__ */ n("button", {
616
- ref: N,
617
- id: E,
619
+ ref: F,
620
+ id: O,
618
621
  type: "button",
619
- name: x,
620
- className: `${W.trigger} ${W[v]}`,
622
+ name: S,
623
+ className: `${G.trigger} ${G[v]}`,
621
624
  disabled: m,
622
625
  "aria-haspopup": "listbox",
623
- "aria-expanded": O,
624
- "aria-controls": D,
625
- "aria-describedby": ee,
626
+ "aria-expanded": A,
627
+ "aria-controls": k,
628
+ "aria-describedby": z,
626
629
  "aria-invalid": !!_,
627
- onClick: () => k((e) => !e),
630
+ onClick: () => j((e) => !e),
628
631
  onKeyDown: (t) => {
629
632
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
630
- t.preventDefault(), k(!0);
633
+ t.preventDefault(), j(!0);
631
634
  let n = t.key === "ArrowDown" ? 1 : -1;
632
635
  requestAnimationFrame(() => {
633
- ne(t.key === "ArrowDown" ? 0 : e.length - 1, n);
636
+ V(t.key === "ArrowDown" ? 0 : e.length - 1, n);
634
637
  });
635
638
  }
636
- if (t.key === "Enter" && O) {
639
+ if (t.key === "Enter" && A) {
637
640
  t.preventDefault();
638
641
  let n = e.findIndex((e) => e.value === r);
639
- ne(n >= 0 ? n : 0, 1);
642
+ V(n >= 0 ? n : 0, 1);
640
643
  }
641
644
  },
642
645
  children: [/* @__PURE__ */ t("span", {
643
- className: `${I ? W.value : W.placeholder}
644
- ${W[v]}`,
645
- children: I?.label ?? a
646
+ className: `${R ? G.value : G.placeholder}
647
+ ${G[v]}`,
648
+ children: R?.label ?? a
646
649
  }), /* @__PURE__ */ t("span", {
647
- className: [W.chevron, O ? W.chevronOpen : ""].filter(Boolean).join(" "),
650
+ className: [G.chevron, A ? G.chevronOpen : ""].filter(Boolean).join(" "),
648
651
  "aria-hidden": "true",
649
652
  children: /* @__PURE__ */ t("svg", {
650
653
  viewBox: "0 0 20 20",
@@ -660,38 +663,38 @@ var T = {
660
663
  })]
661
664
  })
662
665
  }),
663
- O && p(re, document.body),
666
+ A && p(re, document.body),
664
667
  y && !_ && /* @__PURE__ */ t("span", {
665
- id: L,
666
- className: W.message,
668
+ id: ee,
669
+ className: G.message,
667
670
  children: y
668
671
  }),
669
672
  _ && /* @__PURE__ */ t("span", {
670
- id: R,
671
- className: W.error,
673
+ id: te,
674
+ className: G.error,
672
675
  children: _
673
676
  })
674
677
  ]
675
678
  });
676
- }, ue = (e) => `${e.id}:${e.direction}`, K = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
679
+ }, ce = (e) => `${e.id}:${e.direction}`, le = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
677
680
  let c = e.flatMap((e) => [{
678
- value: ue({
681
+ value: ce({
679
682
  id: e.id,
680
683
  direction: "asc"
681
684
  }),
682
685
  label: e.ascLabel ?? `${e.label} · по возрастанию`,
683
686
  disabled: e.disabled
684
687
  }, {
685
- value: ue({
688
+ value: ce({
686
689
  id: e.id,
687
690
  direction: "desc"
688
691
  }),
689
692
  label: e.descLabel ?? `${e.label} · по убыванию`,
690
693
  disabled: e.disabled
691
694
  }]);
692
- return /* @__PURE__ */ t(le, {
695
+ return /* @__PURE__ */ t(se, {
693
696
  options: c,
694
- value: n ? ue(n) : "",
697
+ value: n ? ce(n) : "",
695
698
  label: i,
696
699
  placeholder: a,
697
700
  disabled: o,
@@ -704,7 +707,7 @@ var T = {
704
707
  });
705
708
  }
706
709
  });
707
- }, q = {
710
+ }, J = {
708
711
  root: "_root_epm0h_1",
709
712
  tableWrap: "_tableWrap_epm0h_3",
710
713
  table: "_table_epm0h_3",
@@ -719,10 +722,10 @@ var T = {
719
722
  default: "_default_epm0h_47",
720
723
  tableOnMobile: "_tableOnMobile_epm0h_47",
721
724
  wide: "_wide_epm0h_51"
722
- }, de = g({
725
+ }, ue = g({
723
726
  rowSortingFeature: h,
724
727
  sortedRowModel: m()
725
- }), fe = (e, t) => {
728
+ }), de = (e, t) => {
726
729
  let n = /* @__PURE__ */ new Set();
727
730
  for (let t of e) {
728
731
  if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
@@ -734,36 +737,36 @@ var T = {
734
737
  for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
735
738
  }
736
739
  return null;
737
- }, pe = (e, t) => typeof e == "function" ? e(t) : t[e], me = (e) => {
740
+ }, fe = (e, t) => typeof e == "function" ? e(t) : t[e], pe = (e) => {
738
741
  if (e == null || e === "") return null;
739
742
  let t = Date.parse(String(e));
740
743
  return Number.isNaN(t) ? null : t;
741
- }, he = (e, t, n) => {
742
- let r = me(e.getValue(n)), i = me(t.getValue(n));
744
+ }, me = (e, t, n) => {
745
+ let r = pe(e.getValue(n)), i = pe(t.getValue(n));
743
746
  return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
744
- }, ge = (e, t, n) => {
747
+ }, he = (e, t, n) => {
745
748
  let r = e.getValue(n), i = t.getValue(n);
746
749
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
747
- }, _e = (e, t, n) => {
750
+ }, ge = (e, t, n) => {
748
751
  let r = e.getValue(n), i = t.getValue(n);
749
752
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
750
- }, ve = (e, t, n) => {
753
+ }, _e = (e, t, n) => {
751
754
  let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
752
755
  return r.localeCompare(i, void 0, {
753
756
  numeric: !0,
754
757
  sensitivity: "base"
755
758
  });
756
- }, ye = (e) => {
759
+ }, ve = (e) => {
757
760
  switch (e) {
758
- case "date": return he;
759
- case "number": return ge;
760
- case "boolean": return _e;
761
+ case "date": return me;
762
+ case "number": return he;
763
+ case "boolean": return ge;
761
764
  case "text":
762
- case void 0: return ve;
765
+ case void 0: return _e;
763
766
  case "custom": return;
764
767
  }
765
- }, be = (e) => {
766
- let t = (t) => pe(e.accessor, t), n = e.sortFn ?? ye(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
768
+ }, ye = (e) => {
769
+ let t = (t) => fe(e.accessor, t), n = e.sortFn ?? ve(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
767
770
  id: e.id,
768
771
  accessorFn: t,
769
772
  header: () => e.header,
@@ -775,9 +778,9 @@ var T = {
775
778
  sortDescFirst: e.sortDescFirst
776
779
  };
777
780
  return n !== void 0 && (i.sortFn = n), i;
778
- }, xe = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: s, renderMobileCard: c, getRowId: l, caption: d, ariaLabel: p, loading: m = !1, error: h, emptyState: g = "Нет данных", stickyHeader: v = !1, maxHeight: y, className: b = "", onRowClick: x }) => {
779
- let [S, C] = f([]), w = o ?? S, T = u(() => fe(e, r), [e, r]), E = u(() => e.map(be), [e]), D = _({
780
- features: de,
781
+ }, be = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: s, renderMobileCard: c, getRowId: l, caption: d, ariaLabel: p, loading: m = !1, error: h, emptyState: g = "Нет данных", stickyHeader: v = !1, maxHeight: y, className: b = "", onRowClick: x }) => {
782
+ let [S, C] = f([]), w = o ?? S, T = u(() => de(e, r), [e, r]), E = u(() => e.map(ye), [e]), D = _({
783
+ features: ue,
781
784
  columns: E,
782
785
  data: r,
783
786
  state: { sorting: w },
@@ -790,17 +793,17 @@ var T = {
790
793
  id: e.id,
791
794
  label: typeof e.header == "string" ? e.header : e.id
792
795
  })), A = [
793
- q.root,
794
- a === "wide" ? q.wide : q.default,
795
- i ? q.tableOnMobile : "",
796
+ J.root,
797
+ a === "wide" ? J.wide : J.default,
798
+ i ? J.tableOnMobile : "",
796
799
  b
797
800
  ].filter(Boolean).join(" "), j = T ?? h;
798
801
  return /* @__PURE__ */ n("section", {
799
802
  className: A,
800
803
  "aria-busy": m,
801
804
  children: [
802
- !i && !m && !j && O.length > 0 && k.length > 0 && /* @__PURE__ */ t(K, {
803
- className: q.mobileSort,
805
+ !i && !m && !j && O.length > 0 && k.length > 0 && /* @__PURE__ */ t(le, {
806
+ className: J.mobileSort,
804
807
  options: k,
805
808
  value: w[0] ? {
806
809
  id: w[0].id,
@@ -812,15 +815,15 @@ var T = {
812
815
  }])
813
816
  }),
814
817
  /* @__PURE__ */ t("div", {
815
- className: q.tableWrap,
818
+ className: J.tableWrap,
816
819
  style: { maxHeight: y },
817
820
  children: /* @__PURE__ */ n("table", {
818
- className: q.table,
821
+ className: J.table,
819
822
  "aria-label": p,
820
823
  children: [
821
824
  d && /* @__PURE__ */ t("caption", { children: d }),
822
825
  /* @__PURE__ */ t("thead", {
823
- className: v ? q.sticky : "",
826
+ className: v ? J.sticky : "",
824
827
  children: D.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
825
828
  let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
826
829
  return /* @__PURE__ */ t("th", {
@@ -828,7 +831,7 @@ var T = {
828
831
  "aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
829
832
  children: /* @__PURE__ */ n("button", {
830
833
  type: "button",
831
- className: q.sortButton,
834
+ className: J.sortButton,
832
835
  disabled: !i,
833
836
  onClick: a,
834
837
  children: [/* @__PURE__ */ t(D.FlexRender, { header: e }), /* @__PURE__ */ t("span", {
@@ -841,17 +844,17 @@ var T = {
841
844
  }),
842
845
  /* @__PURE__ */ t("tbody", { children: m ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
843
846
  colSpan: e.length,
844
- children: /* @__PURE__ */ t(U, { lines: 3 })
847
+ children: /* @__PURE__ */ t(W, { lines: 3 })
845
848
  }) }) : j ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
846
- className: q.state,
849
+ className: J.state,
847
850
  colSpan: e.length,
848
851
  children: j
849
852
  }) }) : O.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
850
- className: q.state,
853
+ className: J.state,
851
854
  colSpan: e.length,
852
855
  children: g
853
856
  }) }) : O.map((e) => /* @__PURE__ */ t("tr", {
854
- className: x ? q.clickableRow : void 0,
857
+ className: x ? J.clickableRow : void 0,
855
858
  onClick: () => x?.(e.original),
856
859
  onKeyDown: (t) => {
857
860
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), x?.(e.original));
@@ -864,14 +867,14 @@ var T = {
864
867
  })
865
868
  }),
866
869
  !i && /* @__PURE__ */ t("div", {
867
- className: q.cards,
870
+ className: J.cards,
868
871
  role: "list",
869
872
  "aria-label": p ?? d,
870
- children: m ? /* @__PURE__ */ t(U, { lines: 4 }) : j ? /* @__PURE__ */ t("div", {
871
- className: q.state,
873
+ children: m ? /* @__PURE__ */ t(W, { lines: 4 }) : j ? /* @__PURE__ */ t("div", {
874
+ className: J.state,
872
875
  children: j
873
876
  }) : O.length === 0 ? /* @__PURE__ */ t("div", {
874
- className: q.state,
877
+ className: J.state,
875
878
  children: g
876
879
  }) : O.map((r) => {
877
880
  if (c) return /* @__PURE__ */ t("div", {
@@ -881,14 +884,14 @@ var T = {
881
884
  columns: e
882
885
  })
883
886
  }, r.id);
884
- let i = e.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), a = i.find((e) => e.mobile?.primary) ?? i.find((e) => e.mobile?.mobileVariant !== "actions"), o = (e) => pe(e.accessor, r.original), s = (e) => e.mobile?.renderMobile?.(r.original, o(e)) ?? e.cell?.(r.original, o(e)) ?? String(o(e) ?? "");
887
+ let i = e.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), a = i.find((e) => e.mobile?.primary) ?? i.find((e) => e.mobile?.mobileVariant !== "actions"), o = (e) => fe(e.accessor, r.original), s = (e) => e.mobile?.renderMobile?.(r.original, o(e)) ?? e.cell?.(r.original, o(e)) ?? String(o(e) ?? "");
885
888
  return /* @__PURE__ */ n("article", {
886
889
  role: "listitem",
887
- className: q.card,
890
+ className: J.card,
888
891
  children: [
889
892
  /* @__PURE__ */ t("h3", { children: a ? s(a) : `Строка ${r.index + 1}` }),
890
893
  /* @__PURE__ */ t("dl", { children: i.filter((e) => e !== a && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
891
- className: e.mobile?.mobileSpan === 2 ? q.spanTwo : "",
894
+ className: e.mobile?.mobileSpan === 2 ? J.spanTwo : "",
892
895
  children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: s(e) })]
893
896
  }, e.id)) }),
894
897
  i.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: s(e) }, e.id))
@@ -898,7 +901,7 @@ var T = {
898
901
  })
899
902
  ]
900
903
  });
901
- }, Se = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, label: l, error: p, hint: m, className: h = "", name: g, id: _, closeOnSelect: v = !1, maxMenuHeight: y }) => {
904
+ }, xe = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, label: l, error: p, hint: m, className: h = "", name: g, id: _, closeOnSelect: v = !1, maxMenuHeight: y }) => {
902
905
  let b = c(), x = _ ?? `ds-dropdown-multiple-${g ?? b}`, [S, C] = f(!1), w = d(null), T = d(null), E = d([]), D = u(() => e.filter((e) => r.includes(e.value)), [e, r]), O = D.map((e) => e.label).join(", "), k = m ? `${x}-hint` : void 0, A = p ? `${x}-error` : void 0;
903
906
  s(() => {
904
907
  let e = (e) => {
@@ -915,30 +918,30 @@ var T = {
915
918
  let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
916
919
  i?.(n, e.filter((e) => n.includes(e.value))), v && (C(!1), T.current?.focus());
917
920
  }, M = (t, n) => {
918
- let r = se(e, t, n);
921
+ let r = q(e, t, n);
919
922
  E.current[r]?.focus(), E.current[r]?.scrollIntoView({ block: "nearest" });
920
923
  };
921
924
  return /* @__PURE__ */ n("div", {
922
925
  ref: w,
923
926
  className: [
924
- W.wrapper,
925
- p ? W.errorState : "",
927
+ G.wrapper,
928
+ p ? G.errorState : "",
926
929
  h
927
930
  ].filter(Boolean).join(" "),
928
931
  children: [
929
932
  l && /* @__PURE__ */ t("label", {
930
933
  htmlFor: x,
931
- className: W.label,
934
+ className: G.label,
932
935
  children: l
933
936
  }),
934
937
  /* @__PURE__ */ n("div", {
935
- className: W.container,
938
+ className: G.container,
936
939
  children: [/* @__PURE__ */ n("button", {
937
940
  ref: T,
938
941
  id: x,
939
942
  type: "button",
940
943
  name: g,
941
- className: W.trigger,
944
+ className: G.trigger,
942
945
  disabled: o,
943
946
  "aria-haspopup": "listbox",
944
947
  "aria-expanded": S,
@@ -954,16 +957,16 @@ var T = {
954
957
  }
955
958
  },
956
959
  children: [/* @__PURE__ */ t("span", {
957
- className: D.length ? W.value : W.placeholder,
960
+ className: D.length ? G.value : G.placeholder,
958
961
  children: O || a
959
962
  }), /* @__PURE__ */ t("span", {
960
- className: `${W.chevron} ${S ? W.chevronOpen : ""}`,
963
+ className: `${G.chevron} ${S ? G.chevronOpen : ""}`,
961
964
  "aria-hidden": "true",
962
965
  children: "⌄"
963
966
  })]
964
967
  }), S && /* @__PURE__ */ t("ul", {
965
968
  id: `${x}-listbox`,
966
- className: W.menu,
969
+ className: G.menu,
967
970
  role: "listbox",
968
971
  "aria-label": l,
969
972
  "aria-multiselectable": "true",
@@ -980,7 +983,7 @@ var T = {
980
983
  role: "option",
981
984
  "aria-selected": o,
982
985
  disabled: i.disabled,
983
- className: `${W.option} ${o ? W.selected : ""}`,
986
+ className: `${G.option} ${o ? G.selected : ""}`,
984
987
  onClick: () => j(i),
985
988
  onKeyDown: (t) => {
986
989
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
@@ -1006,17 +1009,17 @@ var T = {
1006
1009
  }),
1007
1010
  m && !p && /* @__PURE__ */ t("span", {
1008
1011
  id: k,
1009
- className: W.message,
1012
+ className: G.message,
1010
1013
  children: m
1011
1014
  }),
1012
1015
  p && /* @__PURE__ */ t("span", {
1013
1016
  id: A,
1014
- className: W.error,
1017
+ className: G.error,
1015
1018
  children: p
1016
1019
  })
1017
1020
  ]
1018
1021
  });
1019
- }, Ce = {
1022
+ }, Se = {
1020
1023
  approve: "M4 12l5 5L20 6",
1021
1024
  reject: "M5 5l14 14M19 5L5 19",
1022
1025
  edit: "M4 20h4L19 9l-4-4L4 16v4z",
@@ -1025,7 +1028,7 @@ var T = {
1025
1028
  basket: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3",
1026
1029
  info: "M12 10v7m0-10v.01",
1027
1030
  warning: "M12 4L3 20h18L12 4zm0 5v5m0 3v.01"
1028
- }, we = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
1031
+ }, Ce = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
1029
1032
  viewBox: "0 0 24 24",
1030
1033
  width: i,
1031
1034
  height: a,
@@ -1038,27 +1041,27 @@ var T = {
1038
1041
  "aria-hidden": !r || void 0,
1039
1042
  focusable: "false",
1040
1043
  ...o,
1041
- children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: Ce[e] })]
1042
- }), Te = {
1044
+ children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: Se[e] })]
1045
+ }), we = {
1043
1046
  root: "_root_1y2s8_1",
1044
1047
  header: "_header_1y2s8_21",
1045
1048
  title: "_title_1y2s8_41",
1046
1049
  dismiss: "_dismiss_1y2s8_55",
1047
1050
  content: "_content_1y2s8_113"
1048
- }, Ee = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
1051
+ }, Te = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
1049
1052
  let u = `ds-info-block-${c()}`;
1050
1053
  return /* @__PURE__ */ n("section", {
1051
- className: `${Te.root} ${l}`,
1054
+ className: `${we.root} ${l}`,
1052
1055
  "aria-labelledby": u,
1053
1056
  children: [/* @__PURE__ */ n("header", {
1054
- className: Te.header,
1057
+ className: we.header,
1055
1058
  children: [/* @__PURE__ */ t(s, {
1056
1059
  id: u,
1057
- className: Te.title,
1060
+ className: we.title,
1058
1061
  children: e
1059
1062
  }), i && /* @__PURE__ */ t("button", {
1060
1063
  type: "button",
1061
- className: Te.dismiss,
1064
+ className: we.dismiss,
1062
1065
  onClick: a,
1063
1066
  "aria-label": o,
1064
1067
  children: /* @__PURE__ */ t("svg", {
@@ -1074,11 +1077,11 @@ var T = {
1074
1077
  })
1075
1078
  })]
1076
1079
  }), /* @__PURE__ */ t("div", {
1077
- className: Te.content,
1080
+ className: we.content,
1078
1081
  children: r
1079
1082
  })]
1080
1083
  });
1081
- }, J = {
1084
+ }, Y = {
1082
1085
  wrapper: "_wrapper_v5lkp_1",
1083
1086
  control: "_control_v5lkp_3",
1084
1087
  input: "_input_v5lkp_5",
@@ -1088,12 +1091,12 @@ var T = {
1088
1091
  lg: "_lg_v5lkp_65",
1089
1092
  inputError: "_inputError_v5lkp_77",
1090
1093
  trailingAction: "_trailingAction_v5lkp_79"
1091
- }, De = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: l = !1, stringWhileDisabled: u = !1, label: p, error: m, hint: h, className: g = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: w = "Скрыть пароль", passwordHiddenLabel: T = "Показать пароль", onFocus: O, ...k }) => {
1094
+ }, Ee = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: l = !1, stringWhileDisabled: u = !1, label: p, error: m, hint: h, className: g = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: w = "Скрыть пароль", passwordHiddenLabel: T = "Показать пароль", onFocus: O, ...k }) => {
1092
1095
  let A = c(), j = v ?? `ds-input-${_ ?? A}`, M = d(null), [N, P] = f(!1), F = h ? `${j}-hint` : void 0, I = m ? `${j}-error` : void 0, L = String(e ?? ""), R = [F, I].filter(Boolean).join(" ") || void 0, ee = C ? N ? "text" : "password" : i;
1093
1096
  return s(() => {
1094
1097
  C || P(!1);
1095
1098
  }, [C]), /* @__PURE__ */ n("div", {
1096
- className: `${J.wrapper} ${g}`,
1099
+ className: `${Y.wrapper} ${g}`,
1097
1100
  children: [
1098
1101
  p && /* @__PURE__ */ t(E, {
1099
1102
  htmlFor: j,
@@ -1103,11 +1106,11 @@ var T = {
1103
1106
  }),
1104
1107
  o && u ? /* @__PURE__ */ t("div", {
1105
1108
  id: j,
1106
- className: J.disabledText,
1109
+ className: Y.disabledText,
1107
1110
  "aria-describedby": R,
1108
1111
  children: L || a
1109
1112
  }) : /* @__PURE__ */ n("div", {
1110
- className: J.control,
1113
+ className: Y.control,
1111
1114
  children: [
1112
1115
  /* @__PURE__ */ t("input", {
1113
1116
  ref: M,
@@ -1121,7 +1124,7 @@ var T = {
1121
1124
  required: x,
1122
1125
  "aria-invalid": !!m,
1123
1126
  "aria-describedby": R,
1124
- className: `${J.input} ${J[y]} ${m ? J.inputError : ""}`,
1127
+ className: `${Y.input} ${Y[y]} ${m ? Y.inputError : ""}`,
1125
1128
  onChange: (e) => {
1126
1129
  if (i === "number" && !C) {
1127
1130
  let t = e.target.value === "" ? "" : Number(e.target.value);
@@ -1137,7 +1140,7 @@ var T = {
1137
1140
  }),
1138
1141
  C && /* @__PURE__ */ t("button", {
1139
1142
  type: "button",
1140
- className: J.trailingAction,
1143
+ className: Y.trailingAction,
1141
1144
  disabled: o,
1142
1145
  "aria-label": N ? w : T,
1143
1146
  "aria-pressed": N,
@@ -1158,7 +1161,7 @@ var T = {
1158
1161
  }),
1159
1162
  !C && b && L && !o && !l && /* @__PURE__ */ t("button", {
1160
1163
  type: "button",
1161
- className: J.trailingAction,
1164
+ className: Y.trailingAction,
1162
1165
  "aria-label": "Очистить поле",
1163
1166
  onClick: () => {
1164
1167
  let e = M.current;
@@ -1179,22 +1182,22 @@ var T = {
1179
1182
  })
1180
1183
  ]
1181
1184
  });
1182
- }, Oe = {
1185
+ }, De = {
1183
1186
  wrapper: "_wrapper_vu1ob_1",
1184
1187
  input: "_input_vu1ob_21",
1185
1188
  switch: "_switch_vu1ob_35",
1186
1189
  thumb: "_thumb_vu1ob_67",
1187
1190
  label: "_label_vu1ob_111",
1188
1191
  disabled: "_disabled_vu1ob_123"
1189
- }, ke = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1192
+ }, Oe = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1190
1193
  let f = c(), p = u ?? `ds-radio-button-${l ?? f}`;
1191
1194
  return /* @__PURE__ */ n("label", {
1192
1195
  htmlFor: p,
1193
- className: `${Oe.wrapper} ${a ? Oe.disabled : ""} ${s}`,
1196
+ className: `${De.wrapper} ${a ? De.disabled : ""} ${s}`,
1194
1197
  children: [
1195
1198
  /* @__PURE__ */ t("input", {
1196
1199
  id: p,
1197
- className: Oe.input,
1200
+ className: De.input,
1198
1201
  type: "checkbox",
1199
1202
  role: "switch",
1200
1203
  name: l,
@@ -1207,21 +1210,21 @@ var T = {
1207
1210
  }
1208
1211
  }),
1209
1212
  /* @__PURE__ */ t("span", {
1210
- className: Oe.switch,
1213
+ className: De.switch,
1211
1214
  "aria-hidden": "true",
1212
- children: /* @__PURE__ */ t("span", { className: Oe.thumb })
1215
+ children: /* @__PURE__ */ t("span", { className: De.thumb })
1213
1216
  }),
1214
1217
  i && /* @__PURE__ */ t("span", {
1215
- className: Oe.label,
1218
+ className: De.label,
1216
1219
  children: i
1217
1220
  })
1218
1221
  ]
1219
1222
  });
1220
- }, Ae = {
1223
+ }, ke = {
1221
1224
  root: "_root_kepgo_1",
1222
1225
  grid: "_grid_kepgo_3",
1223
1226
  actions: "_actions_kepgo_5"
1224
- }, je = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1227
+ }, Ae = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1225
1228
  let d = (e, t) => {
1226
1229
  let n = {
1227
1230
  ...r,
@@ -1230,11 +1233,11 @@ var T = {
1230
1233
  i?.(n, e), s === "instant" && a?.(n);
1231
1234
  };
1232
1235
  return /* @__PURE__ */ n("section", {
1233
- className: `${Ae.root} ${u}`,
1236
+ className: `${ke.root} ${u}`,
1234
1237
  "aria-label": "Фильтры",
1235
1238
  "aria-busy": c,
1236
1239
  children: [/* @__PURE__ */ t("div", {
1237
- className: Ae.grid,
1240
+ className: ke.grid,
1238
1241
  children: e.filter((e) => !e.hidden).map((e) => {
1239
1242
  let n = l || c || e.disabled, i = r[e.id];
1240
1243
  if (e.type === "input") {
@@ -1244,19 +1247,19 @@ var T = {
1244
1247
  placeholder: e.placeholder,
1245
1248
  disabled: n
1246
1249
  };
1247
- return e.inputType === "number" ? /* @__PURE__ */ t(De, {
1250
+ return e.inputType === "number" ? /* @__PURE__ */ t(Ee, {
1248
1251
  ...r,
1249
1252
  type: "number",
1250
1253
  value: i ?? "",
1251
1254
  onChange: (t) => d(e.id, t)
1252
- }, e.id) : /* @__PURE__ */ t(De, {
1255
+ }, e.id) : /* @__PURE__ */ t(Ee, {
1253
1256
  ...r,
1254
1257
  type: "text",
1255
1258
  value: String(i ?? ""),
1256
1259
  onChange: (t) => d(e.id, t)
1257
1260
  }, e.id);
1258
1261
  }
1259
- if (e.type === "dropdown") return /* @__PURE__ */ t(le, {
1262
+ if (e.type === "dropdown") return /* @__PURE__ */ t(se, {
1260
1263
  label: e.label,
1261
1264
  hint: e.hint,
1262
1265
  placeholder: e.placeholder,
@@ -1265,7 +1268,7 @@ var T = {
1265
1268
  disabled: n,
1266
1269
  onChange: (t) => d(e.id, t)
1267
1270
  }, e.id);
1268
- if (e.type === "multiple") return /* @__PURE__ */ t(Se, {
1271
+ if (e.type === "multiple") return /* @__PURE__ */ t(xe, {
1269
1272
  label: e.label,
1270
1273
  hint: e.hint,
1271
1274
  placeholder: e.placeholder,
@@ -1281,7 +1284,7 @@ var T = {
1281
1284
  disabled: n,
1282
1285
  onChange: (t) => d(e.id, t)
1283
1286
  }, e.id);
1284
- if (e.type === "radio") return /* @__PURE__ */ t(ke, {
1287
+ if (e.type === "radio") return /* @__PURE__ */ t(Oe, {
1285
1288
  label: e.label,
1286
1289
  checked: !!i,
1287
1290
  disabled: n,
@@ -1291,7 +1294,7 @@ var T = {
1291
1294
  from: null,
1292
1295
  to: null
1293
1296
  };
1294
- return /* @__PURE__ */ t(V, {
1297
+ return /* @__PURE__ */ t(re, {
1295
1298
  hint: e.hint,
1296
1299
  mode: e.mode,
1297
1300
  min: e.min,
@@ -1302,7 +1305,7 @@ var T = {
1302
1305
  }, e.id);
1303
1306
  })
1304
1307
  }), (o || s === "manual") && /* @__PURE__ */ n("div", {
1305
- className: Ae.actions,
1308
+ className: ke.actions,
1306
1309
  children: [o && /* @__PURE__ */ t(w, {
1307
1310
  variant: "destructiveOutline",
1308
1311
  disabled: l || c,
@@ -1316,7 +1319,7 @@ var T = {
1316
1319
  })]
1317
1320
  })]
1318
1321
  });
1319
- }, Y = {
1322
+ }, X = {
1320
1323
  wrapper: "_wrapper_1ymdr_1",
1321
1324
  dropzone: "_dropzone_1ymdr_3",
1322
1325
  dragActive: "_dragActive_1ymdr_5",
@@ -1330,12 +1333,12 @@ var T = {
1330
1333
  file: "_file_1ymdr_19",
1331
1334
  fileName: "_fileName_1ymdr_23",
1332
1335
  fileSize: "_fileSize_1ymdr_25"
1333
- }, Me = (e) => `${e.name}:${e.size}:${e.lastModified}`, Ne = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Pe = (e, t) => !t || t.split(",").map((e) => e.trim().toLowerCase()).some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t), Fe = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: l, label: u, hint: p, error: m, required: h = !1, disabled: g = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: T }) => {
1336
+ }, je = (e) => `${e.name}:${e.size}:${e.lastModified}`, Me = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Ne = (e, t) => !t || t.split(",").map((e) => e.trim().toLowerCase()).some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t), Pe = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: l, label: u, hint: p, error: m, required: h = !1, disabled: g = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: T }) => {
1334
1337
  let O = c(), k = y ?? `ds-file-input-${v ?? O}`, A = d(null), j = d(0), [M, N] = f(!1), P = p ? `${k}-hint` : void 0, F = m ? `${k}-error` : void 0, I = [P, F].filter(Boolean).join(" ") || void 0, L = !g && !_, R = (e) => {
1335
- let t = [], n = new Set(r.map(Me)), c = e.filter((e) => Pe(e, o) ? s !== void 0 && e.size > s ? (t.push({
1338
+ let t = [], n = new Set(r.map(je)), c = e.filter((e) => Ne(e, o) ? s !== void 0 && e.size > s ? (t.push({
1336
1339
  file: e,
1337
1340
  reason: "maxSize"
1338
- }), !1) : !n.has(Me(e)) && (n.add(Me(e)), !0) : (t.push({
1341
+ }), !1) : !n.has(je(e)) && (n.add(je(e)), !0) : (t.push({
1339
1342
  file: e,
1340
1343
  reason: "accept"
1341
1344
  }), !1)), u = a ? l : 1, d = a ? [...r, ...c] : c.slice(-1);
@@ -1345,7 +1348,7 @@ var T = {
1345
1348
  })), d = d.slice(0, u)), t.length && T?.(t), c.length && i?.(d), A.current && (A.current.value = "");
1346
1349
  };
1347
1350
  return /* @__PURE__ */ n("div", {
1348
- className: `${Y.wrapper} ${b}`,
1351
+ className: `${X.wrapper} ${b}`,
1349
1352
  children: [
1350
1353
  u && /* @__PURE__ */ t(E, {
1351
1354
  htmlFor: k,
@@ -1354,7 +1357,7 @@ var T = {
1354
1357
  children: u
1355
1358
  }),
1356
1359
  /* @__PURE__ */ n("div", {
1357
- className: `${Y.dropzone} ${M ? Y.dragActive : ""} ${g ? Y.disabled : ""} ${m ? Y.error : ""}`,
1360
+ className: `${X.dropzone} ${M ? X.dragActive : ""} ${g ? X.disabled : ""} ${m ? X.error : ""}`,
1358
1361
  onDragEnter: (e) => {
1359
1362
  e.preventDefault(), L && ++j.current === 1 && N(!0);
1360
1363
  },
@@ -1369,7 +1372,7 @@ var T = {
1369
1372
  ref: A,
1370
1373
  id: k,
1371
1374
  name: v,
1372
- className: Y.nativeInput,
1375
+ className: X.nativeInput,
1373
1376
  type: "file",
1374
1377
  multiple: a,
1375
1378
  accept: o,
@@ -1380,19 +1383,19 @@ var T = {
1380
1383
  onChange: (e) => R(Array.from(e.target.files ?? []))
1381
1384
  }), r.length ? /* @__PURE__ */ n(e, { children: [
1382
1385
  /* @__PURE__ */ t("ul", {
1383
- className: Y.files,
1386
+ className: X.files,
1384
1387
  "aria-live": "polite",
1385
1388
  children: r.map((e, a) => /* @__PURE__ */ n("li", {
1386
- className: Y.file,
1389
+ className: X.file,
1387
1390
  children: [
1388
1391
  /* @__PURE__ */ t("span", {
1389
- className: Y.fileName,
1392
+ className: X.fileName,
1390
1393
  title: e.name,
1391
1394
  children: e.name
1392
1395
  }),
1393
1396
  /* @__PURE__ */ t("span", {
1394
- className: Y.fileSize,
1395
- children: Ne(e.size)
1397
+ className: X.fileSize,
1398
+ children: Me(e.size)
1396
1399
  }),
1397
1400
  L && /* @__PURE__ */ t(w, {
1398
1401
  variant: "empty",
@@ -1402,31 +1405,31 @@ var T = {
1402
1405
  children: "×"
1403
1406
  })
1404
1407
  ]
1405
- }, Me(e)))
1408
+ }, je(e)))
1406
1409
  }),
1407
1410
  L && (a || r.length === 0) && /* @__PURE__ */ t(w, {
1408
- className: Y.browseButton,
1411
+ className: X.browseButton,
1409
1412
  size: "sm",
1410
1413
  onClick: () => A.current?.click(),
1411
1414
  children: C
1412
1415
  }),
1413
1416
  L && !a && /* @__PURE__ */ t(w, {
1414
- className: Y.browseButton,
1417
+ className: X.browseButton,
1415
1418
  size: "sm",
1416
1419
  onClick: () => A.current?.click(),
1417
1420
  children: S
1418
1421
  })
1419
1422
  ] }) : /* @__PURE__ */ n("div", {
1420
- className: Y.empty,
1423
+ className: X.empty,
1421
1424
  children: [
1422
1425
  /* @__PURE__ */ t("span", {
1423
- className: Y.uploadIcon,
1426
+ className: X.uploadIcon,
1424
1427
  "aria-hidden": "true",
1425
1428
  children: "↑"
1426
1429
  }),
1427
1430
  /* @__PURE__ */ t("strong", { children: M ? "Отпустите файлы здесь" : x }),
1428
1431
  !M && L && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(w, {
1429
- className: Y.browseButton,
1432
+ className: X.browseButton,
1430
1433
  onClick: () => A.current?.click(),
1431
1434
  children: S
1432
1435
  })] })
@@ -1445,11 +1448,11 @@ var T = {
1445
1448
  })
1446
1449
  ]
1447
1450
  });
1448
- }, Ie = 0, X = v((e) => ({
1451
+ }, Fe = 0, Z = v((e) => ({
1449
1452
  modals: [],
1450
1453
  openModal: (t, n = {}, r = {}) => {
1451
- Ie += 1;
1452
- let i = `ds-modal-${Ie}`;
1454
+ Fe += 1;
1455
+ let i = `ds-modal-${Fe}`;
1453
1456
  return e((e) => ({ modals: [...e.modals, {
1454
1457
  id: i,
1455
1458
  name: t,
@@ -1461,7 +1464,7 @@ var T = {
1461
1464
  closeModal: (t) => e((e) => ({ modals: e.modals.filter((e) => e.id !== t) })),
1462
1465
  closeTopModal: () => e((e) => ({ modals: e.modals.slice(0, -1) })),
1463
1466
  closeAllModals: () => e({ modals: [] })
1464
- })), Le = () => X.setState({ modals: [] }), Z = {
1467
+ })), Ie = () => Z.setState({ modals: [] }), Q = {
1465
1468
  layer: "_layer_1nb2z_1",
1466
1469
  backdrop: "_backdrop_1nb2z_3",
1467
1470
  panel: "_panel_1nb2z_5",
@@ -1469,14 +1472,14 @@ var T = {
1469
1472
  title: "_title_1nb2z_11",
1470
1473
  description: "_description_1nb2z_13",
1471
1474
  content: "_content_1nb2z_15"
1472
- }, Re = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", ze = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: u = "dialog" }) => {
1473
- let f = c(), p = c(), m = d(null), h = X((e) => e.closeModal);
1475
+ }, Le = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Re = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: u = "dialog" }) => {
1476
+ let f = c(), p = c(), m = d(null), h = Z((e) => e.closeModal);
1474
1477
  return s(() => {
1475
1478
  let e = document.activeElement, t = m.current;
1476
- return (t?.querySelector(Re) ?? t)?.focus(), () => e?.focus();
1479
+ return (t?.querySelector(Le) ?? t)?.focus(), () => e?.focus();
1477
1480
  }, []), /* @__PURE__ */ n("div", {
1478
1481
  ref: m,
1479
- className: `${Z.panel} ${l}`,
1482
+ className: `${Q.panel} ${l}`,
1480
1483
  role: u,
1481
1484
  "aria-modal": "true",
1482
1485
  "aria-labelledby": r ? f : void 0,
@@ -1484,7 +1487,7 @@ var T = {
1484
1487
  tabIndex: -1,
1485
1488
  onKeyDown: (e) => {
1486
1489
  if (e.key !== "Tab") return;
1487
- let t = Array.from(m.current?.querySelectorAll(Re) ?? []);
1490
+ let t = Array.from(m.current?.querySelectorAll(Le) ?? []);
1488
1491
  if (!t.length) {
1489
1492
  e.preventDefault();
1490
1493
  return;
@@ -1494,10 +1497,10 @@ var T = {
1494
1497
  },
1495
1498
  children: [
1496
1499
  (r || o) && /* @__PURE__ */ n("header", {
1497
- className: Z.header,
1500
+ className: Q.header,
1498
1501
  children: [r && /* @__PURE__ */ t("h2", {
1499
1502
  id: f,
1500
- className: Z.title,
1503
+ className: Q.title,
1501
1504
  children: r
1502
1505
  }), /* @__PURE__ */ t(w, {
1503
1506
  variant: "empty",
@@ -1520,31 +1523,31 @@ var T = {
1520
1523
  }),
1521
1524
  i && /* @__PURE__ */ t("p", {
1522
1525
  id: p,
1523
- className: Z.description,
1526
+ className: Q.description,
1524
1527
  children: i
1525
1528
  }),
1526
1529
  /* @__PURE__ */ t("div", {
1527
- className: Z.content,
1530
+ className: Q.content,
1528
1531
  children: e
1529
1532
  })
1530
1533
  ]
1531
1534
  });
1532
- }, Be = ({ registry: e }) => {
1533
- let n = X((e) => e.modals), r = X((e) => e.closeModal), i = X((e) => e.closeAllModals);
1535
+ }, ze = ({ registry: e }) => {
1536
+ let n = Z((e) => e.modals), r = Z((e) => e.closeModal), i = Z((e) => e.closeAllModals);
1534
1537
  return s(() => {
1535
1538
  let e = (e) => {
1536
1539
  if (e.key !== "Escape") return;
1537
- let t = X.getState().modals.at(-1);
1540
+ let t = Z.getState().modals.at(-1);
1538
1541
  t?.closeOnEscape && r(t.id);
1539
1542
  };
1540
1543
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1541
1544
  }, [r]), !n.length || typeof document > "u" ? null : p(/* @__PURE__ */ t("div", {
1542
- className: Z.layer,
1545
+ className: Q.layer,
1543
1546
  "aria-label": "Модальные окна",
1544
1547
  children: n.map((a, o) => {
1545
1548
  let s = e[a.name];
1546
1549
  return s ? /* @__PURE__ */ t("div", {
1547
- className: Z.backdrop,
1550
+ className: Q.backdrop,
1548
1551
  "aria-hidden": o !== n.length - 1 || void 0,
1549
1552
  onMouseDown: (e) => {
1550
1553
  e.target === e.currentTarget && a.closeOnBackdrop && r(a.id);
@@ -1558,31 +1561,31 @@ var T = {
1558
1561
  }, a.id) : null;
1559
1562
  })
1560
1563
  }), document.body);
1561
- }, Ve = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1562
- let o = X((e) => e.modals.length);
1564
+ }, Be = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1565
+ let o = Z((e) => e.modals.length);
1563
1566
  return s(() => {
1564
1567
  if (!a || o === 0) return;
1565
1568
  let e = document.body.style.overflow;
1566
1569
  return document.body.style.overflow = "hidden", () => {
1567
1570
  document.body.style.overflow = e;
1568
1571
  };
1569
- }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Be, { registry: r })] });
1570
- }, He = (e) => e, Ue = {
1572
+ }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(ze, { registry: r })] });
1573
+ }, Ve = (e) => e, He = {
1571
1574
  message: "_message_1vtru_1",
1572
1575
  actions: "_actions_1vtru_3"
1573
- }, We = /* @__PURE__ */ new Map(), Ge = 0, Ke = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
1576
+ }, Ue = /* @__PURE__ */ new Map(), We = 0, Ge = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
1574
1577
  let u = (e) => {
1575
- We.get(l)?.(e), We.delete(l), r();
1578
+ Ue.get(l)?.(e), Ue.delete(l), r();
1576
1579
  };
1577
- return /* @__PURE__ */ n(ze, {
1580
+ return /* @__PURE__ */ n(Re, {
1578
1581
  modalId: e,
1579
1582
  title: i,
1580
1583
  role: "alertdialog",
1581
1584
  children: [/* @__PURE__ */ t("p", {
1582
- className: Ue.message,
1585
+ className: He.message,
1583
1586
  children: a
1584
1587
  }), /* @__PURE__ */ n("div", {
1585
- className: Ue.actions,
1588
+ className: He.actions,
1586
1589
  children: [/* @__PURE__ */ t(w, {
1587
1590
  variant: "outline",
1588
1591
  onClick: () => u(!1),
@@ -1594,55 +1597,55 @@ var T = {
1594
1597
  })]
1595
1598
  })]
1596
1599
  });
1597
- }, qe = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(ze, {
1600
+ }, Ke = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Re, {
1598
1601
  modalId: e,
1599
1602
  title: i,
1600
1603
  role: "alertdialog",
1601
1604
  children: [/* @__PURE__ */ t("p", {
1602
- className: Ue.message,
1605
+ className: He.message,
1603
1606
  children: a
1604
1607
  }), /* @__PURE__ */ t("div", {
1605
- className: Ue.actions,
1608
+ className: He.actions,
1606
1609
  children: /* @__PURE__ */ t(w, {
1607
1610
  onClick: r,
1608
1611
  children: o
1609
1612
  })
1610
1613
  })]
1611
- }), Je = He({
1612
- ConfirmModal: Ke,
1613
- ErrorModal: qe
1614
- }), Ye = () => {
1615
- let e = X((e) => e.openModal);
1614
+ }), qe = Ve({
1615
+ ConfirmModal: Ge,
1616
+ ErrorModal: Ke
1617
+ }), Je = () => {
1618
+ let e = Z((e) => e.openModal);
1616
1619
  return (t = {}) => new Promise((n) => {
1617
- Ge += 1;
1618
- let r = `confirm-${Ge}`;
1619
- We.set(r, n), e("ConfirmModal", {
1620
+ We += 1;
1621
+ let r = `confirm-${We}`;
1622
+ Ue.set(r, n), e("ConfirmModal", {
1620
1623
  ...t,
1621
1624
  requestId: r
1622
1625
  }, { closeOnEscape: !1 });
1623
1626
  });
1624
- }, Xe = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Ze = () => {
1625
- let e = X((e) => e.openModal);
1627
+ }, Ye = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Xe = () => {
1628
+ let e = Z((e) => e.openModal);
1626
1629
  return { showError: (t, n) => e("ErrorModal", {
1627
1630
  title: n,
1628
- message: Xe(t)
1631
+ message: Ye(t)
1629
1632
  }) };
1630
- }, Qe = v(() => ({})), $e = v(() => ({})), et = () => {
1631
- let e = X((e) => e.modals), t = X((e) => e.openModal);
1633
+ }, Ze = v(() => ({})), Qe = v(() => ({})), $e = () => {
1634
+ let e = Z((e) => e.modals), t = Z((e) => e.openModal);
1632
1635
  return {
1633
1636
  openModal: (e, n = {}, r) => t(e, n, r),
1634
- closeModal: X((e) => e.closeModal),
1635
- closeTopModal: X((e) => e.closeTopModal),
1636
- closeAllModals: X((e) => e.closeAllModals),
1637
+ closeModal: Z((e) => e.closeModal),
1638
+ closeTopModal: Z((e) => e.closeTopModal),
1639
+ closeAllModals: Z((e) => e.closeAllModals),
1637
1640
  isOpen: (t) => e.some((e) => e.name === t),
1638
1641
  count: e.length
1639
1642
  };
1640
- }, tt = { root: "_root_fvxpr_1" }, nt = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1641
- className: `${tt.root} ${r}`,
1643
+ }, et = { root: "_root_fvxpr_1" }, tt = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1644
+ className: `${et.root} ${r}`,
1642
1645
  role: "status",
1643
1646
  "aria-label": e,
1644
1647
  children: [/* @__PURE__ */ t(S, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
1645
- }), rt = {
1648
+ }), nt = {
1646
1649
  viewport: "_viewport_15mi5_1",
1647
1650
  "top-right": "_top-right_15mi5_3",
1648
1651
  "top-left": "_top-left_15mi5_5",
@@ -1655,7 +1658,7 @@ var T = {
1655
1658
  success: "_success_15mi5_19",
1656
1659
  warning: "_warning_15mi5_21",
1657
1660
  error: "_error_15mi5_23"
1658
- }, it = (e) => {
1661
+ }, rt = (e) => {
1659
1662
  let r;
1660
1663
  return r = e === "info" ? /* @__PURE__ */ n("svg", {
1661
1664
  xmlns: "http://www.w3.org/2000/svg",
@@ -1741,7 +1744,7 @@ var T = {
1741
1744
  /* @__PURE__ */ t("path", { d: "m9 9 6 6" })
1742
1745
  ]
1743
1746
  }), r;
1744
- }, at = ({ toast: e, onClose: r }) => {
1747
+ }, it = ({ toast: e, onClose: r }) => {
1745
1748
  let [i, a] = f(!1), o = d(e.duration), c = d(Date.now());
1746
1749
  return s(() => {
1747
1750
  if (i || e.duration <= 0) return;
@@ -1756,7 +1759,7 @@ var T = {
1756
1759
  e.duration,
1757
1760
  e.id
1758
1761
  ]), /* @__PURE__ */ n("article", {
1759
- className: `${rt.toast} ${rt[e.variant]}`,
1762
+ className: `${nt.toast} ${nt[e.variant]}`,
1760
1763
  role: e.variant === "error" ? "alert" : "status",
1761
1764
  "aria-live": e.variant === "error" ? "assertive" : "polite",
1762
1765
  onMouseEnter: () => a(!0),
@@ -1764,9 +1767,9 @@ var T = {
1764
1767
  onFocus: () => a(!0),
1765
1768
  onBlur: () => a(!1),
1766
1769
  children: [
1767
- /* @__PURE__ */ t("div", { children: it(e.variant) }),
1770
+ /* @__PURE__ */ t("div", { children: rt(e.variant) }),
1768
1771
  /* @__PURE__ */ n("div", {
1769
- className: rt.body,
1772
+ className: nt.body,
1770
1773
  children: [
1771
1774
  e.title && /* @__PURE__ */ t("strong", { children: e.title }),
1772
1775
  /* @__PURE__ */ t("div", { children: e.message }),
@@ -1800,11 +1803,11 @@ var T = {
1800
1803
  })
1801
1804
  ]
1802
1805
  });
1803
- }, ot = 0, Q = v((e) => ({
1806
+ }, at = 0, ot = v((e) => ({
1804
1807
  toasts: [],
1805
1808
  showToast: (t) => {
1806
- ot += 1;
1807
- let n = `ds-toast-${ot}`;
1809
+ at += 1;
1810
+ let n = `ds-toast-${at}`;
1808
1811
  return e((e) => ({ toasts: [...e.toasts, {
1809
1812
  variant: "info",
1810
1813
  duration: 5e3,
@@ -1815,18 +1818,18 @@ var T = {
1815
1818
  },
1816
1819
  removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
1817
1820
  clearToasts: () => e({ toasts: [] })
1818
- })), st = () => Q.setState({ toasts: [] }), ct = ({ position: e = "top-right" }) => {
1819
- let n = Q((e) => e.toasts), r = Q((e) => e.removeToast);
1821
+ })), st = () => ot.setState({ toasts: [] }), ct = ({ position: e = "top-right" }) => {
1822
+ let n = ot((e) => e.toasts), r = ot((e) => e.removeToast);
1820
1823
  return /* @__PURE__ */ t("div", {
1821
- className: `${rt.viewport} ${rt[e]}`,
1824
+ className: `${nt.viewport} ${nt[e]}`,
1822
1825
  "aria-label": "Уведомления",
1823
- children: n.map((e) => /* @__PURE__ */ t(at, {
1826
+ children: n.map((e) => /* @__PURE__ */ t(it, {
1824
1827
  toast: e,
1825
1828
  onClose: r
1826
1829
  }, e.id))
1827
1830
  });
1828
1831
  }, lt = () => {
1829
- let e = Q((e) => e.showToast), t = Q((e) => e.removeToast), n = Q((e) => e.clearToasts), r = o((t) => e({
1832
+ let e = ot((e) => e.showToast), t = ot((e) => e.removeToast), n = ot((e) => e.clearToasts), r = o((t) => e({
1830
1833
  ...t,
1831
1834
  variant: "info"
1832
1835
  }), [e]), i = o((t) => e({
@@ -2028,4 +2031,4 @@ var T = {
2028
2031
  }, [t]), n ? p(e, n) : null;
2029
2032
  };
2030
2033
  //#endregion
2031
- export { Ke as ConfirmModal, gt as DSAccordion, b as DSBadge, w as DSButton, k as DSCheckbox, xe as DSDataTable, V as DSDateRange, B as DSDateTimePicker, le as DSDropDown, Se as DSDropDownMultiple, E as DSFieldLabel, D as DSFieldMessage, Fe as DSFileInput, je as DSFilters, we as DSIcon, Ee as DSInfoBlock, De as DSInput, S as DSLoader, Be as DSModal, ze as DSModalFrame, nt as DSPageLoader, ht as DSPopup, _t as DSPortal, ke as DSRadioButton, U as DSSkeleton, K as DSSort, at as DSToast, ct as DSToastProvider, dt as DSTooltip, pt as DSVideoPlayerFrame, qe as ErrorModal, Ve as ModalSystemProvider, Je as builtInModalRegistry, He as defineModalRegistry, F as formatDateTimeLocalValue, Xe as getErrorMessage, se as getNextEnabledOptionIndex, ie as isValidDateRange, I as parseDateTimeLocalValue, Le as resetModalStore, st as resetToastStore, Ye as useConfirmModal, Qe as useConfirmModalStore, Ze as useErrorModal, $e as useErrorModalStore, et as useModals, X as useModalsStore, lt as useToast, Q as useToastStore, fe as validateDSDataTableData };
2034
+ export { Ge as ConfirmModal, gt as DSAccordion, b as DSBadge, w as DSButton, k as DSCheckbox, be as DSDataTable, re as DSDateRange, B as DSDateTimePicker, se as DSDropDown, xe as DSDropDownMultiple, E as DSFieldLabel, D as DSFieldMessage, Pe as DSFileInput, Ae as DSFilters, Ce as DSIcon, Te as DSInfoBlock, Ee as DSInput, S as DSLoader, ze as DSModal, Re as DSModalFrame, tt as DSPageLoader, ht as DSPopup, _t as DSPortal, Oe as DSRadioButton, W as DSSkeleton, le as DSSort, it as DSToast, ct as DSToastProvider, dt as DSTooltip, pt as DSVideoPlayerFrame, Ke as ErrorModal, Be as ModalSystemProvider, qe as builtInModalRegistry, Ve as defineModalRegistry, F as formatDateTimeLocalValue, Ye as getErrorMessage, q as getNextEnabledOptionIndex, H as isValidDateRange, I as parseDateTimeLocalValue, Ie as resetModalStore, st as resetToastStore, Je as useConfirmModal, Ze as useConfirmModalStore, Xe as useErrorModal, Qe as useErrorModalStore, $e as useModals, Z as useModalsStore, lt as useToast, ot as useToastStore, de as validateDSDataTableData };