@efficiency-point/design-system 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -41
- package/dist/components/DSAccordion/DSAccordion.d.ts +9 -3
- package/dist/components/DSAccordion/DSAccordion.d.ts.map +1 -1
- package/dist/components/DSButton/DSButton.d.ts +0 -1
- package/dist/components/DSButton/DSButton.d.ts.map +1 -1
- package/dist/components/DSDateTimePicker/DSDateTimePicker.d.ts.map +1 -1
- package/dist/components/DSDropDownMultiple/DSDropDownMultiple.d.ts +6 -2
- package/dist/components/DSDropDownMultiple/DSDropDownMultiple.d.ts.map +1 -1
- package/dist/components/DSLoader/DSLoader.d.ts +3 -7
- package/dist/components/DSLoader/DSLoader.d.ts.map +1 -1
- package/dist/components/DSPageLoader/DSPageLoader.d.ts +1 -5
- package/dist/components/DSPageLoader/DSPageLoader.d.ts.map +1 -1
- package/dist/components/DSVideoPlayerFrame/DSVideoPlayerFrame.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +1029 -800
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/DSPopup/DSPopup.d.ts +0 -9
- package/dist/components/DSPopup/DSPopup.d.ts.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -33,17 +33,28 @@ var y = {
|
|
|
33
33
|
})
|
|
34
34
|
]
|
|
35
35
|
}), x = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
36
|
+
container: "_container_dhg26_1",
|
|
37
|
+
inner: "_inner_dhg26_21",
|
|
38
|
+
line: "_line_dhg26_39",
|
|
39
|
+
primary: "_primary_dhg26_57",
|
|
40
|
+
secondary: "_secondary_dhg26_63",
|
|
41
|
+
outline: "_outline_dhg26_69",
|
|
42
|
+
ghost: "_ghost_dhg26_75",
|
|
43
|
+
empty: "_empty_dhg26_81",
|
|
44
|
+
destructive: "_destructive_dhg26_87",
|
|
45
|
+
destructiveOutline: "_destructiveOutline_dhg26_93",
|
|
46
|
+
grow: "_grow_dhg26_1"
|
|
47
|
+
}, S = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
|
|
48
|
+
className: `${x.container} ${x[e]}`,
|
|
49
|
+
children: /* @__PURE__ */ n("div", {
|
|
50
|
+
className: `${x.inner} ${x[e]}`,
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ t("div", { className: `${x.line} ${x[e]}` }),
|
|
53
|
+
/* @__PURE__ */ t("div", { className: `${x.line} ${x[e]}` }),
|
|
54
|
+
/* @__PURE__ */ t("div", { className: `${x.line} ${x[e]}` }),
|
|
55
|
+
/* @__PURE__ */ t("div", { className: `${x.line} ${x[e]}` })
|
|
56
|
+
]
|
|
57
|
+
})
|
|
47
58
|
}), C = {
|
|
48
59
|
button: "_button_1gql6_1",
|
|
49
60
|
sm: "_sm_1gql6_43",
|
|
@@ -56,17 +67,14 @@ var y = {
|
|
|
56
67
|
empty: "_empty_1gql6_127",
|
|
57
68
|
destructive: "_destructive_1gql6_139",
|
|
58
69
|
destructiveOutline: "_destructiveOutline_1gql6_147"
|
|
59
|
-
}, w = i(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1,
|
|
60
|
-
ref:
|
|
61
|
-
className: `${C.button} ${C[n]} ${C[r]} ${
|
|
62
|
-
disabled:
|
|
70
|
+
}, w = i(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1, disabled: a, type: o = "button", className: s = "", ...c }, l) => /* @__PURE__ */ t("button", {
|
|
71
|
+
ref: l,
|
|
72
|
+
className: `${C.button} ${C[n]} ${C[r]} ${s}`,
|
|
73
|
+
disabled: a || i,
|
|
63
74
|
"aria-busy": i || void 0,
|
|
64
|
-
...
|
|
65
|
-
type:
|
|
66
|
-
children: i ? /* @__PURE__ */ t(S, {
|
|
67
|
-
variant: "light",
|
|
68
|
-
label: a
|
|
69
|
-
}) : e
|
|
75
|
+
...c,
|
|
76
|
+
type: o,
|
|
77
|
+
children: i ? /* @__PURE__ */ t(S, { variant: n }) : e
|
|
70
78
|
}));
|
|
71
79
|
w.displayName = "DSButton";
|
|
72
80
|
var T = {
|
|
@@ -78,7 +86,7 @@ var T = {
|
|
|
78
86
|
disabled: "_disabled_fa00b_47",
|
|
79
87
|
message: "_message_fa00b_55",
|
|
80
88
|
success: "_success_fa00b_71"
|
|
81
|
-
},
|
|
89
|
+
}, ee = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
|
|
82
90
|
className: `${T.label} ${a ? T.disabled : ""} ${o}`,
|
|
83
91
|
...s,
|
|
84
92
|
children: [
|
|
@@ -93,28 +101,28 @@ var T = {
|
|
|
93
101
|
children: i
|
|
94
102
|
})
|
|
95
103
|
]
|
|
96
|
-
}),
|
|
104
|
+
}), E = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
|
|
97
105
|
id: r,
|
|
98
106
|
className: `${T.message} ${T[n]} ${a}`,
|
|
99
107
|
role: i && n === "error" ? "alert" : void 0,
|
|
100
108
|
"aria-live": i && n !== "error" ? "polite" : void 0,
|
|
101
109
|
children: e
|
|
102
|
-
}),
|
|
110
|
+
}), D = {
|
|
103
111
|
wrapper: "_wrapper_1gq36_1",
|
|
104
112
|
label: "_label_1gq36_3",
|
|
105
113
|
input: "_input_1gq36_5",
|
|
106
114
|
control: "_control_1gq36_7",
|
|
107
115
|
disabled: "_disabled_1gq36_13",
|
|
108
116
|
controlError: "_controlError_1gq36_17"
|
|
109
|
-
},
|
|
117
|
+
}, O = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: l = !1, readOnly: u = !1, className: f = "", name: p, id: m, indeterminate: h = !1, ...g }) => {
|
|
110
118
|
let _ = c(), v = m ?? `ds-checkbox-${p ?? _}`, y = d(null), b = a ? `${v}-hint` : void 0, x = o ? `${v}-error` : void 0;
|
|
111
119
|
return s(() => {
|
|
112
120
|
y.current && (y.current.indeterminate = h && !e);
|
|
113
121
|
}, [e, h]), /* @__PURE__ */ n("div", {
|
|
114
|
-
className: `${
|
|
122
|
+
className: `${D.wrapper} ${f}`,
|
|
115
123
|
children: [
|
|
116
124
|
/* @__PURE__ */ n("label", {
|
|
117
|
-
className: `${
|
|
125
|
+
className: `${D.label} ${l ? D.disabled : ""}`,
|
|
118
126
|
htmlFor: v,
|
|
119
127
|
children: [
|
|
120
128
|
/* @__PURE__ */ t("input", {
|
|
@@ -127,32 +135,32 @@ var T = {
|
|
|
127
135
|
"aria-readonly": u || void 0,
|
|
128
136
|
"aria-invalid": !!o,
|
|
129
137
|
"aria-describedby": [b, x].filter(Boolean).join(" ") || void 0,
|
|
130
|
-
className:
|
|
138
|
+
className: D.input,
|
|
131
139
|
onChange: (e) => {
|
|
132
140
|
u || r?.(e.target.checked, e);
|
|
133
141
|
},
|
|
134
142
|
...g
|
|
135
143
|
}),
|
|
136
144
|
/* @__PURE__ */ t("span", {
|
|
137
|
-
className: `${
|
|
145
|
+
className: `${D.control} ${o ? D.controlError : ""}`,
|
|
138
146
|
"aria-hidden": "true",
|
|
139
147
|
children: h && !e ? "−" : e ? "✓" : ""
|
|
140
148
|
}),
|
|
141
149
|
i && /* @__PURE__ */ t("span", { children: i })
|
|
142
150
|
]
|
|
143
151
|
}),
|
|
144
|
-
a && !o && /* @__PURE__ */ t(
|
|
152
|
+
a && !o && /* @__PURE__ */ t(E, {
|
|
145
153
|
id: b,
|
|
146
154
|
children: a
|
|
147
155
|
}),
|
|
148
|
-
o && /* @__PURE__ */ t(
|
|
156
|
+
o && /* @__PURE__ */ t(E, {
|
|
149
157
|
id: x,
|
|
150
158
|
variant: "error",
|
|
151
159
|
children: o
|
|
152
160
|
})
|
|
153
161
|
]
|
|
154
162
|
});
|
|
155
|
-
},
|
|
163
|
+
}, k = {
|
|
156
164
|
wrapper: "_wrapper_1or7y_1",
|
|
157
165
|
trigger: "_trigger_1or7y_17",
|
|
158
166
|
lg: "_lg_1or7y_51",
|
|
@@ -173,7 +181,7 @@ var T = {
|
|
|
173
181
|
outside: "_outside_1or7y_309",
|
|
174
182
|
selected: "_selected_1or7y_317",
|
|
175
183
|
timeLabel: "_timeLabel_1or7y_337"
|
|
176
|
-
},
|
|
184
|
+
}, A = [
|
|
177
185
|
"Пн",
|
|
178
186
|
"Вт",
|
|
179
187
|
"Ср",
|
|
@@ -181,7 +189,7 @@ var T = {
|
|
|
181
189
|
"Пт",
|
|
182
190
|
"Сб",
|
|
183
191
|
"Вс"
|
|
184
|
-
],
|
|
192
|
+
], j = [
|
|
185
193
|
"Январь",
|
|
186
194
|
"Февраль",
|
|
187
195
|
"Март",
|
|
@@ -194,11 +202,11 @@ var T = {
|
|
|
194
202
|
"Октябрь",
|
|
195
203
|
"Ноябрь",
|
|
196
204
|
"Декабрь"
|
|
197
|
-
],
|
|
205
|
+
], M = (e) => String(e).padStart(2, "0"), N = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), P = (e, t) => {
|
|
198
206
|
if (!e) return "";
|
|
199
|
-
let n = `${e.getFullYear()}-${
|
|
207
|
+
let n = `${e.getFullYear()}-${M(e.getMonth() + 1)}-${M(e.getDate())}`, r = `${M(e.getHours())}:${M(e.getMinutes())}`;
|
|
200
208
|
return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
|
|
201
|
-
},
|
|
209
|
+
}, F = (e, t) => {
|
|
202
210
|
if (!e) return null;
|
|
203
211
|
if (t === "time") {
|
|
204
212
|
let t = /^(\d{2}):(\d{2})$/.exec(e);
|
|
@@ -208,182 +216,188 @@ var T = {
|
|
|
208
216
|
let i = /* @__PURE__ */ new Date();
|
|
209
217
|
return i.setHours(n, r, 0, 0), i;
|
|
210
218
|
}
|
|
211
|
-
|
|
219
|
+
if (t === "date") {
|
|
220
|
+
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
|
|
221
|
+
if (!t) return null;
|
|
222
|
+
let n = Number(t[1]), r = Number(t[2]) - 1, i = Number(t[3]), a = new Date(n, r, i, 12);
|
|
223
|
+
return a.getFullYear() !== n || a.getMonth() !== r || a.getDate() !== i ? null : a;
|
|
224
|
+
}
|
|
225
|
+
let n = new Date(e);
|
|
212
226
|
return Number.isNaN(n.getTime()) ? null : n;
|
|
213
|
-
},
|
|
227
|
+
}, I = (e, t) => {
|
|
214
228
|
if (!e) return "";
|
|
215
|
-
let n = `${
|
|
229
|
+
let n = `${M(e.getDate())}.${M(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${M(e.getHours())}:${M(e.getMinutes())}`;
|
|
216
230
|
return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
|
|
217
|
-
},
|
|
231
|
+
}, L = (e) => {
|
|
218
232
|
let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
|
|
219
233
|
return r.setDate(t.getDate() - n), Array.from({ length: 42 }, (e, t) => {
|
|
220
234
|
let n = new Date(r);
|
|
221
235
|
return n.setDate(r.getDate() + t), n;
|
|
222
236
|
});
|
|
223
|
-
},
|
|
224
|
-
let r =
|
|
225
|
-
return !!(t && r <
|
|
226
|
-
},
|
|
227
|
-
let
|
|
237
|
+
}, R = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), z = (e, t, n) => {
|
|
238
|
+
let r = N(e).getTime();
|
|
239
|
+
return !!(t && r < N(t).getTime() || n && r > N(n).getTime());
|
|
240
|
+
}, B = 8, V = 6, H = ({ 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: D = "" }) => {
|
|
241
|
+
let O = c(), M = w ?? `ds-date-time-${T ?? O}`, N = g ? `${M}-hint` : void 0, H = _ ? `${M}-error` : void 0, U = d(null), W = d(null), te = d(null), [G, K] = f(!1), [q, J] = f(r ?? /* @__PURE__ */ new Date()), [ne, re] = f(P(r, "time")), [ie, ae] = f(null), oe = u(() => L(q), [q]), se = a !== "time", ce = a !== "date";
|
|
228
242
|
s(() => {
|
|
229
|
-
r &&
|
|
243
|
+
r && J(r), re(P(r, "time"));
|
|
230
244
|
}, [r]);
|
|
231
|
-
let
|
|
232
|
-
let e =
|
|
245
|
+
let le = o(() => {
|
|
246
|
+
let e = W.current, t = te.current;
|
|
233
247
|
if (!e || !t) return;
|
|
234
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom -
|
|
235
|
-
|
|
248
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - B, o = n.top - B, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(B, n.top - r.height - V) : n.bottom + V, u = n.left, d = i - r.width - B;
|
|
249
|
+
ae({
|
|
236
250
|
top: l,
|
|
237
|
-
left: Math.max(
|
|
251
|
+
left: Math.max(B, Math.min(u, d)),
|
|
238
252
|
maxHeight: c
|
|
239
253
|
});
|
|
240
254
|
}, []);
|
|
241
255
|
l(() => {
|
|
242
|
-
if (!
|
|
243
|
-
|
|
256
|
+
if (!G) {
|
|
257
|
+
ae(null);
|
|
244
258
|
return;
|
|
245
259
|
}
|
|
246
|
-
return
|
|
247
|
-
window.removeEventListener("resize",
|
|
260
|
+
return le(), window.addEventListener("resize", le), window.addEventListener("scroll", le, !0), () => {
|
|
261
|
+
window.removeEventListener("resize", le), window.removeEventListener("scroll", le, !0);
|
|
248
262
|
};
|
|
249
263
|
}, [
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
264
|
+
G,
|
|
265
|
+
le,
|
|
266
|
+
q,
|
|
267
|
+
ne
|
|
254
268
|
]), s(() => {
|
|
255
|
-
if (!
|
|
269
|
+
if (!G) return;
|
|
256
270
|
let e = (e) => {
|
|
257
|
-
let t = e.target, n =
|
|
258
|
-
!n && !r &&
|
|
271
|
+
let t = e.target, n = U.current?.contains(t), r = te.current?.contains(t);
|
|
272
|
+
!n && !r && K(!1);
|
|
259
273
|
}, t = (e) => {
|
|
260
|
-
e.key === "Escape" && (
|
|
274
|
+
e.key === "Escape" && (K(!1), W.current?.focus());
|
|
261
275
|
};
|
|
262
276
|
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
263
277
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
264
278
|
};
|
|
265
|
-
}, [
|
|
266
|
-
let
|
|
267
|
-
if (
|
|
268
|
-
let t = new Date(e);
|
|
269
|
-
t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" &&
|
|
270
|
-
},
|
|
271
|
-
if (
|
|
279
|
+
}, [G]);
|
|
280
|
+
let ue = (e) => {
|
|
281
|
+
if (z(e, x, S)) return;
|
|
282
|
+
let t = a === "date" ? F(P(e, "date"), "date") : new Date(e);
|
|
283
|
+
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && K(!1));
|
|
284
|
+
}, Y = (e) => {
|
|
285
|
+
if (re(e), !e) {
|
|
272
286
|
i?.(null);
|
|
273
287
|
return;
|
|
274
288
|
}
|
|
275
|
-
let t =
|
|
289
|
+
let t = F(e, "time");
|
|
276
290
|
if (!t) return;
|
|
277
|
-
let n = new Date(a === "datetime" ? r ??
|
|
291
|
+
let n = new Date(a === "datetime" ? r ?? q : /* @__PURE__ */ new Date());
|
|
278
292
|
n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
|
|
279
|
-
},
|
|
280
|
-
ref:
|
|
281
|
-
className:
|
|
293
|
+
}, de = h ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), fe = [N, H].filter(Boolean).join(" ") || void 0, pe = G && !y ? /* @__PURE__ */ n("div", {
|
|
294
|
+
ref: te,
|
|
295
|
+
className: k.panel,
|
|
282
296
|
role: "dialog",
|
|
283
|
-
"aria-label": m ??
|
|
284
|
-
style:
|
|
285
|
-
top:
|
|
286
|
-
left:
|
|
287
|
-
maxHeight:
|
|
297
|
+
"aria-label": m ?? de,
|
|
298
|
+
style: ie ? {
|
|
299
|
+
top: ie.top,
|
|
300
|
+
left: ie.left,
|
|
301
|
+
maxHeight: ie.maxHeight
|
|
288
302
|
} : {
|
|
289
303
|
visibility: "hidden",
|
|
290
304
|
top: 0,
|
|
291
305
|
left: 0
|
|
292
306
|
},
|
|
293
|
-
children: [
|
|
307
|
+
children: [se && /* @__PURE__ */ n(e, { children: [
|
|
294
308
|
/* @__PURE__ */ n("div", {
|
|
295
|
-
className:
|
|
309
|
+
className: k.calendarHeader,
|
|
296
310
|
children: [
|
|
297
311
|
/* @__PURE__ */ t("button", {
|
|
298
312
|
type: "button",
|
|
299
|
-
className:
|
|
313
|
+
className: k.nav,
|
|
300
314
|
"aria-label": "Предыдущий месяц",
|
|
301
|
-
onClick: () =>
|
|
315
|
+
onClick: () => J(new Date(q.getFullYear(), q.getMonth() - 1, 1)),
|
|
302
316
|
children: "‹"
|
|
303
317
|
}),
|
|
304
318
|
/* @__PURE__ */ t("select", {
|
|
305
|
-
className:
|
|
319
|
+
className: k.monthSelect,
|
|
306
320
|
"aria-label": "Месяц",
|
|
307
|
-
value:
|
|
308
|
-
onChange: (e) =>
|
|
309
|
-
children:
|
|
321
|
+
value: q.getMonth(),
|
|
322
|
+
onChange: (e) => J(new Date(q.getFullYear(), Number(e.target.value), 1)),
|
|
323
|
+
children: j.map((e, n) => /* @__PURE__ */ t("option", {
|
|
310
324
|
value: n,
|
|
311
325
|
children: e
|
|
312
326
|
}, e))
|
|
313
327
|
}),
|
|
314
328
|
/* @__PURE__ */ t("input", {
|
|
315
|
-
className:
|
|
329
|
+
className: k.yearInput,
|
|
316
330
|
type: "number",
|
|
317
331
|
"aria-label": "Год",
|
|
318
|
-
value:
|
|
319
|
-
onChange: (e) =>
|
|
332
|
+
value: q.getFullYear(),
|
|
333
|
+
onChange: (e) => J(new Date(Number(e.target.value), q.getMonth(), 1))
|
|
320
334
|
}),
|
|
321
335
|
/* @__PURE__ */ t("button", {
|
|
322
336
|
type: "button",
|
|
323
|
-
className:
|
|
337
|
+
className: k.nav,
|
|
324
338
|
"aria-label": "Следующий месяц",
|
|
325
|
-
onClick: () =>
|
|
339
|
+
onClick: () => J(new Date(q.getFullYear(), q.getMonth() + 1, 1)),
|
|
326
340
|
children: "›"
|
|
327
341
|
})
|
|
328
342
|
]
|
|
329
343
|
}),
|
|
330
344
|
/* @__PURE__ */ t("div", {
|
|
331
|
-
className:
|
|
332
|
-
children:
|
|
345
|
+
className: k.weekdays,
|
|
346
|
+
children: A.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
|
|
333
347
|
}),
|
|
334
348
|
/* @__PURE__ */ t("div", {
|
|
335
|
-
className:
|
|
336
|
-
children:
|
|
337
|
-
let n =
|
|
349
|
+
className: k.days,
|
|
350
|
+
children: oe.map((e) => {
|
|
351
|
+
let n = R(r, e);
|
|
338
352
|
return /* @__PURE__ */ t("button", {
|
|
339
353
|
type: "button",
|
|
340
|
-
className: `${
|
|
341
|
-
disabled:
|
|
354
|
+
className: `${k.day} ${e.getMonth() === q.getMonth() ? "" : k.outside} ${n ? k.selected : ""}`,
|
|
355
|
+
disabled: z(e, x, S),
|
|
342
356
|
"aria-pressed": n,
|
|
343
|
-
onClick: () =>
|
|
357
|
+
onClick: () => ue(e),
|
|
344
358
|
children: e.getDate()
|
|
345
359
|
}, e.toISOString());
|
|
346
360
|
})
|
|
347
361
|
})
|
|
348
|
-
] }),
|
|
349
|
-
className:
|
|
362
|
+
] }), ce && /* @__PURE__ */ n("label", {
|
|
363
|
+
className: k.timeLabel,
|
|
350
364
|
children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
|
|
351
|
-
className:
|
|
365
|
+
className: k.timeInput,
|
|
352
366
|
type: "time",
|
|
353
|
-
value:
|
|
354
|
-
onChange: (e) =>
|
|
367
|
+
value: ne,
|
|
368
|
+
onChange: (e) => Y(e.target.value)
|
|
355
369
|
})]
|
|
356
370
|
})]
|
|
357
371
|
}) : null;
|
|
358
372
|
return /* @__PURE__ */ n("div", {
|
|
359
|
-
ref:
|
|
360
|
-
className: `${
|
|
373
|
+
ref: U,
|
|
374
|
+
className: `${k.wrapper} ${D}`,
|
|
361
375
|
children: [
|
|
362
|
-
m && /* @__PURE__ */ t(
|
|
363
|
-
htmlFor:
|
|
376
|
+
m && /* @__PURE__ */ t(ee, {
|
|
377
|
+
htmlFor: M,
|
|
364
378
|
required: b,
|
|
365
379
|
disabled: v,
|
|
366
380
|
children: m
|
|
367
381
|
}),
|
|
368
382
|
/* @__PURE__ */ n("button", {
|
|
369
|
-
ref:
|
|
370
|
-
id:
|
|
383
|
+
ref: W,
|
|
384
|
+
id: M,
|
|
371
385
|
name: T,
|
|
372
386
|
type: "button",
|
|
373
|
-
className: `${
|
|
387
|
+
className: `${k.trigger} ${k[C]} ${_ ? k.error : ""}`,
|
|
374
388
|
disabled: v,
|
|
375
389
|
"aria-readonly": y || void 0,
|
|
376
|
-
"aria-expanded":
|
|
390
|
+
"aria-expanded": G,
|
|
377
391
|
"aria-haspopup": "dialog",
|
|
378
|
-
"aria-describedby":
|
|
392
|
+
"aria-describedby": fe,
|
|
379
393
|
onClick: () => {
|
|
380
|
-
y ||
|
|
394
|
+
y || K((e) => !e);
|
|
381
395
|
},
|
|
382
396
|
children: [/* @__PURE__ */ t("span", {
|
|
383
|
-
className: r ?
|
|
384
|
-
children:
|
|
397
|
+
className: r ? k.value : k.placeholder,
|
|
398
|
+
children: I(r, a) || de
|
|
385
399
|
}), /* @__PURE__ */ t("span", {
|
|
386
|
-
className: [
|
|
400
|
+
className: [k.chevron, pe ? k.chevronOpen : ""].filter(Boolean).join(" "),
|
|
387
401
|
"aria-hidden": "true",
|
|
388
402
|
children: /* @__PURE__ */ t("svg", {
|
|
389
403
|
viewBox: "0 0 20 20",
|
|
@@ -398,32 +412,32 @@ var T = {
|
|
|
398
412
|
})
|
|
399
413
|
})]
|
|
400
414
|
}),
|
|
401
|
-
|
|
402
|
-
g && !_ && /* @__PURE__ */ t(
|
|
403
|
-
id:
|
|
415
|
+
pe && p(pe, document.body),
|
|
416
|
+
g && !_ && /* @__PURE__ */ t(E, {
|
|
417
|
+
id: N,
|
|
404
418
|
children: g
|
|
405
419
|
}),
|
|
406
|
-
_ && /* @__PURE__ */ t(
|
|
407
|
-
id:
|
|
420
|
+
_ && /* @__PURE__ */ t(E, {
|
|
421
|
+
id: H,
|
|
408
422
|
variant: "error",
|
|
409
423
|
children: _
|
|
410
424
|
})
|
|
411
425
|
]
|
|
412
426
|
});
|
|
413
|
-
},
|
|
427
|
+
}, U = {
|
|
414
428
|
root: "_root_1q42e_1",
|
|
415
429
|
legend: "_legend_1q42e_3",
|
|
416
430
|
range: "_range_1q42e_5"
|
|
417
|
-
},
|
|
431
|
+
}, W = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), te = ({ 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 = "" }) => {
|
|
418
432
|
let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
|
|
419
|
-
i?.(e),
|
|
433
|
+
i?.(e), W(e) && r?.(e);
|
|
420
434
|
};
|
|
421
435
|
return /* @__PURE__ */ n("fieldset", {
|
|
422
|
-
className: `${
|
|
436
|
+
className: `${U.root} ${h}`,
|
|
423
437
|
disabled: f,
|
|
424
438
|
children: [/* @__PURE__ */ n("div", {
|
|
425
|
-
className:
|
|
426
|
-
children: [/* @__PURE__ */ t(
|
|
439
|
+
className: U.range,
|
|
440
|
+
children: [/* @__PURE__ */ t(H, {
|
|
427
441
|
value: e.from,
|
|
428
442
|
mode: a === "datetime" ? "datetime" : a,
|
|
429
443
|
label: o,
|
|
@@ -437,7 +451,7 @@ var T = {
|
|
|
437
451
|
...e,
|
|
438
452
|
from: t
|
|
439
453
|
})
|
|
440
|
-
}), /* @__PURE__ */ t(
|
|
454
|
+
}), /* @__PURE__ */ t(H, {
|
|
441
455
|
value: e.to,
|
|
442
456
|
mode: a === "datetime" ? "datetime" : a,
|
|
443
457
|
label: s,
|
|
@@ -452,9 +466,9 @@ var T = {
|
|
|
452
466
|
to: t
|
|
453
467
|
})
|
|
454
468
|
})]
|
|
455
|
-
}), c && !g && /* @__PURE__ */ t(
|
|
469
|
+
}), c && !g && /* @__PURE__ */ t(E, { children: c })]
|
|
456
470
|
});
|
|
457
|
-
},
|
|
471
|
+
}, G = {
|
|
458
472
|
group: "_group_1fs9e_1",
|
|
459
473
|
skeleton: "_skeleton_1fs9e_3",
|
|
460
474
|
text: "_text_1fs9e_5",
|
|
@@ -462,17 +476,17 @@ var T = {
|
|
|
462
476
|
circular: "_circular_1fs9e_9",
|
|
463
477
|
animated: "_animated_1fs9e_11",
|
|
464
478
|
"ds-skeleton": "_ds-skeleton_1fs9e_1"
|
|
465
|
-
},
|
|
466
|
-
className: `${
|
|
479
|
+
}, K = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
|
|
480
|
+
className: `${G.group} ${o}`,
|
|
467
481
|
"aria-hidden": "true",
|
|
468
482
|
children: Array.from({ length: Math.max(1, i) }, (o, s) => /* @__PURE__ */ t("span", {
|
|
469
|
-
className: `${
|
|
483
|
+
className: `${G.skeleton} ${G[e]} ${a ? G.animated : ""}`,
|
|
470
484
|
style: {
|
|
471
485
|
width: s === i - 1 && i > 1 ? "70%" : n,
|
|
472
486
|
height: r
|
|
473
487
|
}
|
|
474
488
|
}, s))
|
|
475
|
-
}),
|
|
489
|
+
}), q = {
|
|
476
490
|
wrapper: "_wrapper_1f1hc_1",
|
|
477
491
|
label: "_label_1f1hc_17",
|
|
478
492
|
container: "_container_1f1hc_29",
|
|
@@ -491,26 +505,26 @@ var T = {
|
|
|
491
505
|
message: "_message_1f1hc_349",
|
|
492
506
|
error: "_error_1f1hc_351",
|
|
493
507
|
errorState: "_errorState_1f1hc_377"
|
|
494
|
-
},
|
|
508
|
+
}, J = 8, ne = 6, re = 120, ie = (e, t, n) => {
|
|
495
509
|
if (!e.length) return -1;
|
|
496
510
|
for (let r = 0; r < e.length; r += 1) {
|
|
497
511
|
let i = (t + r * n + e.length) % e.length;
|
|
498
512
|
if (!e[i]?.disabled) return i;
|
|
499
513
|
}
|
|
500
514
|
return -1;
|
|
501
|
-
},
|
|
515
|
+
}, ae = (e) => {
|
|
502
516
|
if (typeof e == "number") return e;
|
|
503
517
|
if (typeof e == "string") {
|
|
504
518
|
let t = Number.parseFloat(e);
|
|
505
519
|
if (Number.isFinite(t)) return t;
|
|
506
520
|
}
|
|
507
521
|
return Infinity;
|
|
508
|
-
},
|
|
509
|
-
let
|
|
510
|
-
let e =
|
|
522
|
+
}, oe = ({ 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 }) => {
|
|
523
|
+
let E = c(), D = C ?? `ds-dropdown-${S ?? E}`, O = `${D}-listbox`, [k, A] = f(!1), [j, M] = f(null), N = d(null), P = d(null), F = d(null), I = d([]), L = u(() => e.find((e) => e.value === r), [e, r]), R = y ? `${D}-hint` : void 0, z = _ ? `${D}-error` : void 0, B = [R, z].filter(Boolean).join(" ") || void 0, V = m && h, H = o(() => {
|
|
524
|
+
let e = P.current, t = F.current;
|
|
511
525
|
if (!e || !t) return;
|
|
512
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom -
|
|
513
|
-
|
|
526
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - J, o = n.top - J, s = a < r.height && o > a, c = Math.max(re, s ? o : a), l = ae(T), u = Math.min(c, l), d = n.left, f = i - n.width - J, p = Math.max(J, Math.min(d, f)), m = s ? Math.max(J, n.top - r.height - ne) : n.bottom + ne;
|
|
527
|
+
M({
|
|
514
528
|
top: m,
|
|
515
529
|
left: p,
|
|
516
530
|
width: n.width,
|
|
@@ -518,48 +532,48 @@ var T = {
|
|
|
518
532
|
});
|
|
519
533
|
}, [T]);
|
|
520
534
|
l(() => {
|
|
521
|
-
if (!
|
|
522
|
-
|
|
535
|
+
if (!k) {
|
|
536
|
+
M(null);
|
|
523
537
|
return;
|
|
524
538
|
}
|
|
525
|
-
return
|
|
526
|
-
window.removeEventListener("resize",
|
|
539
|
+
return H(), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
|
|
540
|
+
window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
|
|
527
541
|
};
|
|
528
542
|
}, [
|
|
529
|
-
|
|
530
|
-
|
|
543
|
+
k,
|
|
544
|
+
H,
|
|
531
545
|
e.length
|
|
532
546
|
]), s(() => {
|
|
533
|
-
if (!
|
|
547
|
+
if (!k) return;
|
|
534
548
|
let e = (e) => {
|
|
535
|
-
let t = e.target, n =
|
|
536
|
-
!n && !r &&
|
|
549
|
+
let t = e.target, n = N.current?.contains(t), r = F.current?.contains(t);
|
|
550
|
+
!n && !r && A(!1);
|
|
537
551
|
}, t = (e) => {
|
|
538
|
-
e.key === "Escape" && (
|
|
552
|
+
e.key === "Escape" && (A(!1), P.current?.focus());
|
|
539
553
|
};
|
|
540
554
|
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
541
555
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
542
556
|
};
|
|
543
|
-
}, [
|
|
544
|
-
let
|
|
545
|
-
let r =
|
|
557
|
+
}, [k]);
|
|
558
|
+
let U = (t, n) => {
|
|
559
|
+
let r = ie(e, t, n);
|
|
546
560
|
if (r === -1) return;
|
|
547
|
-
let i =
|
|
561
|
+
let i = I.current[r];
|
|
548
562
|
i?.focus(), i?.scrollIntoView({ block: "nearest" });
|
|
549
|
-
},
|
|
550
|
-
e.disabled || (i?.(e.value, e),
|
|
551
|
-
},
|
|
552
|
-
ref:
|
|
553
|
-
id:
|
|
554
|
-
className:
|
|
563
|
+
}, W = (e) => {
|
|
564
|
+
e.disabled || (i?.(e.value, e), A(!1), P.current?.focus());
|
|
565
|
+
}, te = k ? /* @__PURE__ */ t("ul", {
|
|
566
|
+
ref: F,
|
|
567
|
+
id: O,
|
|
568
|
+
className: q.menu,
|
|
555
569
|
role: "listbox",
|
|
556
570
|
"aria-label": g,
|
|
557
|
-
style:
|
|
571
|
+
style: j ? {
|
|
558
572
|
position: "fixed",
|
|
559
|
-
top:
|
|
560
|
-
left:
|
|
561
|
-
width:
|
|
562
|
-
maxHeight:
|
|
573
|
+
top: j.top,
|
|
574
|
+
left: j.left,
|
|
575
|
+
width: j.width,
|
|
576
|
+
maxHeight: j.maxHeight
|
|
563
577
|
} : {
|
|
564
578
|
position: "fixed",
|
|
565
579
|
top: 0,
|
|
@@ -573,30 +587,30 @@ var T = {
|
|
|
573
587
|
role: "presentation",
|
|
574
588
|
children: /* @__PURE__ */ n("button", {
|
|
575
589
|
ref: (e) => {
|
|
576
|
-
|
|
590
|
+
I.current[a] = e;
|
|
577
591
|
},
|
|
578
592
|
type: "button",
|
|
579
593
|
role: "option",
|
|
580
594
|
"aria-selected": o,
|
|
581
595
|
disabled: i.disabled,
|
|
582
596
|
className: [
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
o ?
|
|
597
|
+
q[v],
|
|
598
|
+
q.option,
|
|
599
|
+
o ? q.selected : ""
|
|
586
600
|
].filter(Boolean).join(" "),
|
|
587
|
-
onClick: () =>
|
|
601
|
+
onClick: () => W(i),
|
|
588
602
|
onKeyDown: (t) => {
|
|
589
603
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
590
604
|
t.preventDefault();
|
|
591
605
|
let e = t.key === "ArrowDown" ? 1 : -1;
|
|
592
|
-
|
|
606
|
+
U(a + e, e);
|
|
593
607
|
}
|
|
594
|
-
if (t.key === "Tab" &&
|
|
608
|
+
if (t.key === "Tab" && A(!1), t.key === "Home" || t.key === "End") {
|
|
595
609
|
t.preventDefault();
|
|
596
610
|
let n = t.key === "Home" ? 1 : -1;
|
|
597
|
-
|
|
611
|
+
U(t.key === "Home" ? 0 : e.length - 1, n);
|
|
598
612
|
}
|
|
599
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
613
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), W(i));
|
|
600
614
|
},
|
|
601
615
|
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t("span", {
|
|
602
616
|
"aria-hidden": "true",
|
|
@@ -607,59 +621,59 @@ var T = {
|
|
|
607
621
|
})
|
|
608
622
|
}) : null;
|
|
609
623
|
return /* @__PURE__ */ n("div", {
|
|
610
|
-
ref:
|
|
624
|
+
ref: N,
|
|
611
625
|
className: [
|
|
612
|
-
|
|
613
|
-
_ ?
|
|
626
|
+
q.wrapper,
|
|
627
|
+
_ ? q.errorState : "",
|
|
614
628
|
b
|
|
615
629
|
].filter(Boolean).join(" "),
|
|
616
630
|
children: [
|
|
617
|
-
g && /* @__PURE__ */ t(
|
|
631
|
+
g && /* @__PURE__ */ t(ee, {
|
|
618
632
|
required: x,
|
|
619
633
|
disabled: m,
|
|
620
|
-
htmlFor:
|
|
634
|
+
htmlFor: V ? void 0 : D,
|
|
621
635
|
children: g
|
|
622
636
|
}),
|
|
623
637
|
/* @__PURE__ */ t("div", {
|
|
624
|
-
className:
|
|
625
|
-
children:
|
|
626
|
-
id:
|
|
627
|
-
className:
|
|
628
|
-
"aria-describedby":
|
|
629
|
-
children:
|
|
638
|
+
className: q.container,
|
|
639
|
+
children: V ? /* @__PURE__ */ t("div", {
|
|
640
|
+
id: D,
|
|
641
|
+
className: q.disabledText,
|
|
642
|
+
"aria-describedby": B,
|
|
643
|
+
children: L?.label ?? a
|
|
630
644
|
}) : /* @__PURE__ */ n("button", {
|
|
631
|
-
ref:
|
|
632
|
-
id:
|
|
645
|
+
ref: P,
|
|
646
|
+
id: D,
|
|
633
647
|
type: "button",
|
|
634
648
|
name: S,
|
|
635
|
-
className: `${
|
|
649
|
+
className: `${q.trigger} ${q[v]}`,
|
|
636
650
|
disabled: m,
|
|
637
651
|
"aria-haspopup": "listbox",
|
|
638
|
-
"aria-expanded":
|
|
639
|
-
"aria-controls":
|
|
640
|
-
"aria-describedby":
|
|
652
|
+
"aria-expanded": k,
|
|
653
|
+
"aria-controls": O,
|
|
654
|
+
"aria-describedby": B,
|
|
641
655
|
"aria-invalid": !!_,
|
|
642
|
-
onClick: () =>
|
|
656
|
+
onClick: () => A((e) => !e),
|
|
643
657
|
onKeyDown: (t) => {
|
|
644
658
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
645
|
-
t.preventDefault(),
|
|
659
|
+
t.preventDefault(), A(!0);
|
|
646
660
|
let n = t.key === "ArrowDown" ? 1 : -1;
|
|
647
661
|
requestAnimationFrame(() => {
|
|
648
|
-
|
|
662
|
+
U(t.key === "ArrowDown" ? 0 : e.length - 1, n);
|
|
649
663
|
});
|
|
650
664
|
}
|
|
651
|
-
if (t.key === "Enter" &&
|
|
665
|
+
if (t.key === "Enter" && k) {
|
|
652
666
|
t.preventDefault();
|
|
653
667
|
let n = e.findIndex((e) => e.value === r);
|
|
654
|
-
|
|
668
|
+
U(n >= 0 ? n : 0, 1);
|
|
655
669
|
}
|
|
656
670
|
},
|
|
657
671
|
children: [/* @__PURE__ */ t("span", {
|
|
658
|
-
className: `${
|
|
659
|
-
${
|
|
660
|
-
children:
|
|
672
|
+
className: `${L ? q.value : q.placeholder}
|
|
673
|
+
${q[v]}`,
|
|
674
|
+
children: L?.label ?? a
|
|
661
675
|
}), /* @__PURE__ */ t("span", {
|
|
662
|
-
className: [
|
|
676
|
+
className: [q.chevron, k ? q.chevronOpen : ""].filter(Boolean).join(" "),
|
|
663
677
|
"aria-hidden": "true",
|
|
664
678
|
children: /* @__PURE__ */ t("svg", {
|
|
665
679
|
viewBox: "0 0 20 20",
|
|
@@ -675,38 +689,38 @@ var T = {
|
|
|
675
689
|
})]
|
|
676
690
|
})
|
|
677
691
|
}),
|
|
678
|
-
|
|
692
|
+
k && p(te, document.body),
|
|
679
693
|
y && !_ && /* @__PURE__ */ t("span", {
|
|
680
|
-
id:
|
|
681
|
-
className:
|
|
694
|
+
id: R,
|
|
695
|
+
className: q.message,
|
|
682
696
|
children: y
|
|
683
697
|
}),
|
|
684
698
|
_ && /* @__PURE__ */ t("span", {
|
|
685
|
-
id:
|
|
686
|
-
className:
|
|
699
|
+
id: z,
|
|
700
|
+
className: q.error,
|
|
687
701
|
children: _
|
|
688
702
|
})
|
|
689
703
|
]
|
|
690
704
|
});
|
|
691
|
-
},
|
|
705
|
+
}, se = (e) => `${e.id}:${e.direction}`, ce = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
|
|
692
706
|
let c = e.flatMap((e) => [{
|
|
693
|
-
value:
|
|
707
|
+
value: se({
|
|
694
708
|
id: e.id,
|
|
695
709
|
direction: "asc"
|
|
696
710
|
}),
|
|
697
711
|
label: e.ascLabel ?? `${e.label} · по возрастанию`,
|
|
698
712
|
disabled: e.disabled
|
|
699
713
|
}, {
|
|
700
|
-
value:
|
|
714
|
+
value: se({
|
|
701
715
|
id: e.id,
|
|
702
716
|
direction: "desc"
|
|
703
717
|
}),
|
|
704
718
|
label: e.descLabel ?? `${e.label} · по убыванию`,
|
|
705
719
|
disabled: e.disabled
|
|
706
720
|
}]);
|
|
707
|
-
return /* @__PURE__ */ t(
|
|
721
|
+
return /* @__PURE__ */ t(oe, {
|
|
708
722
|
options: c,
|
|
709
|
-
value: n ?
|
|
723
|
+
value: n ? se(n) : "",
|
|
710
724
|
label: i,
|
|
711
725
|
placeholder: a,
|
|
712
726
|
disabled: o,
|
|
@@ -719,7 +733,7 @@ var T = {
|
|
|
719
733
|
});
|
|
720
734
|
}
|
|
721
735
|
});
|
|
722
|
-
},
|
|
736
|
+
}, le = {
|
|
723
737
|
approve: "M4 12l5 5L20 6",
|
|
724
738
|
reject: "M5 5l14 14M19 5L5 19",
|
|
725
739
|
edit: "M4 20h4L19 9l-4-4L4 16v4z",
|
|
@@ -728,7 +742,7 @@ var T = {
|
|
|
728
742
|
basket: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3",
|
|
729
743
|
info: "M12 10v7m0-10v.01",
|
|
730
744
|
warning: "M12 4L3 20h18L12 4zm0 5v5m0 3v.01"
|
|
731
|
-
},
|
|
745
|
+
}, ue = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
|
|
732
746
|
viewBox: "0 0 24 24",
|
|
733
747
|
width: i,
|
|
734
748
|
height: a,
|
|
@@ -741,34 +755,34 @@ var T = {
|
|
|
741
755
|
"aria-hidden": !r || void 0,
|
|
742
756
|
focusable: "false",
|
|
743
757
|
...o,
|
|
744
|
-
children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d:
|
|
745
|
-
}),
|
|
746
|
-
root: "
|
|
747
|
-
tableWrap: "
|
|
748
|
-
table: "
|
|
749
|
-
sticky: "
|
|
750
|
-
sortButton: "
|
|
751
|
-
state: "
|
|
752
|
-
cards: "
|
|
753
|
-
mobileSort: "
|
|
754
|
-
card: "
|
|
755
|
-
spanTwo: "
|
|
756
|
-
clickableRow: "
|
|
757
|
-
pagination: "
|
|
758
|
-
paginationRange: "
|
|
759
|
-
paginationControls: "
|
|
760
|
-
pageNumbers: "
|
|
761
|
-
pageButton: "
|
|
762
|
-
ellipsis: "
|
|
763
|
-
previousIcon: "
|
|
764
|
-
nextIcon: "
|
|
765
|
-
default: "
|
|
766
|
-
tableOnMobile: "
|
|
767
|
-
wide: "
|
|
768
|
-
},
|
|
758
|
+
children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: le[e] })]
|
|
759
|
+
}), Y = {
|
|
760
|
+
root: "_root_l2civ_1",
|
|
761
|
+
tableWrap: "_tableWrap_l2civ_3",
|
|
762
|
+
table: "_table_l2civ_3",
|
|
763
|
+
sticky: "_sticky_l2civ_15",
|
|
764
|
+
sortButton: "_sortButton_l2civ_17",
|
|
765
|
+
state: "_state_l2civ_21",
|
|
766
|
+
cards: "_cards_l2civ_23",
|
|
767
|
+
mobileSort: "_mobileSort_l2civ_23",
|
|
768
|
+
card: "_card_l2civ_23",
|
|
769
|
+
spanTwo: "_spanTwo_l2civ_37",
|
|
770
|
+
clickableRow: "_clickableRow_l2civ_41",
|
|
771
|
+
pagination: "_pagination_l2civ_49",
|
|
772
|
+
paginationRange: "_paginationRange_l2civ_75",
|
|
773
|
+
paginationControls: "_paginationControls_l2civ_87",
|
|
774
|
+
pageNumbers: "_pageNumbers_l2civ_89",
|
|
775
|
+
pageButton: "_pageButton_l2civ_101",
|
|
776
|
+
ellipsis: "_ellipsis_l2civ_111",
|
|
777
|
+
previousIcon: "_previousIcon_l2civ_123",
|
|
778
|
+
nextIcon: "_nextIcon_l2civ_131",
|
|
779
|
+
default: "_default_l2civ_169",
|
|
780
|
+
tableOnMobile: "_tableOnMobile_l2civ_169",
|
|
781
|
+
wide: "_wide_l2civ_173"
|
|
782
|
+
}, de = g({
|
|
769
783
|
rowSortingFeature: h,
|
|
770
784
|
sortedRowModel: m()
|
|
771
|
-
}),
|
|
785
|
+
}), fe = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
|
|
772
786
|
0,
|
|
773
787
|
1,
|
|
774
788
|
2,
|
|
@@ -792,7 +806,7 @@ var T = {
|
|
|
792
806
|
e + 1,
|
|
793
807
|
"ellipsis-end",
|
|
794
808
|
t - 1
|
|
795
|
-
],
|
|
809
|
+
], pe = (e, t) => {
|
|
796
810
|
let n = /* @__PURE__ */ new Set();
|
|
797
811
|
for (let t of e) {
|
|
798
812
|
if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
|
|
@@ -804,36 +818,36 @@ var T = {
|
|
|
804
818
|
for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
|
|
805
819
|
}
|
|
806
820
|
return null;
|
|
807
|
-
},
|
|
821
|
+
}, me = (e, t) => typeof e == "function" ? e(t) : t[e], he = (e) => {
|
|
808
822
|
if (e == null || e === "") return null;
|
|
809
823
|
let t = Date.parse(String(e));
|
|
810
824
|
return Number.isNaN(t) ? null : t;
|
|
811
|
-
}, he = (e, t, n) => {
|
|
812
|
-
let r = me(e.getValue(n)), i = me(t.getValue(n));
|
|
813
|
-
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
814
825
|
}, ge = (e, t, n) => {
|
|
826
|
+
let r = he(e.getValue(n)), i = he(t.getValue(n));
|
|
827
|
+
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
828
|
+
}, _e = (e, t, n) => {
|
|
815
829
|
let r = e.getValue(n), i = t.getValue(n);
|
|
816
830
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
817
|
-
},
|
|
831
|
+
}, ve = (e, t, n) => {
|
|
818
832
|
let r = e.getValue(n), i = t.getValue(n);
|
|
819
833
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
820
|
-
},
|
|
834
|
+
}, ye = (e, t, n) => {
|
|
821
835
|
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
822
836
|
return r.localeCompare(i, void 0, {
|
|
823
837
|
numeric: !0,
|
|
824
838
|
sensitivity: "base"
|
|
825
839
|
});
|
|
826
|
-
},
|
|
840
|
+
}, be = (e) => {
|
|
827
841
|
switch (e) {
|
|
828
|
-
case "date": return
|
|
829
|
-
case "number": return
|
|
830
|
-
case "boolean": return
|
|
842
|
+
case "date": return ge;
|
|
843
|
+
case "number": return _e;
|
|
844
|
+
case "boolean": return ve;
|
|
831
845
|
case "text":
|
|
832
|
-
case void 0: return
|
|
846
|
+
case void 0: return ye;
|
|
833
847
|
case "custom": return;
|
|
834
848
|
}
|
|
835
|
-
},
|
|
836
|
-
let t = (t) =>
|
|
849
|
+
}, xe = (e) => {
|
|
850
|
+
let t = (t) => me(e.accessor, t), n = e.sortFn ?? be(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
|
|
837
851
|
id: e.id,
|
|
838
852
|
accessorFn: t,
|
|
839
853
|
header: () => e.header,
|
|
@@ -845,81 +859,81 @@ var T = {
|
|
|
845
859
|
sortDescFirst: e.sortDescFirst
|
|
846
860
|
};
|
|
847
861
|
return n !== void 0 && (i.sortFn = n), i;
|
|
848
|
-
},
|
|
849
|
-
let [
|
|
850
|
-
if (
|
|
851
|
-
let t = new Set(
|
|
862
|
+
}, Se = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: c, renderMobileCard: l, getRowId: d, caption: p, ariaLabel: m, loading: h = !1, error: g, emptyState: v = "Нет данных", stickyHeader: y = !1, maxHeight: b, className: x = "", onRowClick: S, pagination: C = !1, pageSize: T = 30, visibleColumnIds: ee }) => {
|
|
863
|
+
let [E, D] = f([]), [O, k] = f(0), A = o ?? E, j = A.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), M = Number.isFinite(T) && T > 0 ? Math.floor(T) : 30, N = u(() => {
|
|
864
|
+
if (ee === void 0) return e;
|
|
865
|
+
let t = new Set(ee);
|
|
852
866
|
return e.filter((e) => t.has(e.id));
|
|
853
|
-
}, [e,
|
|
854
|
-
features:
|
|
855
|
-
columns:
|
|
867
|
+
}, [e, ee]), P = u(() => N.length === 0 ? "Должна быть видима хотя бы одна колонка" : pe(N, r), [r, N]), F = u(() => N.map(xe), [N]), I = _({
|
|
868
|
+
features: de,
|
|
869
|
+
columns: F,
|
|
856
870
|
data: r,
|
|
857
|
-
state: { sorting:
|
|
871
|
+
state: { sorting: A },
|
|
858
872
|
onSortingChange: (e) => {
|
|
859
|
-
let t = typeof e == "function" ? e(
|
|
860
|
-
o === void 0 &&
|
|
873
|
+
let t = typeof e == "function" ? e(A) : e;
|
|
874
|
+
o === void 0 && D(t), k(0), c?.(t);
|
|
861
875
|
},
|
|
862
876
|
getRowId: d
|
|
863
|
-
}),
|
|
864
|
-
|
|
877
|
+
}), L = I.getRowModel().rows, R = C ? Math.max(1, Math.ceil(L.length / M)) : 1, z = Math.min(O, R - 1), B = u(() => C ? L.slice(z * M, (z + 1) * M) : L, [
|
|
878
|
+
M,
|
|
865
879
|
C,
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
]),
|
|
880
|
+
z,
|
|
881
|
+
L
|
|
882
|
+
]), V = u(() => N.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
869
883
|
id: e.id,
|
|
870
884
|
label: typeof e.header == "string" ? e.header : e.id
|
|
871
|
-
})), [
|
|
872
|
-
|
|
873
|
-
a === "wide" ?
|
|
874
|
-
i ?
|
|
885
|
+
})), [N]), H = u(() => fe(z, R), [R, z]), U = [
|
|
886
|
+
Y.root,
|
|
887
|
+
a === "wide" ? Y.wide : Y.default,
|
|
888
|
+
i ? Y.tableOnMobile : "",
|
|
875
889
|
x
|
|
876
|
-
].filter(Boolean).join(" "),
|
|
890
|
+
].filter(Boolean).join(" "), W = P ?? g, te = C && !h && !W && L.length > M, G = z * M + 1, q = Math.min((z + 1) * M, L.length);
|
|
877
891
|
return s(() => {
|
|
878
|
-
|
|
892
|
+
k(0);
|
|
879
893
|
}, [
|
|
880
894
|
r,
|
|
881
|
-
|
|
895
|
+
M,
|
|
882
896
|
C,
|
|
883
|
-
|
|
897
|
+
j
|
|
884
898
|
]), s(() => {
|
|
885
|
-
|
|
886
|
-
}, [
|
|
887
|
-
className:
|
|
899
|
+
O >= R && k(R - 1);
|
|
900
|
+
}, [R, O]), /* @__PURE__ */ n("section", {
|
|
901
|
+
className: U,
|
|
888
902
|
"aria-busy": h,
|
|
889
903
|
children: [
|
|
890
|
-
!i && !h && !
|
|
891
|
-
className:
|
|
892
|
-
options:
|
|
893
|
-
value:
|
|
894
|
-
id:
|
|
895
|
-
direction:
|
|
904
|
+
!i && !h && !W && B.length > 0 && V.length > 0 && /* @__PURE__ */ t(ce, {
|
|
905
|
+
className: Y.mobileSort,
|
|
906
|
+
options: V,
|
|
907
|
+
value: A[0] ? {
|
|
908
|
+
id: A[0].id,
|
|
909
|
+
direction: A[0].desc ? "desc" : "asc"
|
|
896
910
|
} : null,
|
|
897
|
-
onChange: (e) =>
|
|
911
|
+
onChange: (e) => I.setSorting([{
|
|
898
912
|
id: e.id,
|
|
899
913
|
desc: e.direction === "desc"
|
|
900
914
|
}])
|
|
901
915
|
}),
|
|
902
916
|
/* @__PURE__ */ t("div", {
|
|
903
|
-
className:
|
|
917
|
+
className: Y.tableWrap,
|
|
904
918
|
style: { maxHeight: b },
|
|
905
919
|
children: /* @__PURE__ */ n("table", {
|
|
906
|
-
className:
|
|
920
|
+
className: Y.table,
|
|
907
921
|
"aria-label": m,
|
|
908
922
|
children: [
|
|
909
923
|
p && /* @__PURE__ */ t("caption", { children: p }),
|
|
910
924
|
/* @__PURE__ */ t("thead", {
|
|
911
|
-
className: y ?
|
|
912
|
-
children:
|
|
925
|
+
className: y ? Y.sticky : "",
|
|
926
|
+
children: I.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
|
|
913
927
|
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
|
|
914
928
|
return /* @__PURE__ */ t("th", {
|
|
915
929
|
scope: "col",
|
|
916
930
|
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
917
931
|
children: /* @__PURE__ */ n("button", {
|
|
918
932
|
type: "button",
|
|
919
|
-
className:
|
|
933
|
+
className: Y.sortButton,
|
|
920
934
|
disabled: !i,
|
|
921
935
|
onClick: a,
|
|
922
|
-
children: [/* @__PURE__ */ t(
|
|
936
|
+
children: [/* @__PURE__ */ t(I.FlexRender, { header: e }), /* @__PURE__ */ t("span", {
|
|
923
937
|
"aria-hidden": "true",
|
|
924
938
|
children: r === "asc" ? "↑" : r === "desc" ? "↓" : "↕"
|
|
925
939
|
})]
|
|
@@ -928,55 +942,55 @@ var T = {
|
|
|
928
942
|
}) }, e.id))
|
|
929
943
|
}),
|
|
930
944
|
/* @__PURE__ */ t("tbody", { children: h ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
931
|
-
colSpan:
|
|
932
|
-
children: /* @__PURE__ */ t(
|
|
933
|
-
}) }) :
|
|
934
|
-
className:
|
|
935
|
-
colSpan:
|
|
936
|
-
children:
|
|
937
|
-
}) }) :
|
|
938
|
-
className:
|
|
939
|
-
colSpan:
|
|
945
|
+
colSpan: N.length,
|
|
946
|
+
children: /* @__PURE__ */ t(K, { lines: 3 })
|
|
947
|
+
}) }) : W ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
948
|
+
className: Y.state,
|
|
949
|
+
colSpan: N.length,
|
|
950
|
+
children: W
|
|
951
|
+
}) }) : B.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
952
|
+
className: Y.state,
|
|
953
|
+
colSpan: N.length,
|
|
940
954
|
children: v
|
|
941
|
-
}) }) :
|
|
942
|
-
className: S ?
|
|
955
|
+
}) }) : B.map((e) => /* @__PURE__ */ t("tr", {
|
|
956
|
+
className: S ? Y.clickableRow : void 0,
|
|
943
957
|
onClick: () => S?.(e.original),
|
|
944
958
|
onKeyDown: (t) => {
|
|
945
959
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), S?.(e.original));
|
|
946
960
|
},
|
|
947
961
|
tabIndex: S ? 0 : void 0,
|
|
948
962
|
role: S ? "button" : void 0,
|
|
949
|
-
children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(
|
|
963
|
+
children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(I.FlexRender, { cell: e }) }, e.id))
|
|
950
964
|
}, e.id)) })
|
|
951
965
|
]
|
|
952
966
|
})
|
|
953
967
|
}),
|
|
954
968
|
!i && /* @__PURE__ */ t("div", {
|
|
955
|
-
className:
|
|
969
|
+
className: Y.cards,
|
|
956
970
|
role: "list",
|
|
957
971
|
"aria-label": m ?? p,
|
|
958
|
-
children: h ? /* @__PURE__ */ t(
|
|
959
|
-
className:
|
|
960
|
-
children:
|
|
961
|
-
}) :
|
|
962
|
-
className:
|
|
972
|
+
children: h ? /* @__PURE__ */ t(K, { lines: 4 }) : W ? /* @__PURE__ */ t("div", {
|
|
973
|
+
className: Y.state,
|
|
974
|
+
children: W
|
|
975
|
+
}) : B.length === 0 ? /* @__PURE__ */ t("div", {
|
|
976
|
+
className: Y.state,
|
|
963
977
|
children: v
|
|
964
|
-
}) :
|
|
978
|
+
}) : B.map((e) => {
|
|
965
979
|
if (l) return /* @__PURE__ */ t("div", {
|
|
966
980
|
role: "listitem",
|
|
967
981
|
children: l({
|
|
968
982
|
row: e.original,
|
|
969
|
-
columns:
|
|
983
|
+
columns: N
|
|
970
984
|
})
|
|
971
985
|
}, e.id);
|
|
972
|
-
let r =
|
|
986
|
+
let r = N.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), i = r.find((e) => e.mobile?.primary) ?? r.find((e) => e.mobile?.mobileVariant !== "actions"), a = (t) => me(t.accessor, e.original), o = (t) => t.mobile?.renderMobile?.(e.original, a(t)) ?? t.cell?.(e.original, a(t)) ?? String(a(t) ?? "");
|
|
973
987
|
return /* @__PURE__ */ n("article", {
|
|
974
988
|
role: "listitem",
|
|
975
|
-
className:
|
|
989
|
+
className: Y.card,
|
|
976
990
|
children: [
|
|
977
991
|
/* @__PURE__ */ t("h3", { children: i ? o(i) : `Строка ${e.index + 1}` }),
|
|
978
992
|
/* @__PURE__ */ t("dl", { children: r.filter((e) => e !== i && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
|
|
979
|
-
className: e.mobile?.mobileSpan === 2 ?
|
|
993
|
+
className: e.mobile?.mobileSpan === 2 ? Y.spanTwo : "",
|
|
980
994
|
children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: o(e) })]
|
|
981
995
|
}, e.id)) }),
|
|
982
996
|
r.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: o(e) }, e.id))
|
|
@@ -984,54 +998,54 @@ var T = {
|
|
|
984
998
|
}, e.id);
|
|
985
999
|
})
|
|
986
1000
|
}),
|
|
987
|
-
|
|
988
|
-
className:
|
|
1001
|
+
te && /* @__PURE__ */ n("nav", {
|
|
1002
|
+
className: Y.pagination,
|
|
989
1003
|
"aria-label": "Пагинация таблицы",
|
|
990
1004
|
children: [/* @__PURE__ */ n("span", {
|
|
991
|
-
className:
|
|
1005
|
+
className: Y.paginationRange,
|
|
992
1006
|
"aria-live": "polite",
|
|
993
1007
|
children: [
|
|
994
|
-
|
|
1008
|
+
G,
|
|
995
1009
|
"–",
|
|
996
|
-
|
|
1010
|
+
q,
|
|
997
1011
|
" из ",
|
|
998
|
-
|
|
1012
|
+
L.length
|
|
999
1013
|
]
|
|
1000
1014
|
}), /* @__PURE__ */ n("div", {
|
|
1001
|
-
className:
|
|
1015
|
+
className: Y.paginationControls,
|
|
1002
1016
|
children: [
|
|
1003
1017
|
/* @__PURE__ */ n(w, {
|
|
1004
1018
|
variant: "empty",
|
|
1005
1019
|
size: "md",
|
|
1006
|
-
disabled:
|
|
1020
|
+
disabled: z === 0,
|
|
1007
1021
|
"aria-label": "Предыдущая страница",
|
|
1008
1022
|
onClick: () => {
|
|
1009
|
-
|
|
1023
|
+
k((e) => Math.max(0, e - 1));
|
|
1010
1024
|
},
|
|
1011
|
-
children: [/* @__PURE__ */ t(
|
|
1025
|
+
children: [/* @__PURE__ */ t(ue, {
|
|
1012
1026
|
name: "chevron",
|
|
1013
1027
|
width: 18,
|
|
1014
1028
|
height: 18,
|
|
1015
|
-
className:
|
|
1029
|
+
className: Y.previousIcon
|
|
1016
1030
|
}), /* @__PURE__ */ t("span", {
|
|
1017
|
-
className:
|
|
1031
|
+
className: Y.paginationButtonLabel,
|
|
1018
1032
|
children: "Назад"
|
|
1019
1033
|
})]
|
|
1020
1034
|
}),
|
|
1021
1035
|
/* @__PURE__ */ t("div", {
|
|
1022
|
-
className:
|
|
1023
|
-
children:
|
|
1024
|
-
variant: e ===
|
|
1036
|
+
className: Y.pageNumbers,
|
|
1037
|
+
children: H.map((e) => typeof e == "number" ? /* @__PURE__ */ t(w, {
|
|
1038
|
+
variant: e === z ? "secondary" : "empty",
|
|
1025
1039
|
size: "md",
|
|
1026
|
-
className:
|
|
1040
|
+
className: Y.pageButton,
|
|
1027
1041
|
"aria-label": `Перейти на страницу ${e + 1}`,
|
|
1028
|
-
"aria-current": e ===
|
|
1042
|
+
"aria-current": e === z ? "page" : void 0,
|
|
1029
1043
|
onClick: () => {
|
|
1030
|
-
|
|
1044
|
+
k(e);
|
|
1031
1045
|
},
|
|
1032
1046
|
children: e + 1
|
|
1033
1047
|
}, e) : /* @__PURE__ */ t("span", {
|
|
1034
|
-
className:
|
|
1048
|
+
className: Y.ellipsis,
|
|
1035
1049
|
"aria-hidden": "true",
|
|
1036
1050
|
children: "…"
|
|
1037
1051
|
}, e))
|
|
@@ -1039,19 +1053,19 @@ var T = {
|
|
|
1039
1053
|
/* @__PURE__ */ n(w, {
|
|
1040
1054
|
variant: "empty",
|
|
1041
1055
|
size: "md",
|
|
1042
|
-
disabled:
|
|
1056
|
+
disabled: z === R - 1,
|
|
1043
1057
|
"aria-label": "Следующая страница",
|
|
1044
1058
|
onClick: () => {
|
|
1045
|
-
|
|
1059
|
+
k((e) => Math.min(R - 1, e + 1));
|
|
1046
1060
|
},
|
|
1047
1061
|
children: [/* @__PURE__ */ t("span", {
|
|
1048
|
-
className:
|
|
1062
|
+
className: Y.paginationButtonLabel,
|
|
1049
1063
|
children: "Вперёд"
|
|
1050
|
-
}), /* @__PURE__ */ t(
|
|
1064
|
+
}), /* @__PURE__ */ t(ue, {
|
|
1051
1065
|
name: "chevron",
|
|
1052
1066
|
width: 18,
|
|
1053
1067
|
height: 18,
|
|
1054
|
-
className:
|
|
1068
|
+
className: Y.nextIcon
|
|
1055
1069
|
})]
|
|
1056
1070
|
})
|
|
1057
1071
|
]
|
|
@@ -1059,125 +1073,190 @@ var T = {
|
|
|
1059
1073
|
})
|
|
1060
1074
|
]
|
|
1061
1075
|
});
|
|
1062
|
-
},
|
|
1063
|
-
|
|
1064
|
-
|
|
1076
|
+
}, Ce = 8, we = 6, Te = 120, Ee = (e) => {
|
|
1077
|
+
if (typeof e == "number") return e;
|
|
1078
|
+
if (typeof e == "string") {
|
|
1079
|
+
let t = Number.parseFloat(e);
|
|
1080
|
+
if (Number.isFinite(t)) return t;
|
|
1081
|
+
}
|
|
1082
|
+
return Infinity;
|
|
1083
|
+
}, De = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: m = !1, stringWhileDisabled: h = !1, label: g, error: _, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: w = !1, needMark: T = !0, maxMenuHeight: E }) => {
|
|
1084
|
+
let D = c(), O = C ?? `ds-dropdown-multiple-${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.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${O}-hint` : void 0, B = _ ? `${O}-error` : void 0, V = [z, B].filter(Boolean).join(" ") || void 0, H = m && h, U = o(() => {
|
|
1085
|
+
let e = F.current, t = I.current;
|
|
1086
|
+
if (!e || !t) return;
|
|
1087
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - Ce, a = n.top - Ce, o = i < r.height && a > i, s = Math.max(Te, o ? a : i), c = window.innerWidth - n.width - Ce;
|
|
1088
|
+
N({
|
|
1089
|
+
top: o ? Math.max(Ce, n.top - r.height - we) : n.bottom + we,
|
|
1090
|
+
left: Math.max(Ce, Math.min(n.left, c)),
|
|
1091
|
+
width: n.width,
|
|
1092
|
+
maxHeight: Math.min(s, Ee(E))
|
|
1093
|
+
});
|
|
1094
|
+
}, [E]);
|
|
1095
|
+
l(() => {
|
|
1096
|
+
if (!A) {
|
|
1097
|
+
N(null);
|
|
1098
|
+
return;
|
|
1099
|
+
}
|
|
1100
|
+
return U(), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
|
|
1101
|
+
window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
|
|
1102
|
+
};
|
|
1103
|
+
}, [
|
|
1104
|
+
A,
|
|
1105
|
+
e.length,
|
|
1106
|
+
U
|
|
1107
|
+
]), s(() => {
|
|
1108
|
+
if (!A) return;
|
|
1065
1109
|
let e = (e) => {
|
|
1066
|
-
|
|
1110
|
+
let t = e.target;
|
|
1111
|
+
!P.current?.contains(t) && !I.current?.contains(t) && j(!1);
|
|
1067
1112
|
}, t = (e) => {
|
|
1068
|
-
e.key === "Escape" &&
|
|
1113
|
+
e.key === "Escape" && (j(!1), F.current?.focus());
|
|
1069
1114
|
};
|
|
1070
|
-
return document.addEventListener("
|
|
1071
|
-
document.removeEventListener("
|
|
1115
|
+
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
1116
|
+
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1072
1117
|
};
|
|
1073
|
-
}, [
|
|
1074
|
-
let
|
|
1118
|
+
}, [A]);
|
|
1119
|
+
let W = (t, n) => {
|
|
1120
|
+
let r = ie(e, t, n);
|
|
1121
|
+
r !== -1 && (L.current[r]?.focus(), L.current[r]?.scrollIntoView({ block: "nearest" }));
|
|
1122
|
+
}, te = (t) => {
|
|
1075
1123
|
if (t.disabled) return;
|
|
1076
1124
|
let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
|
|
1077
|
-
i?.(n, e.filter((e) => n.includes(e.value))),
|
|
1078
|
-
},
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1125
|
+
i?.(n, e.filter((e) => n.includes(e.value))), w && (j(!1), F.current?.focus());
|
|
1126
|
+
}, G = A ? /* @__PURE__ */ t("ul", {
|
|
1127
|
+
ref: I,
|
|
1128
|
+
id: k,
|
|
1129
|
+
className: q.menu,
|
|
1130
|
+
role: "listbox",
|
|
1131
|
+
"aria-label": g,
|
|
1132
|
+
"aria-multiselectable": "true",
|
|
1133
|
+
style: M ? {
|
|
1134
|
+
position: "fixed",
|
|
1135
|
+
top: M.top,
|
|
1136
|
+
left: M.left,
|
|
1137
|
+
width: M.width,
|
|
1138
|
+
maxHeight: M.maxHeight
|
|
1139
|
+
} : {
|
|
1140
|
+
position: "fixed",
|
|
1141
|
+
top: 0,
|
|
1142
|
+
left: 0,
|
|
1143
|
+
visibility: "hidden",
|
|
1144
|
+
maxHeight: 0
|
|
1145
|
+
},
|
|
1146
|
+
children: e.map((i, a) => {
|
|
1147
|
+
let o = r.includes(i.value);
|
|
1148
|
+
return /* @__PURE__ */ t("li", {
|
|
1149
|
+
role: "presentation",
|
|
1150
|
+
children: /* @__PURE__ */ n("button", {
|
|
1151
|
+
ref: (e) => {
|
|
1152
|
+
L.current[a] = e;
|
|
1153
|
+
},
|
|
1154
|
+
type: "button",
|
|
1155
|
+
role: "option",
|
|
1156
|
+
"aria-selected": o,
|
|
1157
|
+
disabled: i.disabled,
|
|
1158
|
+
className: [
|
|
1159
|
+
q[v],
|
|
1160
|
+
q.option,
|
|
1161
|
+
o ? q.selected : ""
|
|
1162
|
+
].filter(Boolean).join(" "),
|
|
1163
|
+
onClick: () => te(i),
|
|
1164
|
+
onKeyDown: (t) => {
|
|
1165
|
+
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
1166
|
+
t.preventDefault();
|
|
1167
|
+
let e = t.key === "ArrowDown" ? 1 : -1;
|
|
1168
|
+
W(a + e, e);
|
|
1169
|
+
}
|
|
1170
|
+
if (t.key === "Home" || t.key === "End") {
|
|
1171
|
+
t.preventDefault();
|
|
1172
|
+
let n = t.key === "Home" ? 1 : -1;
|
|
1173
|
+
W(t.key === "Home" ? 0 : e.length - 1, n);
|
|
1174
|
+
}
|
|
1175
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), te(i)), t.key === "Tab" && j(!1);
|
|
1176
|
+
},
|
|
1177
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t("span", {
|
|
1178
|
+
"aria-hidden": "true",
|
|
1179
|
+
children: "✓"
|
|
1180
|
+
})]
|
|
1181
|
+
})
|
|
1182
|
+
}, i.value);
|
|
1183
|
+
})
|
|
1184
|
+
}) : null;
|
|
1082
1185
|
return /* @__PURE__ */ n("div", {
|
|
1083
|
-
ref:
|
|
1186
|
+
ref: P,
|
|
1084
1187
|
className: [
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1188
|
+
q.wrapper,
|
|
1189
|
+
_ ? q.errorState : "",
|
|
1190
|
+
x
|
|
1088
1191
|
].filter(Boolean).join(" "),
|
|
1089
1192
|
children: [
|
|
1090
|
-
|
|
1091
|
-
htmlFor:
|
|
1092
|
-
|
|
1093
|
-
|
|
1193
|
+
g && /* @__PURE__ */ t(ee, {
|
|
1194
|
+
htmlFor: H ? void 0 : O,
|
|
1195
|
+
required: y,
|
|
1196
|
+
disabled: m,
|
|
1197
|
+
children: g
|
|
1094
1198
|
}),
|
|
1095
|
-
/* @__PURE__ */
|
|
1096
|
-
className:
|
|
1097
|
-
children:
|
|
1098
|
-
|
|
1099
|
-
|
|
1199
|
+
/* @__PURE__ */ t("div", {
|
|
1200
|
+
className: q.container,
|
|
1201
|
+
children: H ? /* @__PURE__ */ t("div", {
|
|
1202
|
+
id: O,
|
|
1203
|
+
className: `${q.disabledText} ${q[v]}`,
|
|
1204
|
+
"aria-describedby": V,
|
|
1205
|
+
children: R || a
|
|
1206
|
+
}) : /* @__PURE__ */ n("button", {
|
|
1207
|
+
ref: F,
|
|
1208
|
+
id: O,
|
|
1100
1209
|
type: "button",
|
|
1101
|
-
name:
|
|
1102
|
-
className:
|
|
1103
|
-
disabled:
|
|
1210
|
+
name: S,
|
|
1211
|
+
className: `${q.trigger} ${q[v]}`,
|
|
1212
|
+
disabled: m,
|
|
1104
1213
|
"aria-haspopup": "listbox",
|
|
1105
|
-
"aria-expanded":
|
|
1106
|
-
"aria-controls":
|
|
1107
|
-
"aria-describedby":
|
|
1108
|
-
"aria-invalid": !!
|
|
1109
|
-
onClick: () =>
|
|
1214
|
+
"aria-expanded": A,
|
|
1215
|
+
"aria-controls": k,
|
|
1216
|
+
"aria-describedby": V,
|
|
1217
|
+
"aria-invalid": !!_,
|
|
1218
|
+
onClick: () => j((e) => !e),
|
|
1110
1219
|
onKeyDown: (t) => {
|
|
1111
1220
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
1112
|
-
t.preventDefault(),
|
|
1221
|
+
t.preventDefault(), j(!0);
|
|
1113
1222
|
let n = t.key === "ArrowDown" ? 1 : -1;
|
|
1114
|
-
requestAnimationFrame(() =>
|
|
1223
|
+
requestAnimationFrame(() => W(t.key === "ArrowDown" ? 0 : e.length - 1, n));
|
|
1115
1224
|
}
|
|
1116
1225
|
},
|
|
1117
1226
|
children: [/* @__PURE__ */ t("span", {
|
|
1118
|
-
className:
|
|
1119
|
-
children:
|
|
1227
|
+
className: `${R ? q.value : q.placeholder} ${q[v]}`,
|
|
1228
|
+
children: R || a
|
|
1120
1229
|
}), /* @__PURE__ */ t("span", {
|
|
1121
|
-
className:
|
|
1230
|
+
className: [q.chevron, A ? q.chevronOpen : ""].filter(Boolean).join(" "),
|
|
1122
1231
|
"aria-hidden": "true",
|
|
1123
|
-
children: "
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
children: e.map((i, a) => {
|
|
1133
|
-
let o = r.includes(i.value);
|
|
1134
|
-
return /* @__PURE__ */ t("li", {
|
|
1135
|
-
role: "presentation",
|
|
1136
|
-
children: /* @__PURE__ */ n("button", {
|
|
1137
|
-
ref: (e) => {
|
|
1138
|
-
E.current[a] = e;
|
|
1139
|
-
},
|
|
1140
|
-
type: "button",
|
|
1141
|
-
role: "option",
|
|
1142
|
-
"aria-selected": o,
|
|
1143
|
-
disabled: i.disabled,
|
|
1144
|
-
className: `${J.option} ${o ? J.selected : ""}`,
|
|
1145
|
-
onClick: () => j(i),
|
|
1146
|
-
onKeyDown: (t) => {
|
|
1147
|
-
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
1148
|
-
t.preventDefault();
|
|
1149
|
-
let e = t.key === "ArrowDown" ? 1 : -1;
|
|
1150
|
-
M(a + e, e);
|
|
1151
|
-
}
|
|
1152
|
-
if (t.key === "Home" || t.key === "End") {
|
|
1153
|
-
t.preventDefault();
|
|
1154
|
-
let n = t.key === "Home" ? 1 : -1;
|
|
1155
|
-
M(t.key === "Home" ? 0 : e.length - 1, n);
|
|
1156
|
-
}
|
|
1157
|
-
t.key === "Tab" && C(!1);
|
|
1158
|
-
},
|
|
1159
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), /* @__PURE__ */ t("span", {
|
|
1160
|
-
"aria-hidden": "true",
|
|
1161
|
-
children: o ? "✓" : ""
|
|
1162
|
-
})]
|
|
1232
|
+
children: /* @__PURE__ */ t("svg", {
|
|
1233
|
+
viewBox: "0 0 20 20",
|
|
1234
|
+
fill: "none",
|
|
1235
|
+
children: /* @__PURE__ */ t("path", {
|
|
1236
|
+
d: "M5 7.5L10 12.5L15 7.5",
|
|
1237
|
+
stroke: "currentColor",
|
|
1238
|
+
strokeWidth: "1.8",
|
|
1239
|
+
strokeLinecap: "round",
|
|
1240
|
+
strokeLinejoin: "round"
|
|
1163
1241
|
})
|
|
1164
|
-
}
|
|
1165
|
-
})
|
|
1166
|
-
})
|
|
1242
|
+
})
|
|
1243
|
+
})]
|
|
1244
|
+
})
|
|
1167
1245
|
}),
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1246
|
+
A && p(G, document.body),
|
|
1247
|
+
b && !_ && /* @__PURE__ */ t("span", {
|
|
1248
|
+
id: z,
|
|
1249
|
+
className: q.message,
|
|
1250
|
+
children: b
|
|
1172
1251
|
}),
|
|
1173
|
-
|
|
1174
|
-
id:
|
|
1175
|
-
className:
|
|
1176
|
-
children:
|
|
1252
|
+
_ && /* @__PURE__ */ t("span", {
|
|
1253
|
+
id: B,
|
|
1254
|
+
className: q.error,
|
|
1255
|
+
children: _
|
|
1177
1256
|
})
|
|
1178
1257
|
]
|
|
1179
1258
|
});
|
|
1180
|
-
},
|
|
1259
|
+
}, Oe = {
|
|
1181
1260
|
wrapper: "_wrapper_kz2dd_1",
|
|
1182
1261
|
control: "_control_kz2dd_3",
|
|
1183
1262
|
input: "_input_kz2dd_5",
|
|
@@ -1187,40 +1266,40 @@ var T = {
|
|
|
1187
1266
|
lg: "_lg_kz2dd_65",
|
|
1188
1267
|
inputError: "_inputError_kz2dd_77",
|
|
1189
1268
|
trailingAction: "_trailingAction_kz2dd_79"
|
|
1190
|
-
},
|
|
1191
|
-
let
|
|
1269
|
+
}, ke = ({ 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: D, ...O }) => {
|
|
1270
|
+
let k = c(), A = v ?? `ds-input-${_ ?? k}`, j = d(null), [M, N] = f(!1), P = h ? `${A}-hint` : void 0, F = m ? `${A}-error` : void 0, I = String(e ?? ""), L = [P, F].filter(Boolean).join(" ") || void 0, R = C ? M ? "text" : "password" : i;
|
|
1192
1271
|
return s(() => {
|
|
1193
|
-
C ||
|
|
1272
|
+
C || N(!1);
|
|
1194
1273
|
}, [C]), /* @__PURE__ */ n("div", {
|
|
1195
|
-
className: `${
|
|
1274
|
+
className: `${Oe.wrapper} ${g}`,
|
|
1196
1275
|
children: [
|
|
1197
|
-
p && /* @__PURE__ */ t(
|
|
1198
|
-
htmlFor:
|
|
1276
|
+
p && /* @__PURE__ */ t(ee, {
|
|
1277
|
+
htmlFor: A,
|
|
1199
1278
|
required: x,
|
|
1200
1279
|
disabled: o,
|
|
1201
1280
|
children: p
|
|
1202
1281
|
}),
|
|
1203
1282
|
o && u ? /* @__PURE__ */ t("div", {
|
|
1204
|
-
id:
|
|
1205
|
-
className:
|
|
1206
|
-
"aria-describedby":
|
|
1207
|
-
children:
|
|
1283
|
+
id: A,
|
|
1284
|
+
className: Oe.disabledText,
|
|
1285
|
+
"aria-describedby": L,
|
|
1286
|
+
children: I || a
|
|
1208
1287
|
}) : /* @__PURE__ */ n("div", {
|
|
1209
|
-
className:
|
|
1288
|
+
className: Oe.control,
|
|
1210
1289
|
children: [
|
|
1211
1290
|
/* @__PURE__ */ t("input", {
|
|
1212
|
-
ref:
|
|
1213
|
-
id:
|
|
1291
|
+
ref: j,
|
|
1292
|
+
id: A,
|
|
1214
1293
|
name: _,
|
|
1215
|
-
type:
|
|
1216
|
-
value:
|
|
1294
|
+
type: R,
|
|
1295
|
+
value: I,
|
|
1217
1296
|
placeholder: a,
|
|
1218
1297
|
disabled: o,
|
|
1219
1298
|
readOnly: l,
|
|
1220
1299
|
required: x,
|
|
1221
1300
|
"aria-invalid": !!m,
|
|
1222
|
-
"aria-describedby":
|
|
1223
|
-
className: `${
|
|
1301
|
+
"aria-describedby": L,
|
|
1302
|
+
className: `${Oe.input} ${Oe[y]} ${m ? Oe.inputError : ""}`,
|
|
1224
1303
|
onChange: (e) => {
|
|
1225
1304
|
if (i === "number" && !C) {
|
|
1226
1305
|
let t = e.target.value === "" ? "" : Number(e.target.value);
|
|
@@ -1230,18 +1309,18 @@ var T = {
|
|
|
1230
1309
|
r?.(e.target.value, e);
|
|
1231
1310
|
},
|
|
1232
1311
|
onFocus: (e) => {
|
|
1233
|
-
S && e.currentTarget.value && e.currentTarget.select(),
|
|
1312
|
+
S && e.currentTarget.value && e.currentTarget.select(), D?.(e);
|
|
1234
1313
|
},
|
|
1235
|
-
...
|
|
1314
|
+
...O
|
|
1236
1315
|
}),
|
|
1237
1316
|
C && /* @__PURE__ */ t("button", {
|
|
1238
1317
|
type: "button",
|
|
1239
|
-
className:
|
|
1318
|
+
className: Oe.trailingAction,
|
|
1240
1319
|
disabled: o,
|
|
1241
|
-
"aria-label":
|
|
1242
|
-
"aria-pressed":
|
|
1243
|
-
onClick: () =>
|
|
1244
|
-
children:
|
|
1320
|
+
"aria-label": M ? w : T,
|
|
1321
|
+
"aria-pressed": M,
|
|
1322
|
+
onClick: () => N((e) => !e),
|
|
1323
|
+
children: M ? /* @__PURE__ */ t("svg", {
|
|
1245
1324
|
viewBox: "0 0 24 24",
|
|
1246
1325
|
"aria-hidden": "true",
|
|
1247
1326
|
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" })
|
|
@@ -1255,133 +1334,133 @@ var T = {
|
|
|
1255
1334
|
})]
|
|
1256
1335
|
})
|
|
1257
1336
|
}),
|
|
1258
|
-
!C && b &&
|
|
1337
|
+
!C && b && I && !o && !l && /* @__PURE__ */ t("button", {
|
|
1259
1338
|
type: "button",
|
|
1260
|
-
className:
|
|
1339
|
+
className: Oe.trailingAction,
|
|
1261
1340
|
"aria-label": "Очистить поле",
|
|
1262
1341
|
onClick: () => {
|
|
1263
|
-
let e =
|
|
1342
|
+
let e = j.current;
|
|
1264
1343
|
e && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
|
|
1265
1344
|
},
|
|
1266
1345
|
children: "×"
|
|
1267
1346
|
})
|
|
1268
1347
|
]
|
|
1269
1348
|
}),
|
|
1270
|
-
h && !m && /* @__PURE__ */ t(
|
|
1271
|
-
id:
|
|
1349
|
+
h && !m && /* @__PURE__ */ t(E, {
|
|
1350
|
+
id: P,
|
|
1272
1351
|
children: h
|
|
1273
1352
|
}),
|
|
1274
|
-
m && /* @__PURE__ */ t(
|
|
1275
|
-
id:
|
|
1353
|
+
m && /* @__PURE__ */ t(E, {
|
|
1354
|
+
id: F,
|
|
1276
1355
|
variant: "error",
|
|
1277
1356
|
children: m
|
|
1278
1357
|
})
|
|
1279
1358
|
]
|
|
1280
1359
|
});
|
|
1281
|
-
},
|
|
1360
|
+
}, Ae = (e, t) => {
|
|
1282
1361
|
let n = t.trim().toLocaleLowerCase();
|
|
1283
1362
|
return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
|
|
1284
|
-
},
|
|
1363
|
+
}, je = (e, t, n) => {
|
|
1285
1364
|
if (!e.length) return -1;
|
|
1286
1365
|
for (let r = 0; r < e.length; r += 1) {
|
|
1287
1366
|
let i = (t + r * n + e.length) % e.length;
|
|
1288
1367
|
if (!e[i]?.disabled) return i;
|
|
1289
1368
|
}
|
|
1290
1369
|
return -1;
|
|
1291
|
-
},
|
|
1292
|
-
wrapper: "
|
|
1293
|
-
control: "
|
|
1294
|
-
inputHost: "
|
|
1295
|
-
sm: "
|
|
1296
|
-
md: "
|
|
1297
|
-
lg: "
|
|
1298
|
-
errorState: "
|
|
1299
|
-
disabledText: "
|
|
1300
|
-
chevron: "
|
|
1301
|
-
chevronOpen: "
|
|
1302
|
-
menu: "
|
|
1303
|
-
option: "
|
|
1304
|
-
empty: "
|
|
1305
|
-
selected: "
|
|
1306
|
-
active: "
|
|
1307
|
-
visuallyHidden: "
|
|
1308
|
-
},
|
|
1370
|
+
}, X = {
|
|
1371
|
+
wrapper: "_wrapper_1uxs8_1",
|
|
1372
|
+
control: "_control_1uxs8_5",
|
|
1373
|
+
inputHost: "_inputHost_1uxs8_9",
|
|
1374
|
+
sm: "_sm_1uxs8_25",
|
|
1375
|
+
md: "_md_1uxs8_35",
|
|
1376
|
+
lg: "_lg_1uxs8_43",
|
|
1377
|
+
errorState: "_errorState_1uxs8_57",
|
|
1378
|
+
disabledText: "_disabledText_1uxs8_65",
|
|
1379
|
+
chevron: "_chevron_1uxs8_105",
|
|
1380
|
+
chevronOpen: "_chevronOpen_1uxs8_129",
|
|
1381
|
+
menu: "_menu_1uxs8_133",
|
|
1382
|
+
option: "_option_1uxs8_161",
|
|
1383
|
+
empty: "_empty_1uxs8_161",
|
|
1384
|
+
selected: "_selected_1uxs8_205",
|
|
1385
|
+
active: "_active_1uxs8_205",
|
|
1386
|
+
visuallyHidden: "_visuallyHidden_1uxs8_217"
|
|
1387
|
+
}, Me = 8, Ne = 6, Pe = 5, Fe = {
|
|
1309
1388
|
sm: 20,
|
|
1310
1389
|
md: 30,
|
|
1311
1390
|
lg: 40
|
|
1312
|
-
},
|
|
1313
|
-
let
|
|
1391
|
+
}, Ie = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: m = "Ничего не найдено", disabled: h = !1, readOnly: g = !1, stringWhileDisabled: _ = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: w, id: T, needMark: D = !0 }) => {
|
|
1392
|
+
let O = c(), k = T ?? `ds-search-dropdown-${w ?? O}`, A = `${k}-listbox`, j = `${k}-status`, M = b ? `${k}-hint` : void 0, N = y ? `${k}-error` : void 0, P = [
|
|
1393
|
+
j,
|
|
1314
1394
|
M,
|
|
1315
|
-
N
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
let e = te();
|
|
1395
|
+
N
|
|
1396
|
+
].filter(Boolean).join(" "), F = d(null), I = d(null), L = d([]), [R, z] = f(!1), [B, V] = f(""), [H, U] = f(-1), [W, te] = f(null), G = u(() => e.find((e) => e.value === r), [e, r]), K = u(() => Ae(e, B), [e, B]), q = h && _, J = H >= 0 ? K[H] : void 0;
|
|
1397
|
+
s(() => V(G?.label ?? ""), [G?.label, r]);
|
|
1398
|
+
let ne = o(() => F.current?.querySelector("input") ?? null, []), re = o((e, t) => je(K, e, t), [K]), ie = o((e) => {
|
|
1399
|
+
U(e), !(e < 0) && requestAnimationFrame(() => L.current[e]?.scrollIntoView({ block: "nearest" }));
|
|
1400
|
+
}, []), ae = o(() => {
|
|
1401
|
+
let e = ne();
|
|
1323
1402
|
if (!e) return;
|
|
1324
|
-
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(
|
|
1325
|
-
|
|
1403
|
+
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(K.length, Pe)) * Fe[x] + 2, r = window.innerHeight - t.bottom - Me, i = t.top - Me, a = r < n && i > r, o = a ? i : r, s = Math.max(Fe[x] + 2, Math.min(n, o)), c = window.innerWidth - t.width - Me, l = Math.max(Me, Math.min(t.left, c)), u = a ? Math.max(Me, t.top - s - Ne) : t.bottom + Ne;
|
|
1404
|
+
te({
|
|
1326
1405
|
top: u,
|
|
1327
1406
|
left: l,
|
|
1328
1407
|
width: t.width,
|
|
1329
1408
|
maxHeight: s
|
|
1330
1409
|
});
|
|
1331
1410
|
}, [
|
|
1332
|
-
|
|
1333
|
-
|
|
1411
|
+
K.length,
|
|
1412
|
+
ne,
|
|
1334
1413
|
x
|
|
1335
1414
|
]);
|
|
1336
1415
|
l(() => {
|
|
1337
|
-
if (!
|
|
1338
|
-
|
|
1416
|
+
if (!R) {
|
|
1417
|
+
te(null);
|
|
1339
1418
|
return;
|
|
1340
1419
|
}
|
|
1341
|
-
return
|
|
1342
|
-
window.removeEventListener("resize",
|
|
1420
|
+
return ae(), window.addEventListener("resize", ae), window.addEventListener("scroll", ae, !0), () => {
|
|
1421
|
+
window.removeEventListener("resize", ae), window.removeEventListener("scroll", ae, !0);
|
|
1343
1422
|
};
|
|
1344
|
-
}, [
|
|
1345
|
-
if (!
|
|
1423
|
+
}, [R, ae]), s(() => {
|
|
1424
|
+
if (!R) return;
|
|
1346
1425
|
let e = (e) => {
|
|
1347
1426
|
let t = e.target;
|
|
1348
|
-
!
|
|
1427
|
+
!F.current?.contains(t) && !I.current?.contains(t) && (z(!1), U(-1));
|
|
1349
1428
|
};
|
|
1350
1429
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
1351
|
-
}, [
|
|
1352
|
-
let
|
|
1353
|
-
h || g || (
|
|
1354
|
-
},
|
|
1355
|
-
e.disabled || (
|
|
1356
|
-
},
|
|
1357
|
-
ref:
|
|
1358
|
-
id:
|
|
1359
|
-
className:
|
|
1430
|
+
}, [R]);
|
|
1431
|
+
let oe = () => {
|
|
1432
|
+
h || g || (z(!0), U(re(0, 1)));
|
|
1433
|
+
}, se = (e) => {
|
|
1434
|
+
e.disabled || (V(e.label), z(!1), U(-1), i?.(e.value, e), ne()?.focus());
|
|
1435
|
+
}, ce = R ? /* @__PURE__ */ t("ul", {
|
|
1436
|
+
ref: I,
|
|
1437
|
+
id: A,
|
|
1438
|
+
className: X.menu,
|
|
1360
1439
|
role: "listbox",
|
|
1361
1440
|
"aria-label": v,
|
|
1362
|
-
style:
|
|
1363
|
-
top:
|
|
1364
|
-
left:
|
|
1365
|
-
width:
|
|
1366
|
-
maxHeight:
|
|
1441
|
+
style: W ? {
|
|
1442
|
+
top: W.top,
|
|
1443
|
+
left: W.left,
|
|
1444
|
+
width: W.width,
|
|
1445
|
+
maxHeight: W.maxHeight
|
|
1367
1446
|
} : {
|
|
1368
1447
|
top: 0,
|
|
1369
1448
|
left: 0,
|
|
1370
1449
|
visibility: "hidden",
|
|
1371
1450
|
maxHeight: 0
|
|
1372
1451
|
},
|
|
1373
|
-
children:
|
|
1374
|
-
className: `${
|
|
1452
|
+
children: K.length === 0 ? /* @__PURE__ */ t("li", {
|
|
1453
|
+
className: `${X.empty} ${X[x]}`,
|
|
1375
1454
|
children: m
|
|
1376
|
-
}) :
|
|
1377
|
-
let a = e.value === r, o = i ===
|
|
1455
|
+
}) : K.map((e, i) => {
|
|
1456
|
+
let a = e.value === r, o = i === H;
|
|
1378
1457
|
return /* @__PURE__ */ t("li", {
|
|
1379
1458
|
role: "presentation",
|
|
1380
1459
|
children: /* @__PURE__ */ n("button", {
|
|
1381
1460
|
ref: (e) => {
|
|
1382
|
-
|
|
1461
|
+
L.current[i] = e;
|
|
1383
1462
|
},
|
|
1384
|
-
id: `${
|
|
1463
|
+
id: `${k}-option-${i}`,
|
|
1385
1464
|
type: "button",
|
|
1386
1465
|
role: "option",
|
|
1387
1466
|
tabIndex: -1,
|
|
@@ -1389,16 +1468,16 @@ var T = {
|
|
|
1389
1468
|
"aria-disabled": e.disabled,
|
|
1390
1469
|
"aria-selected": a,
|
|
1391
1470
|
className: [
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
a ?
|
|
1395
|
-
o ?
|
|
1471
|
+
X.option,
|
|
1472
|
+
X[x],
|
|
1473
|
+
a ? X.selected : "",
|
|
1474
|
+
o ? X.active : ""
|
|
1396
1475
|
].filter(Boolean).join(" "),
|
|
1397
1476
|
onPointerMove: () => {
|
|
1398
|
-
e.disabled ||
|
|
1477
|
+
e.disabled || U(i);
|
|
1399
1478
|
},
|
|
1400
|
-
onClick: () =>
|
|
1401
|
-
children: [/* @__PURE__ */ t("span", { children: e.label }), a &&
|
|
1479
|
+
onClick: () => se(e),
|
|
1480
|
+
children: [/* @__PURE__ */ t("span", { children: e.label }), a && D && /* @__PURE__ */ t("span", {
|
|
1402
1481
|
"aria-hidden": "true",
|
|
1403
1482
|
children: "✓"
|
|
1404
1483
|
})]
|
|
@@ -1407,28 +1486,28 @@ var T = {
|
|
|
1407
1486
|
})
|
|
1408
1487
|
}) : null;
|
|
1409
1488
|
return /* @__PURE__ */ n("div", {
|
|
1410
|
-
ref:
|
|
1489
|
+
ref: F,
|
|
1411
1490
|
className: [
|
|
1412
|
-
|
|
1413
|
-
y ?
|
|
1491
|
+
X.wrapper,
|
|
1492
|
+
y ? X.errorState : "",
|
|
1414
1493
|
C
|
|
1415
1494
|
].filter(Boolean).join(" "),
|
|
1416
1495
|
children: [
|
|
1417
|
-
v && /* @__PURE__ */ t(
|
|
1418
|
-
htmlFor:
|
|
1496
|
+
v && /* @__PURE__ */ t(ee, {
|
|
1497
|
+
htmlFor: q ? void 0 : k,
|
|
1419
1498
|
required: S,
|
|
1420
1499
|
disabled: h,
|
|
1421
1500
|
children: v
|
|
1422
1501
|
}),
|
|
1423
|
-
|
|
1424
|
-
className: `${
|
|
1425
|
-
children:
|
|
1502
|
+
q ? /* @__PURE__ */ t("div", {
|
|
1503
|
+
className: `${X.disabledText} ${X[x]}`,
|
|
1504
|
+
children: G?.label ?? a
|
|
1426
1505
|
}) : /* @__PURE__ */ n("div", {
|
|
1427
|
-
className:
|
|
1428
|
-
children: [/* @__PURE__ */ t(
|
|
1429
|
-
id:
|
|
1506
|
+
className: X.control,
|
|
1507
|
+
children: [/* @__PURE__ */ t(ke, {
|
|
1508
|
+
id: k,
|
|
1430
1509
|
name: w,
|
|
1431
|
-
value:
|
|
1510
|
+
value: B,
|
|
1432
1511
|
placeholder: a,
|
|
1433
1512
|
disabled: h,
|
|
1434
1513
|
readOnly: g,
|
|
@@ -1436,36 +1515,36 @@ var T = {
|
|
|
1436
1515
|
size: x,
|
|
1437
1516
|
clearable: !1,
|
|
1438
1517
|
autoComplete: "off",
|
|
1439
|
-
className: `${
|
|
1440
|
-
onFocus:
|
|
1518
|
+
className: `${X.inputHost} ${X[x]}`,
|
|
1519
|
+
onFocus: oe,
|
|
1441
1520
|
onChange: (t) => {
|
|
1442
|
-
let n = String(t), r =
|
|
1443
|
-
|
|
1521
|
+
let n = String(t), r = Ae(e, n);
|
|
1522
|
+
V(n), z(!0), U(je(r, 0, 1));
|
|
1444
1523
|
},
|
|
1445
1524
|
role: "combobox",
|
|
1446
1525
|
"aria-autocomplete": "list",
|
|
1447
|
-
"aria-expanded":
|
|
1448
|
-
"aria-controls":
|
|
1449
|
-
"aria-activedescendant":
|
|
1526
|
+
"aria-expanded": R,
|
|
1527
|
+
"aria-controls": A,
|
|
1528
|
+
"aria-activedescendant": J ? `${k}-option-${H}` : void 0,
|
|
1450
1529
|
"aria-invalid": !!y,
|
|
1451
|
-
"aria-describedby":
|
|
1452
|
-
onClick:
|
|
1530
|
+
"aria-describedby": P,
|
|
1531
|
+
onClick: oe,
|
|
1453
1532
|
onKeyDown: (e) => {
|
|
1454
1533
|
if (!(h || g)) {
|
|
1455
1534
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
1456
1535
|
e.preventDefault();
|
|
1457
|
-
let t = e.key === "ArrowDown" ? 1 : -1, n =
|
|
1458
|
-
|
|
1536
|
+
let t = e.key === "ArrowDown" ? 1 : -1, n = H >= 0 ? H + t : t === 1 ? 0 : K.length - 1;
|
|
1537
|
+
z(!0), ie(re(n, t));
|
|
1459
1538
|
} else if (e.key === "Home" || e.key === "End") {
|
|
1460
|
-
if (!
|
|
1539
|
+
if (!R) return;
|
|
1461
1540
|
e.preventDefault();
|
|
1462
1541
|
let t = e.key === "Home" ? 1 : -1;
|
|
1463
|
-
re(
|
|
1464
|
-
} else e.key === "Enter" &&
|
|
1542
|
+
ie(re(e.key === "Home" ? 0 : K.length - 1, t));
|
|
1543
|
+
} else e.key === "Enter" && R && J ? (e.preventDefault(), se(J)) : e.key === "Escape" && R ? (e.preventDefault(), z(!1), U(-1)) : e.key === "Tab" && (z(!1), U(-1));
|
|
1465
1544
|
}
|
|
1466
1545
|
}
|
|
1467
1546
|
}), /* @__PURE__ */ t("span", {
|
|
1468
|
-
className: `${
|
|
1547
|
+
className: `${X.chevron} ${R ? X.chevronOpen : ""}`,
|
|
1469
1548
|
"aria-hidden": "true",
|
|
1470
1549
|
children: /* @__PURE__ */ t("svg", {
|
|
1471
1550
|
viewBox: "0 0 20 20",
|
|
@@ -1480,44 +1559,44 @@ var T = {
|
|
|
1480
1559
|
})
|
|
1481
1560
|
})]
|
|
1482
1561
|
}),
|
|
1483
|
-
|
|
1562
|
+
R && typeof document < "u" && p(ce, document.body),
|
|
1484
1563
|
/* @__PURE__ */ n("span", {
|
|
1485
|
-
id:
|
|
1486
|
-
className:
|
|
1564
|
+
id: j,
|
|
1565
|
+
className: X.visuallyHidden,
|
|
1487
1566
|
"aria-live": "polite",
|
|
1488
|
-
children: ["Найдено вариантов: ",
|
|
1567
|
+
children: ["Найдено вариантов: ", K.length]
|
|
1489
1568
|
}),
|
|
1490
|
-
b && !y && /* @__PURE__ */ t(
|
|
1491
|
-
id:
|
|
1569
|
+
b && !y && /* @__PURE__ */ t(E, {
|
|
1570
|
+
id: M,
|
|
1492
1571
|
children: b
|
|
1493
1572
|
}),
|
|
1494
|
-
y && /* @__PURE__ */ t(
|
|
1495
|
-
id:
|
|
1573
|
+
y && /* @__PURE__ */ t(E, {
|
|
1574
|
+
id: N,
|
|
1496
1575
|
variant: "error",
|
|
1497
1576
|
children: y
|
|
1498
1577
|
})
|
|
1499
1578
|
]
|
|
1500
1579
|
});
|
|
1501
|
-
},
|
|
1580
|
+
}, Le = {
|
|
1502
1581
|
root: "_root_1y2s8_1",
|
|
1503
1582
|
header: "_header_1y2s8_21",
|
|
1504
1583
|
title: "_title_1y2s8_41",
|
|
1505
1584
|
dismiss: "_dismiss_1y2s8_55",
|
|
1506
1585
|
content: "_content_1y2s8_113"
|
|
1507
|
-
},
|
|
1586
|
+
}, Re = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
|
|
1508
1587
|
let u = `ds-info-block-${c()}`;
|
|
1509
1588
|
return /* @__PURE__ */ n("section", {
|
|
1510
|
-
className: `${
|
|
1589
|
+
className: `${Le.root} ${l}`,
|
|
1511
1590
|
"aria-labelledby": u,
|
|
1512
1591
|
children: [/* @__PURE__ */ n("header", {
|
|
1513
|
-
className:
|
|
1592
|
+
className: Le.header,
|
|
1514
1593
|
children: [/* @__PURE__ */ t(s, {
|
|
1515
1594
|
id: u,
|
|
1516
|
-
className:
|
|
1595
|
+
className: Le.title,
|
|
1517
1596
|
children: e
|
|
1518
1597
|
}), i && /* @__PURE__ */ t("button", {
|
|
1519
1598
|
type: "button",
|
|
1520
|
-
className:
|
|
1599
|
+
className: Le.dismiss,
|
|
1521
1600
|
onClick: a,
|
|
1522
1601
|
"aria-label": o,
|
|
1523
1602
|
children: /* @__PURE__ */ t("svg", {
|
|
@@ -1533,26 +1612,26 @@ var T = {
|
|
|
1533
1612
|
})
|
|
1534
1613
|
})]
|
|
1535
1614
|
}), /* @__PURE__ */ t("div", {
|
|
1536
|
-
className:
|
|
1615
|
+
className: Le.content,
|
|
1537
1616
|
children: r
|
|
1538
1617
|
})]
|
|
1539
1618
|
});
|
|
1540
|
-
},
|
|
1541
|
-
wrapper: "
|
|
1542
|
-
input: "
|
|
1543
|
-
switch: "
|
|
1544
|
-
thumb: "
|
|
1545
|
-
label: "
|
|
1546
|
-
disabled: "
|
|
1547
|
-
},
|
|
1619
|
+
}, ze = {
|
|
1620
|
+
wrapper: "_wrapper_ecmvo_1",
|
|
1621
|
+
input: "_input_ecmvo_21",
|
|
1622
|
+
switch: "_switch_ecmvo_35",
|
|
1623
|
+
thumb: "_thumb_ecmvo_67",
|
|
1624
|
+
label: "_label_ecmvo_113",
|
|
1625
|
+
disabled: "_disabled_ecmvo_125"
|
|
1626
|
+
}, Be = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
|
|
1548
1627
|
let f = c(), p = u ?? `ds-radio-button-${l ?? f}`;
|
|
1549
1628
|
return /* @__PURE__ */ n("label", {
|
|
1550
1629
|
htmlFor: p,
|
|
1551
|
-
className: `${
|
|
1630
|
+
className: `${ze.wrapper} ${a ? ze.disabled : ""} ${s}`,
|
|
1552
1631
|
children: [
|
|
1553
1632
|
/* @__PURE__ */ t("input", {
|
|
1554
1633
|
id: p,
|
|
1555
|
-
className:
|
|
1634
|
+
className: ze.input,
|
|
1556
1635
|
type: "checkbox",
|
|
1557
1636
|
role: "switch",
|
|
1558
1637
|
name: l,
|
|
@@ -1565,21 +1644,21 @@ var T = {
|
|
|
1565
1644
|
}
|
|
1566
1645
|
}),
|
|
1567
1646
|
/* @__PURE__ */ t("span", {
|
|
1568
|
-
className:
|
|
1647
|
+
className: ze.switch,
|
|
1569
1648
|
"aria-hidden": "true",
|
|
1570
|
-
children: /* @__PURE__ */ t("span", { className:
|
|
1649
|
+
children: /* @__PURE__ */ t("span", { className: ze.thumb })
|
|
1571
1650
|
}),
|
|
1572
1651
|
i && /* @__PURE__ */ t("span", {
|
|
1573
|
-
className:
|
|
1652
|
+
className: ze.label,
|
|
1574
1653
|
children: i
|
|
1575
1654
|
})
|
|
1576
1655
|
]
|
|
1577
1656
|
});
|
|
1578
|
-
},
|
|
1657
|
+
}, Ve = {
|
|
1579
1658
|
root: "_root_kepgo_1",
|
|
1580
1659
|
grid: "_grid_kepgo_3",
|
|
1581
1660
|
actions: "_actions_kepgo_5"
|
|
1582
|
-
},
|
|
1661
|
+
}, He = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
|
|
1583
1662
|
let d = (e, t) => {
|
|
1584
1663
|
let n = {
|
|
1585
1664
|
...r,
|
|
@@ -1588,11 +1667,11 @@ var T = {
|
|
|
1588
1667
|
i?.(n, e), s === "instant" && a?.(n);
|
|
1589
1668
|
};
|
|
1590
1669
|
return /* @__PURE__ */ n("section", {
|
|
1591
|
-
className: `${
|
|
1670
|
+
className: `${Ve.root} ${u}`,
|
|
1592
1671
|
"aria-label": "Фильтры",
|
|
1593
1672
|
"aria-busy": c,
|
|
1594
1673
|
children: [/* @__PURE__ */ t("div", {
|
|
1595
|
-
className:
|
|
1674
|
+
className: Ve.grid,
|
|
1596
1675
|
children: e.filter((e) => !e.hidden).map((e) => {
|
|
1597
1676
|
let n = l || c || e.disabled, i = r[e.id];
|
|
1598
1677
|
if (e.type === "input") {
|
|
@@ -1602,19 +1681,19 @@ var T = {
|
|
|
1602
1681
|
placeholder: e.placeholder,
|
|
1603
1682
|
disabled: n
|
|
1604
1683
|
};
|
|
1605
|
-
return e.inputType === "number" ? /* @__PURE__ */ t(
|
|
1684
|
+
return e.inputType === "number" ? /* @__PURE__ */ t(ke, {
|
|
1606
1685
|
...r,
|
|
1607
1686
|
type: "number",
|
|
1608
1687
|
value: i ?? "",
|
|
1609
1688
|
onChange: (t) => d(e.id, t)
|
|
1610
|
-
}, e.id) : /* @__PURE__ */ t(
|
|
1689
|
+
}, e.id) : /* @__PURE__ */ t(ke, {
|
|
1611
1690
|
...r,
|
|
1612
1691
|
type: "text",
|
|
1613
1692
|
value: String(i ?? ""),
|
|
1614
1693
|
onChange: (t) => d(e.id, t)
|
|
1615
1694
|
}, e.id);
|
|
1616
1695
|
}
|
|
1617
|
-
if (e.type === "dropdown") return /* @__PURE__ */ t(
|
|
1696
|
+
if (e.type === "dropdown") return /* @__PURE__ */ t(oe, {
|
|
1618
1697
|
label: e.label,
|
|
1619
1698
|
hint: e.hint,
|
|
1620
1699
|
placeholder: e.placeholder,
|
|
@@ -1623,7 +1702,7 @@ var T = {
|
|
|
1623
1702
|
disabled: n,
|
|
1624
1703
|
onChange: (t) => d(e.id, t)
|
|
1625
1704
|
}, e.id);
|
|
1626
|
-
if (e.type === "multiple") return /* @__PURE__ */ t(
|
|
1705
|
+
if (e.type === "multiple") return /* @__PURE__ */ t(De, {
|
|
1627
1706
|
label: e.label,
|
|
1628
1707
|
hint: e.hint,
|
|
1629
1708
|
placeholder: e.placeholder,
|
|
@@ -1632,14 +1711,14 @@ var T = {
|
|
|
1632
1711
|
disabled: n,
|
|
1633
1712
|
onChange: (t) => d(e.id, t)
|
|
1634
1713
|
}, e.id);
|
|
1635
|
-
if (e.type === "checkbox") return /* @__PURE__ */ t(
|
|
1714
|
+
if (e.type === "checkbox") return /* @__PURE__ */ t(O, {
|
|
1636
1715
|
label: e.label,
|
|
1637
1716
|
hint: e.hint,
|
|
1638
1717
|
checked: !!i,
|
|
1639
1718
|
disabled: n,
|
|
1640
1719
|
onChange: (t) => d(e.id, t)
|
|
1641
1720
|
}, e.id);
|
|
1642
|
-
if (e.type === "radio") return /* @__PURE__ */ t(
|
|
1721
|
+
if (e.type === "radio") return /* @__PURE__ */ t(Be, {
|
|
1643
1722
|
label: e.label,
|
|
1644
1723
|
checked: !!i,
|
|
1645
1724
|
disabled: n,
|
|
@@ -1649,7 +1728,7 @@ var T = {
|
|
|
1649
1728
|
from: null,
|
|
1650
1729
|
to: null
|
|
1651
1730
|
};
|
|
1652
|
-
return /* @__PURE__ */ t(
|
|
1731
|
+
return /* @__PURE__ */ t(te, {
|
|
1653
1732
|
hint: e.hint,
|
|
1654
1733
|
mode: e.mode,
|
|
1655
1734
|
min: e.min,
|
|
@@ -1660,7 +1739,7 @@ var T = {
|
|
|
1660
1739
|
}, e.id);
|
|
1661
1740
|
})
|
|
1662
1741
|
}), (o || s === "manual") && /* @__PURE__ */ n("div", {
|
|
1663
|
-
className:
|
|
1742
|
+
className: Ve.actions,
|
|
1664
1743
|
children: [o && /* @__PURE__ */ t(w, {
|
|
1665
1744
|
variant: "destructiveOutline",
|
|
1666
1745
|
disabled: l || c,
|
|
@@ -1674,85 +1753,84 @@ var T = {
|
|
|
1674
1753
|
})]
|
|
1675
1754
|
})]
|
|
1676
1755
|
});
|
|
1677
|
-
},
|
|
1678
|
-
wrapper: "
|
|
1679
|
-
dropzone: "
|
|
1680
|
-
dragActive: "
|
|
1681
|
-
disabled: "
|
|
1682
|
-
error: "
|
|
1683
|
-
nativeInput: "
|
|
1684
|
-
empty: "
|
|
1685
|
-
uploadIcon: "
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
let t = [], n = new Set(r.map(Re)), c = e.filter((e) => Be(e, o) ? s !== void 0 && e.size > s ? (t.push({
|
|
1756
|
+
}, Z = {
|
|
1757
|
+
wrapper: "_wrapper_8w6xl_1",
|
|
1758
|
+
dropzone: "_dropzone_8w6xl_3",
|
|
1759
|
+
dragActive: "_dragActive_8w6xl_5",
|
|
1760
|
+
disabled: "_disabled_8w6xl_7",
|
|
1761
|
+
error: "_error_8w6xl_9",
|
|
1762
|
+
nativeInput: "_nativeInput_8w6xl_11",
|
|
1763
|
+
empty: "_empty_8w6xl_13",
|
|
1764
|
+
uploadIcon: "_uploadIcon_8w6xl_15",
|
|
1765
|
+
files: "_files_8w6xl_17",
|
|
1766
|
+
file: "_file_8w6xl_17",
|
|
1767
|
+
fileName: "_fileName_8w6xl_21",
|
|
1768
|
+
fileSize: "_fileSize_8w6xl_23"
|
|
1769
|
+
}, Ue = (e) => `${e.name}:${e.size}:${e.lastModified}`, We = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Ge = (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), Ke = ({ 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 }) => {
|
|
1770
|
+
let D = c(), O = y ?? `ds-file-input-${v ?? D}`, k = d(null), A = d(0), [j, M] = f(!1), N = p ? `${O}-hint` : void 0, P = m ? `${O}-error` : void 0, F = [N, P].filter(Boolean).join(" ") || void 0, I = !g && !_, L = (e) => {
|
|
1771
|
+
let t = [], n = new Set(r.map(Ue)), c = e.filter((e) => Ge(e, o) ? s !== void 0 && e.size > s ? (t.push({
|
|
1694
1772
|
file: e,
|
|
1695
1773
|
reason: "maxSize"
|
|
1696
|
-
}), !1) : !n.has(
|
|
1774
|
+
}), !1) : !n.has(Ue(e)) && (n.add(Ue(e)), !0) : (t.push({
|
|
1697
1775
|
file: e,
|
|
1698
1776
|
reason: "accept"
|
|
1699
1777
|
}), !1)), u = a ? l : 1, d = a ? [...r, ...c] : c.slice(-1);
|
|
1700
1778
|
u !== void 0 && d.length > u && (d.slice(u).forEach((e) => t.push({
|
|
1701
1779
|
file: e,
|
|
1702
1780
|
reason: "maxFiles"
|
|
1703
|
-
})), d = d.slice(0, u)), t.length && T?.(t), c.length && i?.(d),
|
|
1781
|
+
})), d = d.slice(0, u)), t.length && T?.(t), c.length && i?.(d), k.current && (k.current.value = "");
|
|
1704
1782
|
};
|
|
1705
1783
|
return /* @__PURE__ */ n("div", {
|
|
1706
|
-
className: `${
|
|
1784
|
+
className: `${Z.wrapper} ${b}`,
|
|
1707
1785
|
children: [
|
|
1708
|
-
u && /* @__PURE__ */ t(
|
|
1709
|
-
htmlFor:
|
|
1786
|
+
u && /* @__PURE__ */ t(ee, {
|
|
1787
|
+
htmlFor: O,
|
|
1710
1788
|
required: h,
|
|
1711
1789
|
disabled: g,
|
|
1712
1790
|
children: u
|
|
1713
1791
|
}),
|
|
1714
1792
|
/* @__PURE__ */ n("div", {
|
|
1715
|
-
className: `${
|
|
1793
|
+
className: `${Z.dropzone} ${j ? Z.dragActive : ""} ${g ? Z.disabled : ""} ${m ? Z.error : ""}`,
|
|
1716
1794
|
onDragEnter: (e) => {
|
|
1717
|
-
e.preventDefault(),
|
|
1795
|
+
e.preventDefault(), I && ++A.current === 1 && M(!0);
|
|
1718
1796
|
},
|
|
1719
1797
|
onDragOver: (e) => e.preventDefault(),
|
|
1720
1798
|
onDragLeave: (e) => {
|
|
1721
|
-
e.preventDefault(), --
|
|
1799
|
+
e.preventDefault(), --A.current <= 0 && (A.current = 0, M(!1));
|
|
1722
1800
|
},
|
|
1723
1801
|
onDrop: (e) => {
|
|
1724
|
-
e.preventDefault(),
|
|
1802
|
+
e.preventDefault(), A.current = 0, M(!1), I && L(Array.from(e.dataTransfer.files));
|
|
1725
1803
|
},
|
|
1726
1804
|
children: [/* @__PURE__ */ t("input", {
|
|
1727
|
-
ref:
|
|
1728
|
-
id:
|
|
1805
|
+
ref: k,
|
|
1806
|
+
id: O,
|
|
1729
1807
|
name: v,
|
|
1730
|
-
className:
|
|
1808
|
+
className: Z.nativeInput,
|
|
1731
1809
|
type: "file",
|
|
1732
1810
|
multiple: a,
|
|
1733
1811
|
accept: o,
|
|
1734
1812
|
required: h && r.length === 0,
|
|
1735
|
-
disabled: !
|
|
1736
|
-
"aria-describedby":
|
|
1813
|
+
disabled: !I,
|
|
1814
|
+
"aria-describedby": F,
|
|
1737
1815
|
"aria-invalid": !!m,
|
|
1738
|
-
onChange: (e) =>
|
|
1816
|
+
onChange: (e) => L(Array.from(e.target.files ?? []))
|
|
1739
1817
|
}), r.length ? /* @__PURE__ */ n(e, { children: [
|
|
1740
1818
|
/* @__PURE__ */ t("ul", {
|
|
1741
|
-
className:
|
|
1819
|
+
className: Z.files,
|
|
1742
1820
|
"aria-live": "polite",
|
|
1743
1821
|
children: r.map((e, a) => /* @__PURE__ */ n("li", {
|
|
1744
|
-
className:
|
|
1822
|
+
className: Z.file,
|
|
1745
1823
|
children: [
|
|
1746
1824
|
/* @__PURE__ */ t("span", {
|
|
1747
|
-
className:
|
|
1825
|
+
className: Z.fileName,
|
|
1748
1826
|
title: e.name,
|
|
1749
1827
|
children: e.name
|
|
1750
1828
|
}),
|
|
1751
1829
|
/* @__PURE__ */ t("span", {
|
|
1752
|
-
className:
|
|
1753
|
-
children:
|
|
1830
|
+
className: Z.fileSize,
|
|
1831
|
+
children: We(e.size)
|
|
1754
1832
|
}),
|
|
1755
|
-
|
|
1833
|
+
I && /* @__PURE__ */ t(w, {
|
|
1756
1834
|
variant: "empty",
|
|
1757
1835
|
size: "sm",
|
|
1758
1836
|
"aria-label": `Удалить файл ${e.name}`,
|
|
@@ -1760,54 +1838,53 @@ var T = {
|
|
|
1760
1838
|
children: "×"
|
|
1761
1839
|
})
|
|
1762
1840
|
]
|
|
1763
|
-
},
|
|
1841
|
+
}, Ue(e)))
|
|
1764
1842
|
}),
|
|
1765
|
-
|
|
1766
|
-
className:
|
|
1843
|
+
I && (a || r.length === 0) && /* @__PURE__ */ t(w, {
|
|
1844
|
+
className: Z.browseButton,
|
|
1767
1845
|
size: "sm",
|
|
1768
|
-
onClick: () =>
|
|
1846
|
+
onClick: () => k.current?.click(),
|
|
1769
1847
|
children: C
|
|
1770
1848
|
}),
|
|
1771
|
-
|
|
1772
|
-
className:
|
|
1849
|
+
I && !a && /* @__PURE__ */ t(w, {
|
|
1850
|
+
className: Z.browseButton,
|
|
1773
1851
|
size: "sm",
|
|
1774
|
-
onClick: () =>
|
|
1852
|
+
onClick: () => k.current?.click(),
|
|
1775
1853
|
children: S
|
|
1776
1854
|
})
|
|
1777
1855
|
] }) : /* @__PURE__ */ n("div", {
|
|
1778
|
-
className:
|
|
1856
|
+
className: Z.empty,
|
|
1779
1857
|
children: [
|
|
1780
1858
|
/* @__PURE__ */ t("span", {
|
|
1781
|
-
className:
|
|
1859
|
+
className: Z.uploadIcon,
|
|
1782
1860
|
"aria-hidden": "true",
|
|
1783
1861
|
children: "↑"
|
|
1784
1862
|
}),
|
|
1785
|
-
/* @__PURE__ */ t("strong", { children:
|
|
1786
|
-
!
|
|
1787
|
-
|
|
1788
|
-
onClick: () => A.current?.click(),
|
|
1863
|
+
/* @__PURE__ */ t("strong", { children: j ? "Отпустите файлы здесь" : x }),
|
|
1864
|
+
!j && I && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(w, {
|
|
1865
|
+
onClick: () => k.current?.click(),
|
|
1789
1866
|
children: S
|
|
1790
1867
|
})] })
|
|
1791
1868
|
]
|
|
1792
1869
|
})]
|
|
1793
1870
|
}),
|
|
1794
|
-
p && !m && /* @__PURE__ */ t(
|
|
1795
|
-
id:
|
|
1871
|
+
p && !m && /* @__PURE__ */ t(E, {
|
|
1872
|
+
id: N,
|
|
1796
1873
|
children: p
|
|
1797
1874
|
}),
|
|
1798
|
-
m && /* @__PURE__ */ t(
|
|
1799
|
-
id:
|
|
1875
|
+
m && /* @__PURE__ */ t(E, {
|
|
1876
|
+
id: P,
|
|
1800
1877
|
variant: "error",
|
|
1801
1878
|
live: !0,
|
|
1802
1879
|
children: m
|
|
1803
1880
|
})
|
|
1804
1881
|
]
|
|
1805
1882
|
});
|
|
1806
|
-
},
|
|
1883
|
+
}, qe = 0, Q = v((e) => ({
|
|
1807
1884
|
modals: [],
|
|
1808
1885
|
openModal: (t, n = {}, r = {}) => {
|
|
1809
|
-
|
|
1810
|
-
let i = `ds-modal-${
|
|
1886
|
+
qe += 1;
|
|
1887
|
+
let i = `ds-modal-${qe}`;
|
|
1811
1888
|
return e((e) => ({ modals: [...e.modals, {
|
|
1812
1889
|
id: i,
|
|
1813
1890
|
name: t,
|
|
@@ -1819,22 +1896,22 @@ var T = {
|
|
|
1819
1896
|
closeModal: (t) => e((e) => ({ modals: e.modals.filter((e) => e.id !== t) })),
|
|
1820
1897
|
closeTopModal: () => e((e) => ({ modals: e.modals.slice(0, -1) })),
|
|
1821
1898
|
closeAllModals: () => e({ modals: [] })
|
|
1822
|
-
})),
|
|
1823
|
-
layer: "
|
|
1824
|
-
backdrop: "
|
|
1825
|
-
panel: "
|
|
1826
|
-
header: "
|
|
1827
|
-
title: "
|
|
1828
|
-
description: "
|
|
1829
|
-
content: "
|
|
1830
|
-
},
|
|
1831
|
-
let f = c(), p = c(), m = d(null), h =
|
|
1899
|
+
})), Je = () => Q.setState({ modals: [] }), Ye = {
|
|
1900
|
+
layer: "_layer_p0e8j_1",
|
|
1901
|
+
backdrop: "_backdrop_p0e8j_3",
|
|
1902
|
+
panel: "_panel_p0e8j_5",
|
|
1903
|
+
header: "_header_p0e8j_9",
|
|
1904
|
+
title: "_title_p0e8j_11",
|
|
1905
|
+
description: "_description_p0e8j_13",
|
|
1906
|
+
content: "_content_p0e8j_15"
|
|
1907
|
+
}, Xe = "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" }) => {
|
|
1908
|
+
let f = c(), p = c(), m = d(null), h = Q((e) => e.closeModal);
|
|
1832
1909
|
return s(() => {
|
|
1833
1910
|
let e = document.activeElement, t = m.current;
|
|
1834
|
-
return (t?.querySelector(
|
|
1911
|
+
return (t?.querySelector(Xe) ?? t)?.focus(), () => e?.focus();
|
|
1835
1912
|
}, []), /* @__PURE__ */ n("div", {
|
|
1836
1913
|
ref: m,
|
|
1837
|
-
className: `${
|
|
1914
|
+
className: `${Ye.panel} ${l}`,
|
|
1838
1915
|
role: u,
|
|
1839
1916
|
"aria-modal": "true",
|
|
1840
1917
|
"aria-labelledby": r ? f : void 0,
|
|
@@ -1842,7 +1919,7 @@ var T = {
|
|
|
1842
1919
|
tabIndex: -1,
|
|
1843
1920
|
onKeyDown: (e) => {
|
|
1844
1921
|
if (e.key !== "Tab") return;
|
|
1845
|
-
let t = Array.from(m.current?.querySelectorAll(
|
|
1922
|
+
let t = Array.from(m.current?.querySelectorAll(Xe) ?? []);
|
|
1846
1923
|
if (!t.length) {
|
|
1847
1924
|
e.preventDefault();
|
|
1848
1925
|
return;
|
|
@@ -1852,10 +1929,10 @@ var T = {
|
|
|
1852
1929
|
},
|
|
1853
1930
|
children: [
|
|
1854
1931
|
(r || o) && /* @__PURE__ */ n("header", {
|
|
1855
|
-
className:
|
|
1932
|
+
className: Ye.header,
|
|
1856
1933
|
children: [r && /* @__PURE__ */ t("h2", {
|
|
1857
1934
|
id: f,
|
|
1858
|
-
className:
|
|
1935
|
+
className: Ye.title,
|
|
1859
1936
|
children: r
|
|
1860
1937
|
}), /* @__PURE__ */ t(w, {
|
|
1861
1938
|
variant: "empty",
|
|
@@ -1878,31 +1955,31 @@ var T = {
|
|
|
1878
1955
|
}),
|
|
1879
1956
|
i && /* @__PURE__ */ t("p", {
|
|
1880
1957
|
id: p,
|
|
1881
|
-
className:
|
|
1958
|
+
className: Ye.description,
|
|
1882
1959
|
children: i
|
|
1883
1960
|
}),
|
|
1884
1961
|
/* @__PURE__ */ t("div", {
|
|
1885
|
-
className:
|
|
1962
|
+
className: Ye.content,
|
|
1886
1963
|
children: e
|
|
1887
1964
|
})
|
|
1888
1965
|
]
|
|
1889
1966
|
});
|
|
1890
|
-
},
|
|
1891
|
-
let n =
|
|
1967
|
+
}, Qe = ({ registry: e }) => {
|
|
1968
|
+
let n = Q((e) => e.modals), r = Q((e) => e.closeModal), i = Q((e) => e.closeAllModals);
|
|
1892
1969
|
return s(() => {
|
|
1893
1970
|
let e = (e) => {
|
|
1894
1971
|
if (e.key !== "Escape") return;
|
|
1895
|
-
let t =
|
|
1972
|
+
let t = Q.getState().modals.at(-1);
|
|
1896
1973
|
t?.closeOnEscape && r(t.id);
|
|
1897
1974
|
};
|
|
1898
1975
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1899
1976
|
}, [r]), !n.length || typeof document > "u" ? null : p(/* @__PURE__ */ t("div", {
|
|
1900
|
-
className:
|
|
1977
|
+
className: Ye.layer,
|
|
1901
1978
|
"aria-label": "Модальные окна",
|
|
1902
1979
|
children: n.map((a, o) => {
|
|
1903
1980
|
let s = e[a.name];
|
|
1904
1981
|
return s ? /* @__PURE__ */ t("div", {
|
|
1905
|
-
className:
|
|
1982
|
+
className: Ye.backdrop,
|
|
1906
1983
|
"aria-hidden": o !== n.length - 1 || void 0,
|
|
1907
1984
|
onMouseDown: (e) => {
|
|
1908
1985
|
e.target === e.currentTarget && a.closeOnBackdrop && r(a.id);
|
|
@@ -1916,31 +1993,31 @@ var T = {
|
|
|
1916
1993
|
}, a.id) : null;
|
|
1917
1994
|
})
|
|
1918
1995
|
}), document.body);
|
|
1919
|
-
},
|
|
1920
|
-
let o =
|
|
1996
|
+
}, $e = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
|
|
1997
|
+
let o = Q((e) => e.modals.length);
|
|
1921
1998
|
return s(() => {
|
|
1922
1999
|
if (!a || o === 0) return;
|
|
1923
2000
|
let e = document.body.style.overflow;
|
|
1924
2001
|
return document.body.style.overflow = "hidden", () => {
|
|
1925
2002
|
document.body.style.overflow = e;
|
|
1926
2003
|
};
|
|
1927
|
-
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(
|
|
1928
|
-
},
|
|
2004
|
+
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Qe, { registry: r })] });
|
|
2005
|
+
}, et = (e) => e, tt = {
|
|
1929
2006
|
message: "_message_1vtru_1",
|
|
1930
2007
|
actions: "_actions_1vtru_3"
|
|
1931
|
-
},
|
|
2008
|
+
}, nt = /* @__PURE__ */ new Map(), rt = 0, it = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
|
|
1932
2009
|
let u = (e) => {
|
|
1933
|
-
|
|
2010
|
+
nt.get(l)?.(e), nt.delete(l), r();
|
|
1934
2011
|
};
|
|
1935
|
-
return /* @__PURE__ */ n(
|
|
2012
|
+
return /* @__PURE__ */ n(Ze, {
|
|
1936
2013
|
modalId: e,
|
|
1937
2014
|
title: i,
|
|
1938
2015
|
role: "alertdialog",
|
|
1939
2016
|
children: [/* @__PURE__ */ t("p", {
|
|
1940
|
-
className:
|
|
2017
|
+
className: tt.message,
|
|
1941
2018
|
children: a
|
|
1942
2019
|
}), /* @__PURE__ */ n("div", {
|
|
1943
|
-
className:
|
|
2020
|
+
className: tt.actions,
|
|
1944
2021
|
children: [/* @__PURE__ */ t(w, {
|
|
1945
2022
|
variant: "outline",
|
|
1946
2023
|
onClick: () => u(!1),
|
|
@@ -1952,55 +2029,80 @@ var T = {
|
|
|
1952
2029
|
})]
|
|
1953
2030
|
})]
|
|
1954
2031
|
});
|
|
1955
|
-
},
|
|
2032
|
+
}, at = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Ze, {
|
|
1956
2033
|
modalId: e,
|
|
1957
2034
|
title: i,
|
|
1958
2035
|
role: "alertdialog",
|
|
1959
2036
|
children: [/* @__PURE__ */ t("p", {
|
|
1960
|
-
className:
|
|
2037
|
+
className: tt.message,
|
|
1961
2038
|
children: a
|
|
1962
2039
|
}), /* @__PURE__ */ t("div", {
|
|
1963
|
-
className:
|
|
2040
|
+
className: tt.actions,
|
|
1964
2041
|
children: /* @__PURE__ */ t(w, {
|
|
1965
2042
|
onClick: r,
|
|
1966
2043
|
children: o
|
|
1967
2044
|
})
|
|
1968
2045
|
})]
|
|
1969
|
-
}),
|
|
1970
|
-
ConfirmModal:
|
|
1971
|
-
ErrorModal:
|
|
1972
|
-
}),
|
|
1973
|
-
let e =
|
|
2046
|
+
}), ot = et({
|
|
2047
|
+
ConfirmModal: it,
|
|
2048
|
+
ErrorModal: at
|
|
2049
|
+
}), st = () => {
|
|
2050
|
+
let e = Q((e) => e.openModal);
|
|
1974
2051
|
return (t = {}) => new Promise((n) => {
|
|
1975
|
-
|
|
1976
|
-
let r = `confirm-${
|
|
1977
|
-
|
|
2052
|
+
rt += 1;
|
|
2053
|
+
let r = `confirm-${rt}`;
|
|
2054
|
+
nt.set(r, n), e("ConfirmModal", {
|
|
1978
2055
|
...t,
|
|
1979
2056
|
requestId: r
|
|
1980
2057
|
}, { closeOnEscape: !1 });
|
|
1981
2058
|
});
|
|
1982
|
-
},
|
|
1983
|
-
let e =
|
|
2059
|
+
}, ct = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", lt = () => {
|
|
2060
|
+
let e = Q((e) => e.openModal);
|
|
1984
2061
|
return { showError: (t, n) => e("ErrorModal", {
|
|
1985
2062
|
title: n,
|
|
1986
|
-
message:
|
|
2063
|
+
message: ct(t)
|
|
1987
2064
|
}) };
|
|
1988
|
-
},
|
|
1989
|
-
let e =
|
|
2065
|
+
}, ut = v(() => ({})), dt = v(() => ({})), ft = () => {
|
|
2066
|
+
let e = Q((e) => e.modals), t = Q((e) => e.openModal);
|
|
1990
2067
|
return {
|
|
1991
2068
|
openModal: (e, n = {}, r) => t(e, n, r),
|
|
1992
|
-
closeModal:
|
|
1993
|
-
closeTopModal:
|
|
1994
|
-
closeAllModals:
|
|
2069
|
+
closeModal: Q((e) => e.closeModal),
|
|
2070
|
+
closeTopModal: Q((e) => e.closeTopModal),
|
|
2071
|
+
closeAllModals: Q((e) => e.closeAllModals),
|
|
1995
2072
|
isOpen: (t) => e.some((e) => e.name === t),
|
|
1996
2073
|
count: e.length
|
|
1997
2074
|
};
|
|
1998
|
-
},
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
"
|
|
2002
|
-
|
|
2003
|
-
|
|
2075
|
+
}, pt = {
|
|
2076
|
+
wrapper: "_wrapper_1qbyz_1",
|
|
2077
|
+
container: "_container_1qbyz_15",
|
|
2078
|
+
inner: "_inner_1qbyz_35",
|
|
2079
|
+
cube: "_cube_1qbyz_53",
|
|
2080
|
+
jump: "_jump_1qbyz_1",
|
|
2081
|
+
cube__inner: "_cube__inner_1qbyz_67",
|
|
2082
|
+
morph: "_morph_1qbyz_1"
|
|
2083
|
+
}, mt = () => /* @__PURE__ */ t("div", {
|
|
2084
|
+
className: pt.wrapper,
|
|
2085
|
+
children: /* @__PURE__ */ t("div", {
|
|
2086
|
+
className: pt.container,
|
|
2087
|
+
children: /* @__PURE__ */ n("div", {
|
|
2088
|
+
className: pt.inner,
|
|
2089
|
+
children: [
|
|
2090
|
+
/* @__PURE__ */ t("div", {
|
|
2091
|
+
className: pt.cube,
|
|
2092
|
+
children: /* @__PURE__ */ t("div", { className: pt.cube__inner })
|
|
2093
|
+
}),
|
|
2094
|
+
/* @__PURE__ */ t("div", {
|
|
2095
|
+
className: pt.cube,
|
|
2096
|
+
children: /* @__PURE__ */ t("div", { className: pt.cube__inner })
|
|
2097
|
+
}),
|
|
2098
|
+
/* @__PURE__ */ t("div", {
|
|
2099
|
+
className: pt.cube,
|
|
2100
|
+
children: /* @__PURE__ */ t("div", { className: pt.cube__inner })
|
|
2101
|
+
})
|
|
2102
|
+
]
|
|
2103
|
+
})
|
|
2104
|
+
})
|
|
2105
|
+
}), ht = {
|
|
2004
2106
|
viewport: "_viewport_15mi5_1",
|
|
2005
2107
|
"top-right": "_top-right_15mi5_3",
|
|
2006
2108
|
"top-left": "_top-left_15mi5_5",
|
|
@@ -2013,7 +2115,7 @@ var T = {
|
|
|
2013
2115
|
success: "_success_15mi5_19",
|
|
2014
2116
|
warning: "_warning_15mi5_21",
|
|
2015
2117
|
error: "_error_15mi5_23"
|
|
2016
|
-
},
|
|
2118
|
+
}, gt = (e) => {
|
|
2017
2119
|
let r;
|
|
2018
2120
|
return r = e === "info" ? /* @__PURE__ */ n("svg", {
|
|
2019
2121
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2099,7 +2201,7 @@ var T = {
|
|
|
2099
2201
|
/* @__PURE__ */ t("path", { d: "m9 9 6 6" })
|
|
2100
2202
|
]
|
|
2101
2203
|
}), r;
|
|
2102
|
-
},
|
|
2204
|
+
}, _t = ({ toast: e, onClose: r }) => {
|
|
2103
2205
|
let [i, a] = f(!1), o = d(e.duration), c = d(Date.now());
|
|
2104
2206
|
return s(() => {
|
|
2105
2207
|
if (i || e.duration <= 0) return;
|
|
@@ -2114,7 +2216,7 @@ var T = {
|
|
|
2114
2216
|
e.duration,
|
|
2115
2217
|
e.id
|
|
2116
2218
|
]), /* @__PURE__ */ n("article", {
|
|
2117
|
-
className: `${
|
|
2219
|
+
className: `${ht.toast} ${ht[e.variant]}`,
|
|
2118
2220
|
role: e.variant === "error" ? "alert" : "status",
|
|
2119
2221
|
"aria-live": e.variant === "error" ? "assertive" : "polite",
|
|
2120
2222
|
onMouseEnter: () => a(!0),
|
|
@@ -2122,9 +2224,9 @@ var T = {
|
|
|
2122
2224
|
onFocus: () => a(!0),
|
|
2123
2225
|
onBlur: () => a(!1),
|
|
2124
2226
|
children: [
|
|
2125
|
-
/* @__PURE__ */ t("div", { children:
|
|
2227
|
+
/* @__PURE__ */ t("div", { children: gt(e.variant) }),
|
|
2126
2228
|
/* @__PURE__ */ n("div", {
|
|
2127
|
-
className:
|
|
2229
|
+
className: ht.body,
|
|
2128
2230
|
children: [
|
|
2129
2231
|
e.title && /* @__PURE__ */ t("strong", { children: e.title }),
|
|
2130
2232
|
/* @__PURE__ */ t("div", { children: e.message }),
|
|
@@ -2158,11 +2260,11 @@ var T = {
|
|
|
2158
2260
|
})
|
|
2159
2261
|
]
|
|
2160
2262
|
});
|
|
2161
|
-
},
|
|
2263
|
+
}, vt = 0, yt = v((e) => ({
|
|
2162
2264
|
toasts: [],
|
|
2163
2265
|
showToast: (t) => {
|
|
2164
|
-
|
|
2165
|
-
let n = `ds-toast-${
|
|
2266
|
+
vt += 1;
|
|
2267
|
+
let n = `ds-toast-${vt}`;
|
|
2166
2268
|
return e((e) => ({ toasts: [...e.toasts, {
|
|
2167
2269
|
variant: "info",
|
|
2168
2270
|
duration: 5e3,
|
|
@@ -2173,18 +2275,18 @@ var T = {
|
|
|
2173
2275
|
},
|
|
2174
2276
|
removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
|
|
2175
2277
|
clearToasts: () => e({ toasts: [] })
|
|
2176
|
-
})),
|
|
2177
|
-
let n =
|
|
2278
|
+
})), bt = () => yt.setState({ toasts: [] }), xt = ({ position: e = "top-right" }) => {
|
|
2279
|
+
let n = yt((e) => e.toasts), r = yt((e) => e.removeToast);
|
|
2178
2280
|
return /* @__PURE__ */ t("div", {
|
|
2179
|
-
className: `${
|
|
2281
|
+
className: `${ht.viewport} ${ht[e]}`,
|
|
2180
2282
|
"aria-label": "Уведомления",
|
|
2181
|
-
children: n.map((e) => /* @__PURE__ */ t(
|
|
2283
|
+
children: n.map((e) => /* @__PURE__ */ t(_t, {
|
|
2182
2284
|
toast: e,
|
|
2183
2285
|
onClose: r
|
|
2184
2286
|
}, e.id))
|
|
2185
2287
|
});
|
|
2186
|
-
},
|
|
2187
|
-
let e =
|
|
2288
|
+
}, St = () => {
|
|
2289
|
+
let e = yt((e) => e.showToast), t = yt((e) => e.removeToast), n = yt((e) => e.clearToasts), r = o((t) => e({
|
|
2188
2290
|
...t,
|
|
2189
2291
|
variant: "info"
|
|
2190
2292
|
}), [e]), i = o((t) => e({
|
|
@@ -2214,7 +2316,7 @@ var T = {
|
|
|
2214
2316
|
i,
|
|
2215
2317
|
a
|
|
2216
2318
|
]);
|
|
2217
|
-
},
|
|
2319
|
+
}, Ct = {
|
|
2218
2320
|
root: "_root_s9o0g_1",
|
|
2219
2321
|
tooltip: "_tooltip_s9o0g_3",
|
|
2220
2322
|
"ds-tooltip-in": "_ds-tooltip-in_s9o0g_1",
|
|
@@ -2222,7 +2324,7 @@ var T = {
|
|
|
2222
2324
|
bottom: "_bottom_s9o0g_7",
|
|
2223
2325
|
left: "_left_s9o0g_9",
|
|
2224
2326
|
right: "_right_s9o0g_11"
|
|
2225
|
-
},
|
|
2327
|
+
}, wt = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: u = !1, maxWidth: p = 280, className: m = "" }) => {
|
|
2226
2328
|
let h = c(), [g, _] = f(!1), v = d(null), y = () => {
|
|
2227
2329
|
u || !e || (v.current = setTimeout(() => _(!0), l));
|
|
2228
2330
|
}, b = () => {
|
|
@@ -2244,77 +2346,153 @@ var T = {
|
|
|
2244
2346
|
onBlur: b
|
|
2245
2347
|
});
|
|
2246
2348
|
return /* @__PURE__ */ n("span", {
|
|
2247
|
-
className: `${
|
|
2349
|
+
className: `${Ct.root} ${m}`,
|
|
2248
2350
|
onPointerDown: g ? b : y,
|
|
2249
2351
|
children: [x, g && /* @__PURE__ */ t("span", {
|
|
2250
2352
|
id: h,
|
|
2251
2353
|
role: "tooltip",
|
|
2252
|
-
className: `${
|
|
2354
|
+
className: `${Ct.tooltip} ${Ct[o]}`,
|
|
2253
2355
|
style: { maxWidth: p },
|
|
2254
2356
|
children: e
|
|
2255
2357
|
})]
|
|
2256
2358
|
});
|
|
2257
|
-
},
|
|
2258
|
-
root: "
|
|
2259
|
-
frame: "
|
|
2260
|
-
video: "
|
|
2261
|
-
overlay: "
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2359
|
+
}, $ = {
|
|
2360
|
+
root: "_root_3casy_1",
|
|
2361
|
+
frame: "_frame_3casy_15",
|
|
2362
|
+
video: "_video_3casy_35",
|
|
2363
|
+
overlay: "_overlay_3casy_49",
|
|
2364
|
+
state: "_state_3casy_51",
|
|
2365
|
+
loaderViewport: "_loaderViewport_3casy_89",
|
|
2366
|
+
loaderScale: "_loaderScale_3casy_101",
|
|
2367
|
+
stateIcon: "_stateIcon_3casy_115",
|
|
2368
|
+
empty: "_empty_3casy_147",
|
|
2369
|
+
error: "_error_3casy_157",
|
|
2370
|
+
caption: "_caption_3casy_167"
|
|
2371
|
+
}, Tt = () => /* @__PURE__ */ n("svg", {
|
|
2372
|
+
className: $.stateIcon,
|
|
2373
|
+
viewBox: "0 0 24 24",
|
|
2374
|
+
fill: "none",
|
|
2375
|
+
"aria-hidden": "true",
|
|
2376
|
+
children: [
|
|
2377
|
+
/* @__PURE__ */ t("circle", {
|
|
2378
|
+
cx: "12",
|
|
2379
|
+
cy: "12",
|
|
2380
|
+
r: "9",
|
|
2381
|
+
stroke: "currentColor",
|
|
2382
|
+
strokeWidth: "1.7"
|
|
2383
|
+
}),
|
|
2384
|
+
/* @__PURE__ */ t("path", {
|
|
2385
|
+
d: "M12 10.5V16",
|
|
2386
|
+
stroke: "currentColor",
|
|
2387
|
+
strokeWidth: "1.7",
|
|
2388
|
+
strokeLinecap: "round"
|
|
2389
|
+
}),
|
|
2390
|
+
/* @__PURE__ */ t("circle", {
|
|
2391
|
+
cx: "12",
|
|
2392
|
+
cy: "7.5",
|
|
2393
|
+
r: "1",
|
|
2394
|
+
fill: "currentColor"
|
|
2395
|
+
})
|
|
2396
|
+
]
|
|
2397
|
+
}), Et = () => /* @__PURE__ */ n("svg", {
|
|
2398
|
+
className: $.stateIcon,
|
|
2399
|
+
viewBox: "0 0 24 24",
|
|
2400
|
+
fill: "none",
|
|
2401
|
+
"aria-hidden": "true",
|
|
2402
|
+
children: [
|
|
2403
|
+
/* @__PURE__ */ t("path", {
|
|
2404
|
+
d: "M12 3.5L21 19H3L12 3.5Z",
|
|
2405
|
+
stroke: "currentColor",
|
|
2406
|
+
strokeWidth: "1.7",
|
|
2407
|
+
strokeLinejoin: "round"
|
|
2408
|
+
}),
|
|
2409
|
+
/* @__PURE__ */ t("path", {
|
|
2410
|
+
d: "M12 9V13.5",
|
|
2411
|
+
stroke: "currentColor",
|
|
2412
|
+
strokeWidth: "1.7",
|
|
2413
|
+
strokeLinecap: "round"
|
|
2414
|
+
}),
|
|
2415
|
+
/* @__PURE__ */ t("circle", {
|
|
2416
|
+
cx: "12",
|
|
2417
|
+
cy: "16.5",
|
|
2418
|
+
r: "1",
|
|
2419
|
+
fill: "currentColor"
|
|
2420
|
+
})
|
|
2421
|
+
]
|
|
2422
|
+
}), Dt = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: c = "contain", loading: l = !1, error: u, fallback: d, className: p = "", controls: m = !0, playsInline: h = !0, ...g }) => {
|
|
2423
|
+
let [_, v] = f(!1), [y, b] = f(r.length > 0), x = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|");
|
|
2424
|
+
s(() => {
|
|
2425
|
+
v(!1), b(r.length > 0);
|
|
2426
|
+
}, [x, r.length]);
|
|
2427
|
+
let S = u ?? (_ ? "Не удалось воспроизвести видео" : void 0), C = l || y && !S && r.length > 0, w = !C && !S && r.length === 0;
|
|
2266
2428
|
return /* @__PURE__ */ n("figure", {
|
|
2267
|
-
className: `${
|
|
2429
|
+
className: `${$.root} ${p}`,
|
|
2268
2430
|
children: [/* @__PURE__ */ n("div", {
|
|
2269
|
-
className:
|
|
2270
|
-
style: { aspectRatio:
|
|
2431
|
+
className: $.frame,
|
|
2432
|
+
style: { aspectRatio: o },
|
|
2433
|
+
"aria-busy": C || void 0,
|
|
2271
2434
|
children: [
|
|
2272
|
-
!
|
|
2273
|
-
...
|
|
2274
|
-
"aria-label":
|
|
2275
|
-
controls:
|
|
2276
|
-
playsInline:
|
|
2277
|
-
className:
|
|
2278
|
-
style: { objectFit:
|
|
2435
|
+
!S && r.length > 0 && /* @__PURE__ */ n("video", {
|
|
2436
|
+
...g,
|
|
2437
|
+
"aria-label": a,
|
|
2438
|
+
controls: m,
|
|
2439
|
+
playsInline: h,
|
|
2440
|
+
className: $.video,
|
|
2441
|
+
style: { objectFit: c },
|
|
2442
|
+
onLoadStart: (e) => {
|
|
2443
|
+
b(!0), g.onLoadStart?.(e);
|
|
2444
|
+
},
|
|
2445
|
+
onLoadedData: (e) => {
|
|
2446
|
+
b(!1), g.onLoadedData?.(e);
|
|
2447
|
+
},
|
|
2448
|
+
onCanPlay: (e) => {
|
|
2449
|
+
b(!1), g.onCanPlay?.(e);
|
|
2450
|
+
},
|
|
2451
|
+
onWaiting: (e) => {
|
|
2452
|
+
b(!0), g.onWaiting?.(e);
|
|
2453
|
+
},
|
|
2454
|
+
onPlaying: (e) => {
|
|
2455
|
+
b(!1), g.onPlaying?.(e);
|
|
2456
|
+
},
|
|
2279
2457
|
onError: (e) => {
|
|
2280
|
-
|
|
2458
|
+
b(!1), v(!0), g.onError?.(e);
|
|
2281
2459
|
},
|
|
2282
|
-
children: [
|
|
2460
|
+
children: [r.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), i.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
|
|
2461
|
+
}),
|
|
2462
|
+
C && /* @__PURE__ */ n("div", {
|
|
2463
|
+
className: $.overlay,
|
|
2464
|
+
role: "status",
|
|
2465
|
+
"aria-live": "polite",
|
|
2466
|
+
children: [/* @__PURE__ */ t("div", {
|
|
2467
|
+
className: $.loaderViewport,
|
|
2468
|
+
"aria-hidden": "true",
|
|
2469
|
+
children: /* @__PURE__ */ t("div", {
|
|
2470
|
+
className: $.loaderScale,
|
|
2471
|
+
children: /* @__PURE__ */ t(mt, {})
|
|
2472
|
+
})
|
|
2473
|
+
}), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
|
|
2283
2474
|
}),
|
|
2284
|
-
|
|
2285
|
-
className:
|
|
2286
|
-
|
|
2475
|
+
w && /* @__PURE__ */ n("div", {
|
|
2476
|
+
className: `${$.state} ${$.empty}`,
|
|
2477
|
+
role: "status",
|
|
2478
|
+
children: [
|
|
2479
|
+
/* @__PURE__ */ t(Tt, {}),
|
|
2480
|
+
/* @__PURE__ */ t("strong", { children: "Видео отсутствует" }),
|
|
2481
|
+
d ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
|
|
2482
|
+
]
|
|
2287
2483
|
}),
|
|
2288
|
-
|
|
2289
|
-
className:
|
|
2484
|
+
!C && S && /* @__PURE__ */ n("div", {
|
|
2485
|
+
className: `${$.state} ${$.error}`,
|
|
2290
2486
|
role: "alert",
|
|
2291
|
-
children:
|
|
2487
|
+
children: [/* @__PURE__ */ t(Et, {}), d ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: S })] })]
|
|
2292
2488
|
})
|
|
2293
2489
|
]
|
|
2294
2490
|
}), /* @__PURE__ */ t("figcaption", {
|
|
2295
|
-
className:
|
|
2296
|
-
children:
|
|
2491
|
+
className: $.caption,
|
|
2492
|
+
children: a
|
|
2297
2493
|
})]
|
|
2298
2494
|
});
|
|
2299
|
-
},
|
|
2300
|
-
popup: "_popup_15ovj_1",
|
|
2301
|
-
trigger: "_trigger_15ovj_15",
|
|
2302
|
-
content: "_content_15ovj_23",
|
|
2303
|
-
top: "_top_15ovj_107",
|
|
2304
|
-
right: "_right_15ovj_141",
|
|
2305
|
-
bottom: "_bottom_15ovj_175",
|
|
2306
|
-
left: "_left_15ovj_209"
|
|
2307
|
-
}, Ct = ({ content: r, children: i, placement: a = "top", disabled: o = !1 }) => o ? /* @__PURE__ */ t(e, { children: i }) : /* @__PURE__ */ n("span", {
|
|
2308
|
-
className: `${St.popup} ${St[a]}`,
|
|
2309
|
-
children: [/* @__PURE__ */ t("span", {
|
|
2310
|
-
className: St.trigger,
|
|
2311
|
-
children: i
|
|
2312
|
-
}), /* @__PURE__ */ t("span", {
|
|
2313
|
-
className: St.content,
|
|
2314
|
-
role: "tooltip",
|
|
2315
|
-
children: r
|
|
2316
|
-
})]
|
|
2317
|
-
}), wt = {
|
|
2495
|
+
}, Ot = {
|
|
2318
2496
|
root: "_root_1tdda_1",
|
|
2319
2497
|
trigger: "_trigger_1tdda_15",
|
|
2320
2498
|
heading: "_heading_1tdda_41",
|
|
@@ -2324,30 +2502,80 @@ var T = {
|
|
|
2324
2502
|
open: "_open_1tdda_91",
|
|
2325
2503
|
content: "_content_1tdda_99",
|
|
2326
2504
|
contentInner: "_contentInner_1tdda_119"
|
|
2327
|
-
},
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2505
|
+
}, kt = (e, t, n, r = 16) => {
|
|
2506
|
+
if (t > Math.max(0, n - r * 2)) {
|
|
2507
|
+
let t = e - r;
|
|
2508
|
+
return Math.abs(t) <= 1 ? {
|
|
2509
|
+
alignment: "none",
|
|
2510
|
+
delta: 0
|
|
2511
|
+
} : {
|
|
2512
|
+
alignment: "start",
|
|
2513
|
+
delta: t
|
|
2514
|
+
};
|
|
2515
|
+
}
|
|
2516
|
+
let i = e + t, a = n - r;
|
|
2517
|
+
return i > a ? {
|
|
2518
|
+
alignment: "end",
|
|
2519
|
+
delta: i - a
|
|
2520
|
+
} : e < r ? {
|
|
2521
|
+
alignment: "start",
|
|
2522
|
+
delta: e - r
|
|
2523
|
+
} : {
|
|
2524
|
+
alignment: "none",
|
|
2525
|
+
delta: 0
|
|
2526
|
+
};
|
|
2527
|
+
}, At = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: l, autoScrollOnOpen: u = !0, scrollOffset: p = 16, className: m = "" }) => {
|
|
2528
|
+
let h = c(), [g, _] = f(a), v = o ?? g, y = d(null), b = d(null), x = d(v);
|
|
2529
|
+
return s(() => {
|
|
2530
|
+
let e = x.current;
|
|
2531
|
+
if (x.current = v, !v || e || !u) return;
|
|
2532
|
+
let t = y.current, n = b.current;
|
|
2533
|
+
if (!t || !n || typeof window > "u") return;
|
|
2534
|
+
let r = !1, i = () => {
|
|
2535
|
+
if (r) return;
|
|
2536
|
+
r = !0;
|
|
2537
|
+
let e = t.getBoundingClientRect(), n = kt(e.top, e.height, window.innerHeight, p);
|
|
2538
|
+
if (n.alignment === "none") return;
|
|
2539
|
+
let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
2540
|
+
window.scrollBy({
|
|
2541
|
+
top: n.delta,
|
|
2542
|
+
behavior: i ? "auto" : "smooth"
|
|
2543
|
+
});
|
|
2544
|
+
}, a = (e) => {
|
|
2545
|
+
e.target === n && e.propertyName === "grid-template-rows" && i();
|
|
2546
|
+
};
|
|
2547
|
+
n.addEventListener("transitionend", a);
|
|
2548
|
+
let o = window.setTimeout(i, 280);
|
|
2549
|
+
return () => {
|
|
2550
|
+
n.removeEventListener("transitionend", a), window.clearTimeout(o);
|
|
2551
|
+
};
|
|
2552
|
+
}, [
|
|
2553
|
+
u,
|
|
2554
|
+
v,
|
|
2555
|
+
p
|
|
2556
|
+
]), /* @__PURE__ */ n("section", {
|
|
2557
|
+
ref: y,
|
|
2558
|
+
className: `${Ot.root} ${v ? Ot.open : ""} ${m}`,
|
|
2331
2559
|
children: [/* @__PURE__ */ n("button", {
|
|
2332
2560
|
type: "button",
|
|
2333
|
-
className:
|
|
2334
|
-
"aria-expanded":
|
|
2335
|
-
"aria-controls":
|
|
2561
|
+
className: Ot.trigger,
|
|
2562
|
+
"aria-expanded": v,
|
|
2563
|
+
"aria-controls": h,
|
|
2336
2564
|
onClick: () => {
|
|
2337
|
-
let e = !
|
|
2338
|
-
o === void 0 &&
|
|
2565
|
+
let e = !v;
|
|
2566
|
+
o === void 0 && _(e), l?.(e);
|
|
2339
2567
|
},
|
|
2340
2568
|
children: [/* @__PURE__ */ n("span", {
|
|
2341
|
-
className:
|
|
2569
|
+
className: Ot.heading,
|
|
2342
2570
|
children: [/* @__PURE__ */ t("span", {
|
|
2343
|
-
className:
|
|
2571
|
+
className: Ot.title,
|
|
2344
2572
|
children: e
|
|
2345
2573
|
}), r && /* @__PURE__ */ t("span", {
|
|
2346
|
-
className:
|
|
2574
|
+
className: Ot.subtitle,
|
|
2347
2575
|
children: r
|
|
2348
2576
|
})]
|
|
2349
2577
|
}), /* @__PURE__ */ t("span", {
|
|
2350
|
-
className:
|
|
2578
|
+
className: Ot.icon,
|
|
2351
2579
|
"aria-hidden": "true",
|
|
2352
2580
|
children: /* @__PURE__ */ t("svg", {
|
|
2353
2581
|
viewBox: "0 0 20 20",
|
|
@@ -2362,16 +2590,17 @@ var T = {
|
|
|
2362
2590
|
})
|
|
2363
2591
|
})]
|
|
2364
2592
|
}), /* @__PURE__ */ t("div", {
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2593
|
+
ref: b,
|
|
2594
|
+
id: h,
|
|
2595
|
+
className: Ot.content,
|
|
2596
|
+
"aria-hidden": !v,
|
|
2368
2597
|
children: /* @__PURE__ */ t("div", {
|
|
2369
|
-
className:
|
|
2598
|
+
className: Ot.contentInner,
|
|
2370
2599
|
children: i
|
|
2371
2600
|
})
|
|
2372
2601
|
})]
|
|
2373
2602
|
});
|
|
2374
|
-
},
|
|
2603
|
+
}, jt = ({ children: e, containerId: t = "overlay-root" }) => {
|
|
2375
2604
|
let [n, r] = f(null);
|
|
2376
2605
|
return s(() => {
|
|
2377
2606
|
let e = document.getElementById(t);
|
|
@@ -2386,4 +2615,4 @@ var T = {
|
|
|
2386
2615
|
}, [t]), n ? p(e, n) : null;
|
|
2387
2616
|
};
|
|
2388
2617
|
//#endregion
|
|
2389
|
-
export {
|
|
2618
|
+
export { it as ConfirmModal, At as DSAccordion, b as DSBadge, w as DSButton, O as DSCheckbox, Se as DSDataTable, te as DSDateRange, H as DSDateTimePicker, oe as DSDropDown, De as DSDropDownMultiple, ee as DSFieldLabel, E as DSFieldMessage, Ke as DSFileInput, He as DSFilters, ue as DSIcon, Re as DSInfoBlock, ke as DSInput, S as DSLoader, Qe as DSModal, Ze as DSModalFrame, mt as DSPageLoader, jt as DSPortal, Be as DSRadioButton, Ie as DSSearchDropDown, K as DSSkeleton, ce as DSSort, _t as DSToast, xt as DSToastProvider, wt as DSTooltip, Dt as DSVideoPlayerFrame, at as ErrorModal, $e as ModalSystemProvider, ot as builtInModalRegistry, et as defineModalRegistry, P as formatDateTimeLocalValue, kt as getDSAccordionScrollTarget, fe as getDSDataTablePaginationItems, ct as getErrorMessage, ie as getNextEnabledOptionIndex, W as isValidDateRange, F as parseDateTimeLocalValue, Je as resetModalStore, bt as resetToastStore, st as useConfirmModal, ut as useConfirmModalStore, lt as useErrorModal, dt as useErrorModalStore, ft as useModals, Q as useModalsStore, St as useToast, yt as useToastStore, pe as validateDSDataTableData };
|