@efficiency-point/design-system 0.7.6 → 0.9.0
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 +37 -2
- package/dist/components/DSDataTable/DSDataTable.d.ts +18 -1
- package/dist/components/DSDataTable/DSDataTable.d.ts.map +1 -1
- package/dist/components/DSTooltip/DSTooltip.d.ts +4 -1
- package/dist/components/DSTooltip/DSTooltip.d.ts.map +1 -1
- package/dist/components/DSTooltip/DSTooltip.position.d.ts +15 -0
- package/dist/components/DSTooltip/DSTooltip.position.d.ts.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.es.js +1137 -1059
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -112,7 +112,7 @@ var C = "efficiency-point.design-system.theme", w = {
|
|
|
112
112
|
/* @__PURE__ */ t("div", { className: `${z.line} ${z[e]}` })
|
|
113
113
|
]
|
|
114
114
|
})
|
|
115
|
-
}),
|
|
115
|
+
}), te = {
|
|
116
116
|
button: "_button_4fqtv_1",
|
|
117
117
|
sm: "_sm_4fqtv_59",
|
|
118
118
|
md: "_md_4fqtv_73",
|
|
@@ -124,17 +124,17 @@ var C = "efficiency-point.design-system.theme", w = {
|
|
|
124
124
|
empty: "_empty_4fqtv_157",
|
|
125
125
|
destructive: "_destructive_4fqtv_171",
|
|
126
126
|
destructiveOutline: "_destructiveOutline_4fqtv_183"
|
|
127
|
-
},
|
|
127
|
+
}, B = s(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1, disabled: a, type: o = "button", className: s = "", ...c }, l) => /* @__PURE__ */ t("button", {
|
|
128
128
|
ref: l,
|
|
129
|
-
className: `${
|
|
129
|
+
className: `${te.button} ${te[n]} ${te[r]} ${s}`,
|
|
130
130
|
disabled: a || i,
|
|
131
131
|
"aria-busy": i || void 0,
|
|
132
132
|
...c,
|
|
133
133
|
type: o,
|
|
134
134
|
children: i ? /* @__PURE__ */ t(ee, { variant: n }) : e
|
|
135
135
|
}));
|
|
136
|
-
|
|
137
|
-
var
|
|
136
|
+
B.displayName = "DSButton";
|
|
137
|
+
var V = {
|
|
138
138
|
label: "_label_1o819_1",
|
|
139
139
|
required: "_required_1o819_23",
|
|
140
140
|
error: "_error_1o819_25",
|
|
@@ -143,28 +143,28 @@ var H = {
|
|
|
143
143
|
disabled: "_disabled_1o819_47",
|
|
144
144
|
message: "_message_1o819_55",
|
|
145
145
|
success: "_success_1o819_71"
|
|
146
|
-
},
|
|
147
|
-
className: `${
|
|
146
|
+
}, ne = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
|
|
147
|
+
className: `${V.label} ${a ? V.disabled : ""} ${o}`,
|
|
148
148
|
...s,
|
|
149
149
|
children: [
|
|
150
150
|
/* @__PURE__ */ t("span", { children: e }),
|
|
151
151
|
r && /* @__PURE__ */ t("span", {
|
|
152
|
-
className:
|
|
152
|
+
className: V.required,
|
|
153
153
|
"aria-hidden": "true",
|
|
154
154
|
children: "*"
|
|
155
155
|
}),
|
|
156
156
|
i && /* @__PURE__ */ t("span", {
|
|
157
|
-
className:
|
|
157
|
+
className: V.optional,
|
|
158
158
|
children: i
|
|
159
159
|
})
|
|
160
160
|
]
|
|
161
|
-
}),
|
|
161
|
+
}), H = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
|
|
162
162
|
id: r,
|
|
163
|
-
className: `${
|
|
163
|
+
className: `${V.message} ${V[n]} ${a}`,
|
|
164
164
|
role: i && n === "error" ? "alert" : void 0,
|
|
165
165
|
"aria-live": i && n !== "error" ? "polite" : void 0,
|
|
166
166
|
children: e
|
|
167
|
-
}),
|
|
167
|
+
}), U = ({ width: e = 24, height: r = 24, color: i, title: a, style: o, children: s, ...c }) => /* @__PURE__ */ n("svg", {
|
|
168
168
|
xmlns: "http://www.w3.org/2000/svg",
|
|
169
169
|
viewBox: "0 0 24 24",
|
|
170
170
|
width: e,
|
|
@@ -183,14 +183,14 @@ var H = {
|
|
|
183
183
|
} : o,
|
|
184
184
|
...c,
|
|
185
185
|
children: [a && /* @__PURE__ */ t("title", { children: a }), s]
|
|
186
|
-
}),
|
|
186
|
+
}), W = (e) => /* @__PURE__ */ t(U, {
|
|
187
187
|
...e,
|
|
188
188
|
children: /* @__PURE__ */ t("path", { d: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3" })
|
|
189
|
-
}), re = ({ strokeWidth: e = 2, ...r }) => /* @__PURE__ */ n(
|
|
189
|
+
}), re = ({ strokeWidth: e = 2, ...r }) => /* @__PURE__ */ n(U, {
|
|
190
190
|
strokeWidth: e,
|
|
191
191
|
...r,
|
|
192
192
|
children: [/* @__PURE__ */ t("path", { d: "M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8" }), /* @__PURE__ */ t("path", { d: "M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4M12 4v6M2 18h20M5 18v2M19 18v2" })]
|
|
193
|
-
}), ie = (e) => /* @__PURE__ */ n(
|
|
193
|
+
}), ie = (e) => /* @__PURE__ */ n(U, {
|
|
194
194
|
...e,
|
|
195
195
|
children: [
|
|
196
196
|
/* @__PURE__ */ t("path", { d: "M4 19.5A2.5 2.5 0 0 1 6.5 17H20" }),
|
|
@@ -198,7 +198,7 @@ var H = {
|
|
|
198
198
|
/* @__PURE__ */ t("path", { d: "M8 7h6" }),
|
|
199
199
|
/* @__PURE__ */ t("path", { d: "M8 11h8" })
|
|
200
200
|
]
|
|
201
|
-
}), ae = (e) => /* @__PURE__ */ n(
|
|
201
|
+
}), ae = (e) => /* @__PURE__ */ n(U, {
|
|
202
202
|
...e,
|
|
203
203
|
children: [
|
|
204
204
|
/* @__PURE__ */ t("rect", {
|
|
@@ -211,18 +211,18 @@ var H = {
|
|
|
211
211
|
/* @__PURE__ */ t("path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" }),
|
|
212
212
|
/* @__PURE__ */ t("path", { d: "M10 12h4" })
|
|
213
213
|
]
|
|
214
|
-
}), oe = (e) => /* @__PURE__ */ t(
|
|
214
|
+
}), oe = (e) => /* @__PURE__ */ t(U, {
|
|
215
215
|
...e,
|
|
216
216
|
children: /* @__PURE__ */ t("path", { d: "m5 12 4 4L19 6" })
|
|
217
|
-
}), se = (e) => /* @__PURE__ */ t(
|
|
217
|
+
}), se = (e) => /* @__PURE__ */ t(U, {
|
|
218
218
|
viewBox: "0 0 20 20",
|
|
219
219
|
...e,
|
|
220
220
|
children: /* @__PURE__ */ t("path", { d: "M5 7.5L10 12.5L15 7.5" })
|
|
221
|
-
}), ce = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(
|
|
221
|
+
}), ce = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(U, {
|
|
222
222
|
strokeWidth: e,
|
|
223
223
|
...n,
|
|
224
224
|
children: /* @__PURE__ */ t("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
225
|
-
}),
|
|
225
|
+
}), G = (e) => /* @__PURE__ */ n(U, {
|
|
226
226
|
...e,
|
|
227
227
|
children: [/* @__PURE__ */ t("rect", {
|
|
228
228
|
width: "14",
|
|
@@ -231,37 +231,37 @@ var H = {
|
|
|
231
231
|
y: "8",
|
|
232
232
|
rx: "2"
|
|
233
233
|
}), /* @__PURE__ */ t("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })]
|
|
234
|
-
}),
|
|
234
|
+
}), le = (e) => /* @__PURE__ */ t(U, {
|
|
235
235
|
...e,
|
|
236
236
|
children: /* @__PURE__ */ t("path", { d: "M4 20h4L19 9l-4-4L4 16v4z" })
|
|
237
|
-
}),
|
|
237
|
+
}), ue = (e) => /* @__PURE__ */ n(U, {
|
|
238
238
|
...e,
|
|
239
239
|
children: [/* @__PURE__ */ t("circle", {
|
|
240
240
|
cx: "12",
|
|
241
241
|
cy: "12",
|
|
242
242
|
r: "10"
|
|
243
243
|
}), /* @__PURE__ */ t("path", { d: "m15 9-6 6M9 9l6 6" })]
|
|
244
|
-
}), de = (e) => /* @__PURE__ */ n(
|
|
244
|
+
}), de = (e) => /* @__PURE__ */ n(U, {
|
|
245
245
|
...e,
|
|
246
246
|
children: [/* @__PURE__ */ t("path", { d: "M3 12s3.5-5 9-5 9 5 9 5-3.5 5-9 5-9-5-9-5Z" }), /* @__PURE__ */ t("circle", {
|
|
247
247
|
cx: "12",
|
|
248
248
|
cy: "12",
|
|
249
249
|
r: "2.5"
|
|
250
250
|
})]
|
|
251
|
-
}), fe = (e) => /* @__PURE__ */ t(
|
|
251
|
+
}), fe = (e) => /* @__PURE__ */ t(U, {
|
|
252
252
|
...e,
|
|
253
253
|
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" })
|
|
254
|
-
}), pe = (e) => /* @__PURE__ */ t(
|
|
254
|
+
}), pe = (e) => /* @__PURE__ */ t(U, {
|
|
255
255
|
...e,
|
|
256
256
|
children: /* @__PURE__ */ t("path", { d: "M12 10v7m0-10v.01" })
|
|
257
|
-
}), me = (e) => /* @__PURE__ */ n(
|
|
257
|
+
}), me = (e) => /* @__PURE__ */ n(U, {
|
|
258
258
|
...e,
|
|
259
259
|
children: [/* @__PURE__ */ t("circle", {
|
|
260
260
|
cx: "12",
|
|
261
261
|
cy: "12",
|
|
262
262
|
r: "10"
|
|
263
263
|
}), /* @__PURE__ */ t("path", { d: "M12 16v-4M12 8v.01" })]
|
|
264
|
-
}),
|
|
264
|
+
}), he = (e) => /* @__PURE__ */ n(U, {
|
|
265
265
|
...e,
|
|
266
266
|
children: [
|
|
267
267
|
/* @__PURE__ */ t("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5Z" }),
|
|
@@ -270,13 +270,13 @@ var H = {
|
|
|
270
270
|
/* @__PURE__ */ t("path", { d: "M16 17H8" }),
|
|
271
271
|
/* @__PURE__ */ t("path", { d: "M10 9H8" })
|
|
272
272
|
]
|
|
273
|
-
}),
|
|
273
|
+
}), ge = (e) => /* @__PURE__ */ t(U, {
|
|
274
274
|
...e,
|
|
275
275
|
children: /* @__PURE__ */ t("path", { d: "M5 12h14" })
|
|
276
|
-
}),
|
|
276
|
+
}), K = (e) => /* @__PURE__ */ t(U, {
|
|
277
277
|
...e,
|
|
278
278
|
children: /* @__PURE__ */ t("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" })
|
|
279
|
-
}), _e = (e) => /* @__PURE__ */ n(
|
|
279
|
+
}), _e = (e) => /* @__PURE__ */ n(U, {
|
|
280
280
|
...e,
|
|
281
281
|
children: [/* @__PURE__ */ t("rect", {
|
|
282
282
|
width: "18",
|
|
@@ -285,17 +285,17 @@ var H = {
|
|
|
285
285
|
y: "3",
|
|
286
286
|
rx: "2"
|
|
287
287
|
}), /* @__PURE__ */ t("path", { d: "M3 9h18M9 21V9" })]
|
|
288
|
-
}), ve = (e) => /* @__PURE__ */ t(
|
|
288
|
+
}), ve = (e) => /* @__PURE__ */ t(U, {
|
|
289
289
|
...e,
|
|
290
290
|
children: /* @__PURE__ */ t("path", {
|
|
291
291
|
d: "M8 5v14M16 5v14",
|
|
292
292
|
strokeWidth: "3"
|
|
293
293
|
})
|
|
294
|
-
}), ye = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(
|
|
294
|
+
}), ye = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(U, {
|
|
295
295
|
strokeWidth: e,
|
|
296
296
|
...n,
|
|
297
297
|
children: /* @__PURE__ */ t("path", { d: "M12 5v14M5 12h14" })
|
|
298
|
-
}), be = (e) => /* @__PURE__ */ n(
|
|
298
|
+
}), be = (e) => /* @__PURE__ */ n(U, {
|
|
299
299
|
...e,
|
|
300
300
|
children: [
|
|
301
301
|
/* @__PURE__ */ t("path", { d: "M12 22v-5" }),
|
|
@@ -303,60 +303,60 @@ var H = {
|
|
|
303
303
|
/* @__PURE__ */ t("path", { d: "M15 8V2" }),
|
|
304
304
|
/* @__PURE__ */ t("path", { d: "M18 8v5a6 6 0 0 1-12 0V8Z" })
|
|
305
305
|
]
|
|
306
|
-
}), xe = (e) => /* @__PURE__ */ t(
|
|
306
|
+
}), xe = (e) => /* @__PURE__ */ t(U, {
|
|
307
307
|
...e,
|
|
308
308
|
children: /* @__PURE__ */ t("path", { d: "M3 5h18v14H3V5Zm10 7h6v5h-6v-5Z" })
|
|
309
|
-
}), Se = (e) => /* @__PURE__ */ t(
|
|
309
|
+
}), Se = (e) => /* @__PURE__ */ t(U, {
|
|
310
310
|
...e,
|
|
311
311
|
children: /* @__PURE__ */ t("path", {
|
|
312
312
|
d: "m8 5 11 7-11 7V5Z",
|
|
313
313
|
fill: "currentColor",
|
|
314
314
|
stroke: "none"
|
|
315
315
|
})
|
|
316
|
-
}), Ce = (e) => /* @__PURE__ */ t(
|
|
316
|
+
}), Ce = (e) => /* @__PURE__ */ t(U, {
|
|
317
317
|
...e,
|
|
318
318
|
children: /* @__PURE__ */ t("path", { d: "M4 7v5h5M5.5 11a7 7 0 1 1 1.3 6.3" })
|
|
319
|
-
}), we = (e) => /* @__PURE__ */ t(
|
|
319
|
+
}), we = (e) => /* @__PURE__ */ t(U, {
|
|
320
320
|
...e,
|
|
321
321
|
children: /* @__PURE__ */ t("path", { d: "M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm7.4 5.2.1-1.7-.1-1.7 2-1.5-2-3.4-2.4 1a8 8 0 0 0-2.9-1.7L13.8 2h-3.9l-.4 2.7a8 8 0 0 0-2.8 1.7l-2.5-1-2 3.4 2.1 1.5-.1 1.7.1 1.7-2.1 1.5 2 3.4 2.5-1a8 8 0 0 0 2.8 1.7l.4 2.7h3.9l.3-2.7a8 8 0 0 0 2.9-1.7l2.4 1 2-3.4-2-1.5Z" })
|
|
322
|
-
}), Te = (e) => /* @__PURE__ */ t(
|
|
322
|
+
}), Te = (e) => /* @__PURE__ */ t(U, {
|
|
323
323
|
...e,
|
|
324
324
|
children: /* @__PURE__ */ t("path", { d: "M9 4H4v5m11-5h5v5M9 20H4v-5m11 5h5v-5" })
|
|
325
|
-
}), Ee = (e) => /* @__PURE__ */ t(
|
|
325
|
+
}), Ee = (e) => /* @__PURE__ */ t(U, {
|
|
326
326
|
...e,
|
|
327
327
|
children: /* @__PURE__ */ t("path", { d: "M4 9h5V4m6 5h5V4M4 15h5v5m6-5h5v5" })
|
|
328
|
-
}), De = (e) => /* @__PURE__ */ t(
|
|
328
|
+
}), De = (e) => /* @__PURE__ */ t(U, {
|
|
329
329
|
...e,
|
|
330
330
|
children: /* @__PURE__ */ t("path", { d: "M4 6h16v12H4V6Zm7 4a2 2 0 1 0 0 4m7-4a2 2 0 1 0 0 4" })
|
|
331
|
-
}), Oe = (e) => /* @__PURE__ */ t(
|
|
331
|
+
}), Oe = (e) => /* @__PURE__ */ t(U, {
|
|
332
332
|
...e,
|
|
333
333
|
children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12-1c1.3 1.5 1.3 4.5 0 6m2.5-8.5c3 3 3 8 0 11" })
|
|
334
|
-
}), ke = (e) => /* @__PURE__ */ t(
|
|
334
|
+
}), ke = (e) => /* @__PURE__ */ t(U, {
|
|
335
335
|
...e,
|
|
336
336
|
children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12 0 4 4m0-4-4 4" })
|
|
337
|
-
}), Ae = (e) => /* @__PURE__ */ t(
|
|
337
|
+
}), Ae = (e) => /* @__PURE__ */ t(U, {
|
|
338
338
|
...e,
|
|
339
339
|
children: /* @__PURE__ */ t("path", { d: "M8 17V5m-3 3 3-3 3 3M16 7v12m-3-3 3 3 3-3" })
|
|
340
|
-
}), je = (e) => /* @__PURE__ */ t(
|
|
340
|
+
}), je = (e) => /* @__PURE__ */ t(U, {
|
|
341
341
|
...e,
|
|
342
342
|
children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
|
|
343
|
-
}), Me = (e) => /* @__PURE__ */ t(
|
|
343
|
+
}), Me = (e) => /* @__PURE__ */ t(U, {
|
|
344
344
|
...e,
|
|
345
345
|
children: /* @__PURE__ */ t("path", { d: "M12 5v14m-5-5 5 5 5-5" })
|
|
346
|
-
}), Ne = (e) => /* @__PURE__ */ n(
|
|
346
|
+
}), Ne = (e) => /* @__PURE__ */ n(U, {
|
|
347
347
|
...e,
|
|
348
348
|
children: [/* @__PURE__ */ t("circle", {
|
|
349
349
|
cx: "12",
|
|
350
350
|
cy: "12",
|
|
351
351
|
r: "10"
|
|
352
352
|
}), /* @__PURE__ */ t("path", { d: "m9 12 2 2 4-4" })]
|
|
353
|
-
}), Pe = (e) => /* @__PURE__ */ t(
|
|
353
|
+
}), Pe = (e) => /* @__PURE__ */ t(U, {
|
|
354
354
|
...e,
|
|
355
355
|
children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
|
|
356
|
-
}), Fe = (e) => /* @__PURE__ */ n(
|
|
356
|
+
}), Fe = (e) => /* @__PURE__ */ n(U, {
|
|
357
357
|
...e,
|
|
358
358
|
children: [/* @__PURE__ */ t("path", { d: "M12 3.5L21 19H3L12 3.5Z" }), /* @__PURE__ */ t("path", { d: "M12 9v4.5M12 16.5v.01" })]
|
|
359
|
-
}), Ie = (e) => /* @__PURE__ */ n(
|
|
359
|
+
}), Ie = (e) => /* @__PURE__ */ n(U, {
|
|
360
360
|
...e,
|
|
361
361
|
children: [
|
|
362
362
|
/* @__PURE__ */ t("path", { d: "M3 6h18" }),
|
|
@@ -375,13 +375,13 @@ var H = {
|
|
|
375
375
|
y2: "17"
|
|
376
376
|
})
|
|
377
377
|
]
|
|
378
|
-
}), Le = (e) => /* @__PURE__ */ t(
|
|
378
|
+
}), Le = (e) => /* @__PURE__ */ t(U, {
|
|
379
379
|
...e,
|
|
380
380
|
children: /* @__PURE__ */ t("path", { d: "m21.4 11.6-8.9 8.9a6 6 0 0 1-8.5-8.5l9.6-9.6a4 4 0 0 1 5.7 5.7l-9.6 9.6a2 2 0 0 1-2.8-2.8l8.9-8.9" })
|
|
381
|
-
}), Re = (e) => /* @__PURE__ */ n(
|
|
381
|
+
}), Re = (e) => /* @__PURE__ */ n(U, {
|
|
382
382
|
...e,
|
|
383
383
|
children: [/* @__PURE__ */ t("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t("path", { d: "M22 2 11 13" })]
|
|
384
|
-
}), ze = (e) => /* @__PURE__ */ n(
|
|
384
|
+
}), ze = (e) => /* @__PURE__ */ n(U, {
|
|
385
385
|
...e,
|
|
386
386
|
children: [
|
|
387
387
|
/* @__PURE__ */ t("circle", {
|
|
@@ -392,7 +392,7 @@ var H = {
|
|
|
392
392
|
/* @__PURE__ */ t("path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }),
|
|
393
393
|
/* @__PURE__ */ t("path", { d: "M9 9h.01M15 9h.01" })
|
|
394
394
|
]
|
|
395
|
-
}), Be = (e) => /* @__PURE__ */ n(
|
|
395
|
+
}), Be = (e) => /* @__PURE__ */ n(U, {
|
|
396
396
|
...e,
|
|
397
397
|
children: [
|
|
398
398
|
/* @__PURE__ */ t("circle", {
|
|
@@ -417,7 +417,7 @@ var H = {
|
|
|
417
417
|
stroke: "none"
|
|
418
418
|
})
|
|
419
419
|
]
|
|
420
|
-
}), Ve = (e) => /* @__PURE__ */ t(
|
|
420
|
+
}), Ve = (e) => /* @__PURE__ */ t(U, {
|
|
421
421
|
...e,
|
|
422
422
|
children: [
|
|
423
423
|
5,
|
|
@@ -434,7 +434,7 @@ var H = {
|
|
|
434
434
|
fill: "currentColor",
|
|
435
435
|
stroke: "none"
|
|
436
436
|
}, `${n}-${e}`)))
|
|
437
|
-
}), q = (e) => (n) => /* @__PURE__ */ t(
|
|
437
|
+
}), q = (e) => (n) => /* @__PURE__ */ t(U, {
|
|
438
438
|
...n,
|
|
439
439
|
children: e.map(([e, t], n) => o(e, {
|
|
440
440
|
...t,
|
|
@@ -644,7 +644,7 @@ var H = {
|
|
|
644
644
|
d: "M12 6v6h4",
|
|
645
645
|
key: "135r8i"
|
|
646
646
|
}]]),
|
|
647
|
-
IconCopy:
|
|
647
|
+
IconCopy: G,
|
|
648
648
|
IconDownload: q([
|
|
649
649
|
["path", {
|
|
650
650
|
d: "M12 15V3",
|
|
@@ -691,7 +691,7 @@ var H = {
|
|
|
691
691
|
key: "18s6g9"
|
|
692
692
|
}]
|
|
693
693
|
]),
|
|
694
|
-
IconFileText:
|
|
694
|
+
IconFileText: he,
|
|
695
695
|
IconGauge: q([["path", {
|
|
696
696
|
d: "m12 14 4-4",
|
|
697
697
|
key: "9kzdfg"
|
|
@@ -1100,19 +1100,19 @@ var H = {
|
|
|
1100
1100
|
d: "m6 6 12 12",
|
|
1101
1101
|
key: "d8bk6v"
|
|
1102
1102
|
}]]),
|
|
1103
|
-
IconBasket:
|
|
1103
|
+
IconBasket: W,
|
|
1104
1104
|
IconCheck: oe,
|
|
1105
1105
|
IconChevron: se,
|
|
1106
1106
|
IconCross: ce,
|
|
1107
|
-
IconEdit:
|
|
1108
|
-
IconErrorCircle:
|
|
1107
|
+
IconEdit: le,
|
|
1108
|
+
IconErrorCircle: ue,
|
|
1109
1109
|
IconEye: de,
|
|
1110
1110
|
IconEyeOff: fe,
|
|
1111
1111
|
IconInfo: pe,
|
|
1112
1112
|
IconInfoCircle: me,
|
|
1113
|
-
IconMinus:
|
|
1113
|
+
IconMinus: ge,
|
|
1114
1114
|
IconMoreVertical: Be,
|
|
1115
|
-
IconList:
|
|
1115
|
+
IconList: K,
|
|
1116
1116
|
IconPanelsTopLeft: _e,
|
|
1117
1117
|
IconPause: ve,
|
|
1118
1118
|
IconPaperclip: Le,
|
|
@@ -1190,11 +1190,11 @@ var H = {
|
|
|
1190
1190
|
i && /* @__PURE__ */ t("span", { children: i })
|
|
1191
1191
|
]
|
|
1192
1192
|
}),
|
|
1193
|
-
a && !o && /* @__PURE__ */ t(
|
|
1193
|
+
a && !o && /* @__PURE__ */ t(H, {
|
|
1194
1194
|
id: x,
|
|
1195
1195
|
children: a
|
|
1196
1196
|
}),
|
|
1197
|
-
o && /* @__PURE__ */ t(
|
|
1197
|
+
o && /* @__PURE__ */ t(H, {
|
|
1198
1198
|
id: S,
|
|
1199
1199
|
variant: "error",
|
|
1200
1200
|
children: o
|
|
@@ -1311,13 +1311,13 @@ var H = {
|
|
|
1311
1311
|
let r = nt(e).getTime();
|
|
1312
1312
|
return !!(t && r < nt(t).getTime() || n && r > nt(n).getTime());
|
|
1313
1313
|
}, lt = 8, ut = 6, dt = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: s, hint: c, error: u, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: w, name: T, className: E = "" }) => {
|
|
1314
|
-
let D = f(), O = w ?? `ds-date-time-${T ?? D}`, k = c ? `${O}-hint` : void 0, A = u ? `${O}-error` : void 0, j = h(null), M = h(null), N = h(null), P = h(null), [F, I] = g(!1), [L, R] = g(r ?? /* @__PURE__ */ new Date()), [z, ee] = g(rt(r, "time")), [
|
|
1314
|
+
let D = f(), O = w ?? `ds-date-time-${T ?? D}`, k = c ? `${O}-hint` : void 0, A = u ? `${O}-error` : void 0, j = h(null), M = h(null), N = h(null), P = h(null), [F, I] = g(!1), [L, R] = g(r ?? /* @__PURE__ */ new Date()), [z, ee] = g(rt(r, "time")), [te, B] = g(Ze(r)), [V, U] = g(""), [W, re] = g(0), [ie, ae] = g(null), oe = m(() => ot(L), [L]), se = a !== "time", ce = a !== "date";
|
|
1315
1315
|
d(() => {
|
|
1316
|
-
r && R(r), ee(rt(r, "time")),
|
|
1316
|
+
r && R(r), ee(rt(r, "time")), B(Ze(r));
|
|
1317
1317
|
}, [r]), d(() => () => {
|
|
1318
1318
|
P.current && clearTimeout(P.current);
|
|
1319
1319
|
}, []);
|
|
1320
|
-
let
|
|
1320
|
+
let G = l(() => {
|
|
1321
1321
|
let e = M.current, t = N.current;
|
|
1322
1322
|
if (!e || !t) return;
|
|
1323
1323
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - lt, o = n.top - lt, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(lt, n.top - r.height - ut) : n.bottom + ut, u = n.left, d = i - r.width - lt;
|
|
@@ -1332,12 +1332,12 @@ var H = {
|
|
|
1332
1332
|
ae(null);
|
|
1333
1333
|
return;
|
|
1334
1334
|
}
|
|
1335
|
-
return
|
|
1336
|
-
window.removeEventListener("resize",
|
|
1335
|
+
return G(), window.addEventListener("resize", G), window.addEventListener("scroll", G, !0), () => {
|
|
1336
|
+
window.removeEventListener("resize", G), window.removeEventListener("scroll", G, !0);
|
|
1337
1337
|
};
|
|
1338
1338
|
}, [
|
|
1339
1339
|
F,
|
|
1340
|
-
|
|
1340
|
+
G,
|
|
1341
1341
|
L,
|
|
1342
1342
|
z
|
|
1343
1343
|
]), d(() => {
|
|
@@ -1352,29 +1352,29 @@ var H = {
|
|
|
1352
1352
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1353
1353
|
};
|
|
1354
1354
|
}, [F]);
|
|
1355
|
-
let
|
|
1355
|
+
let le = (e) => {
|
|
1356
1356
|
if (ct(e, x, S)) return;
|
|
1357
1357
|
let t = a === "date" ? it(rt(e, "date"), "date") : new Date(e);
|
|
1358
|
-
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t),
|
|
1359
|
-
},
|
|
1360
|
-
|
|
1361
|
-
|
|
1358
|
+
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), B(Ze(t)), a === "date" && I(!1));
|
|
1359
|
+
}, ue = () => {
|
|
1360
|
+
U(Xe), re((e) => e + 1), P.current && clearTimeout(P.current), P.current = setTimeout(() => {
|
|
1361
|
+
U(""), P.current = null;
|
|
1362
1362
|
}, 3e3);
|
|
1363
1363
|
}, de = (e) => {
|
|
1364
1364
|
let t = e.replace(/\D/g, "").slice(0, Ye);
|
|
1365
1365
|
if (!et(t)) {
|
|
1366
|
-
|
|
1366
|
+
ue();
|
|
1367
1367
|
return;
|
|
1368
1368
|
}
|
|
1369
1369
|
let n = Qe(t);
|
|
1370
|
-
if (
|
|
1370
|
+
if (B(n), !t) {
|
|
1371
1371
|
i?.(null);
|
|
1372
1372
|
return;
|
|
1373
1373
|
}
|
|
1374
1374
|
if (t.length < Ye) return;
|
|
1375
1375
|
let o = tt(n);
|
|
1376
1376
|
if (!o || ct(o, x, S)) {
|
|
1377
|
-
|
|
1377
|
+
ue();
|
|
1378
1378
|
return;
|
|
1379
1379
|
}
|
|
1380
1380
|
a === "datetime" && o.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(o), R(o), I(!1), requestAnimationFrame(() => M.current?.blur());
|
|
@@ -1387,11 +1387,11 @@ var H = {
|
|
|
1387
1387
|
if (!t) return;
|
|
1388
1388
|
let n = new Date(a === "datetime" ? r ?? L : /* @__PURE__ */ new Date());
|
|
1389
1389
|
n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
|
|
1390
|
-
}, pe = s ?? (a === "date" ? "ДД.ММ.ГГГГ" : a === "time" ? "ЧЧ:ММ" : "ДД.ММ.ГГГГ ЧЧ:ММ"), me =
|
|
1390
|
+
}, pe = s ?? (a === "date" ? "ДД.ММ.ГГГГ" : a === "time" ? "ЧЧ:ММ" : "ДД.ММ.ГГГГ ЧЧ:ММ"), me = V ? `${O}-validation` : void 0, he = [
|
|
1391
1391
|
k,
|
|
1392
1392
|
A,
|
|
1393
1393
|
me
|
|
1394
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1394
|
+
].filter(Boolean).join(" ") || void 0, ge = F && !y ? /* @__PURE__ */ n("div", {
|
|
1395
1395
|
ref: N,
|
|
1396
1396
|
className: Y.panel,
|
|
1397
1397
|
role: "dialog",
|
|
@@ -1465,7 +1465,7 @@ var H = {
|
|
|
1465
1465
|
className: `${Y.day} ${e.getMonth() === L.getMonth() ? "" : Y.outside} ${n ? Y.selected : ""}`,
|
|
1466
1466
|
disabled: ct(e, x, S),
|
|
1467
1467
|
"aria-pressed": n,
|
|
1468
|
-
onClick: () =>
|
|
1468
|
+
onClick: () => le(e),
|
|
1469
1469
|
children: e.getDate()
|
|
1470
1470
|
}, e.toISOString());
|
|
1471
1471
|
})
|
|
@@ -1484,7 +1484,7 @@ var H = {
|
|
|
1484
1484
|
ref: j,
|
|
1485
1485
|
className: `${Y.wrapper} ${E}`,
|
|
1486
1486
|
children: [
|
|
1487
|
-
o && /* @__PURE__ */ t(
|
|
1487
|
+
o && /* @__PURE__ */ t(ne, {
|
|
1488
1488
|
htmlFor: O,
|
|
1489
1489
|
required: b,
|
|
1490
1490
|
disabled: v,
|
|
@@ -1498,7 +1498,7 @@ var H = {
|
|
|
1498
1498
|
id: O,
|
|
1499
1499
|
name: T,
|
|
1500
1500
|
className: Y.dateInput,
|
|
1501
|
-
value:
|
|
1501
|
+
value: te,
|
|
1502
1502
|
placeholder: pe.split(" ")[0],
|
|
1503
1503
|
inputMode: "numeric",
|
|
1504
1504
|
autoComplete: "off",
|
|
@@ -1507,8 +1507,8 @@ var H = {
|
|
|
1507
1507
|
readOnly: y,
|
|
1508
1508
|
"aria-expanded": F,
|
|
1509
1509
|
"aria-haspopup": "dialog",
|
|
1510
|
-
"aria-describedby":
|
|
1511
|
-
"aria-invalid": !!(u ||
|
|
1510
|
+
"aria-describedby": he,
|
|
1511
|
+
"aria-invalid": !!(u || V) || void 0,
|
|
1512
1512
|
onFocus: () => {
|
|
1513
1513
|
y || I(!0);
|
|
1514
1514
|
},
|
|
@@ -1532,7 +1532,7 @@ var H = {
|
|
|
1532
1532
|
I((e) => !e), M.current?.focus();
|
|
1533
1533
|
},
|
|
1534
1534
|
children: /* @__PURE__ */ t("span", {
|
|
1535
|
-
className: `${Y.chevron} ${
|
|
1535
|
+
className: `${Y.chevron} ${ge ? Y.chevronOpen : ""}`,
|
|
1536
1536
|
"aria-hidden": "true",
|
|
1537
1537
|
children: /* @__PURE__ */ t(J, {
|
|
1538
1538
|
name: "IconChevron",
|
|
@@ -1552,7 +1552,7 @@ var H = {
|
|
|
1552
1552
|
"aria-readonly": y || void 0,
|
|
1553
1553
|
"aria-expanded": F,
|
|
1554
1554
|
"aria-haspopup": "dialog",
|
|
1555
|
-
"aria-describedby":
|
|
1555
|
+
"aria-describedby": he,
|
|
1556
1556
|
onClick: () => {
|
|
1557
1557
|
y || I((e) => !e);
|
|
1558
1558
|
},
|
|
@@ -1560,7 +1560,7 @@ var H = {
|
|
|
1560
1560
|
className: r ? Y.value : Y.placeholder,
|
|
1561
1561
|
children: at(r, a) || pe
|
|
1562
1562
|
}), /* @__PURE__ */ t("span", {
|
|
1563
|
-
className: `${Y.chevron} ${
|
|
1563
|
+
className: `${Y.chevron} ${ge ? Y.chevronOpen : ""}`,
|
|
1564
1564
|
"aria-hidden": "true",
|
|
1565
1565
|
children: /* @__PURE__ */ t(J, {
|
|
1566
1566
|
name: "IconChevron",
|
|
@@ -1569,19 +1569,19 @@ var H = {
|
|
|
1569
1569
|
})
|
|
1570
1570
|
})]
|
|
1571
1571
|
}),
|
|
1572
|
-
|
|
1572
|
+
V && /* @__PURE__ */ t("span", {
|
|
1573
1573
|
id: me,
|
|
1574
1574
|
className: Y.validationTooltip,
|
|
1575
1575
|
role: "status",
|
|
1576
1576
|
"aria-live": "polite",
|
|
1577
|
-
children:
|
|
1578
|
-
},
|
|
1579
|
-
|
|
1580
|
-
c && !u && /* @__PURE__ */ t(
|
|
1577
|
+
children: V
|
|
1578
|
+
}, W),
|
|
1579
|
+
ge && _(ge, document.body),
|
|
1580
|
+
c && !u && /* @__PURE__ */ t(H, {
|
|
1581
1581
|
id: k,
|
|
1582
1582
|
children: c
|
|
1583
1583
|
}),
|
|
1584
|
-
u && /* @__PURE__ */ t(
|
|
1584
|
+
u && /* @__PURE__ */ t(H, {
|
|
1585
1585
|
id: A,
|
|
1586
1586
|
variant: "error",
|
|
1587
1587
|
children: u
|
|
@@ -1629,7 +1629,7 @@ var H = {
|
|
|
1629
1629
|
to: t
|
|
1630
1630
|
})
|
|
1631
1631
|
})]
|
|
1632
|
-
}), c && !g && /* @__PURE__ */ t(
|
|
1632
|
+
}), c && !g && /* @__PURE__ */ t(H, { children: c })]
|
|
1633
1633
|
});
|
|
1634
1634
|
}, ht = {
|
|
1635
1635
|
group: "_group_ey6uk_1",
|
|
@@ -1683,7 +1683,7 @@ var H = {
|
|
|
1683
1683
|
}
|
|
1684
1684
|
return Infinity;
|
|
1685
1685
|
}, St = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: w = !0, maxMenuHeight: T }) => {
|
|
1686
|
-
let E = f(), D = C ?? `ds-dropdown-${S ?? E}`, O = `${D}-listbox`, [k, A] = g(!1), [j, M] = g(null), N = h(null), P = h(null), F = h(null), I = h([]), L = m(() => e.find((e) => e.value === r), [e, r]), R = y ? `${D}-hint` : void 0, z = u ? `${D}-error` : void 0, ee = [R, z].filter(Boolean).join(" ") || void 0,
|
|
1686
|
+
let E = f(), D = C ?? `ds-dropdown-${S ?? E}`, O = `${D}-listbox`, [k, A] = g(!1), [j, M] = g(null), N = h(null), P = h(null), F = h(null), I = h([]), L = m(() => e.find((e) => e.value === r), [e, r]), R = y ? `${D}-hint` : void 0, z = u ? `${D}-error` : void 0, ee = [R, z].filter(Boolean).join(" ") || void 0, te = o && s, B = l(() => {
|
|
1687
1687
|
let e = P.current, t = F.current;
|
|
1688
1688
|
if (!e || !t) return;
|
|
1689
1689
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - _t, o = n.top - _t, s = a < r.height && o > a, c = Math.max(yt, s ? o : a), l = xt(T), u = Math.min(c, l), d = n.left, f = i - n.width - _t, p = Math.max(_t, Math.min(d, f)), m = s ? Math.max(_t, n.top - r.height - vt) : n.bottom + vt;
|
|
@@ -1699,12 +1699,12 @@ var H = {
|
|
|
1699
1699
|
M(null);
|
|
1700
1700
|
return;
|
|
1701
1701
|
}
|
|
1702
|
-
return
|
|
1703
|
-
window.removeEventListener("resize",
|
|
1702
|
+
return B(), window.addEventListener("resize", B), window.addEventListener("scroll", B, !0), () => {
|
|
1703
|
+
window.removeEventListener("resize", B), window.removeEventListener("scroll", B, !0);
|
|
1704
1704
|
};
|
|
1705
1705
|
}, [
|
|
1706
1706
|
k,
|
|
1707
|
-
|
|
1707
|
+
B,
|
|
1708
1708
|
e.length
|
|
1709
1709
|
]), d(() => {
|
|
1710
1710
|
if (!k) return;
|
|
@@ -1718,14 +1718,14 @@ var H = {
|
|
|
1718
1718
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1719
1719
|
};
|
|
1720
1720
|
}, [k]);
|
|
1721
|
-
let
|
|
1721
|
+
let V = (t, n) => {
|
|
1722
1722
|
let r = bt(e, t, n);
|
|
1723
1723
|
if (r === -1) return;
|
|
1724
1724
|
let i = I.current[r];
|
|
1725
1725
|
i?.focus(), i?.scrollIntoView({ block: "nearest" });
|
|
1726
|
-
},
|
|
1726
|
+
}, H = (e) => {
|
|
1727
1727
|
e.disabled || (i?.(e.value, e), A(!1), P.current?.focus());
|
|
1728
|
-
},
|
|
1728
|
+
}, U = k ? /* @__PURE__ */ t("ul", {
|
|
1729
1729
|
ref: F,
|
|
1730
1730
|
id: O,
|
|
1731
1731
|
className: X.menu,
|
|
@@ -1763,19 +1763,19 @@ var H = {
|
|
|
1763
1763
|
i.variant === "action" ? X.actionOption : "",
|
|
1764
1764
|
o ? X.selected : ""
|
|
1765
1765
|
].filter(Boolean).join(" "),
|
|
1766
|
-
onClick: () =>
|
|
1766
|
+
onClick: () => H(i),
|
|
1767
1767
|
onKeyDown: (t) => {
|
|
1768
1768
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
1769
1769
|
t.preventDefault();
|
|
1770
1770
|
let e = t.key === "ArrowDown" ? 1 : -1;
|
|
1771
|
-
|
|
1771
|
+
V(a + e, e);
|
|
1772
1772
|
}
|
|
1773
1773
|
if (t.key === "Tab" && A(!1), t.key === "Home" || t.key === "End") {
|
|
1774
1774
|
t.preventDefault();
|
|
1775
1775
|
let n = t.key === "Home" ? 1 : -1;
|
|
1776
|
-
|
|
1776
|
+
V(t.key === "Home" ? 0 : e.length - 1, n);
|
|
1777
1777
|
}
|
|
1778
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
1778
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), H(i));
|
|
1779
1779
|
},
|
|
1780
1780
|
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(J, {
|
|
1781
1781
|
name: "IconCheck",
|
|
@@ -1794,15 +1794,15 @@ var H = {
|
|
|
1794
1794
|
b
|
|
1795
1795
|
].filter(Boolean).join(" "),
|
|
1796
1796
|
children: [
|
|
1797
|
-
c && /* @__PURE__ */ t(
|
|
1797
|
+
c && /* @__PURE__ */ t(ne, {
|
|
1798
1798
|
required: x,
|
|
1799
1799
|
disabled: o,
|
|
1800
|
-
htmlFor:
|
|
1800
|
+
htmlFor: te ? void 0 : D,
|
|
1801
1801
|
children: c
|
|
1802
1802
|
}),
|
|
1803
1803
|
/* @__PURE__ */ t("div", {
|
|
1804
1804
|
className: X.container,
|
|
1805
|
-
children:
|
|
1805
|
+
children: te ? /* @__PURE__ */ t("div", {
|
|
1806
1806
|
id: D,
|
|
1807
1807
|
className: X.disabledText,
|
|
1808
1808
|
"aria-describedby": ee,
|
|
@@ -1825,13 +1825,13 @@ var H = {
|
|
|
1825
1825
|
t.preventDefault(), A(!0);
|
|
1826
1826
|
let n = t.key === "ArrowDown" ? 1 : -1;
|
|
1827
1827
|
requestAnimationFrame(() => {
|
|
1828
|
-
|
|
1828
|
+
V(t.key === "ArrowDown" ? 0 : e.length - 1, n);
|
|
1829
1829
|
});
|
|
1830
1830
|
}
|
|
1831
1831
|
if (t.key === "Enter" && k) {
|
|
1832
1832
|
t.preventDefault();
|
|
1833
1833
|
let n = e.findIndex((e) => e.value === r);
|
|
1834
|
-
|
|
1834
|
+
V(n >= 0 ? n : 0, 1);
|
|
1835
1835
|
}
|
|
1836
1836
|
},
|
|
1837
1837
|
children: [/* @__PURE__ */ t("span", {
|
|
@@ -1849,7 +1849,7 @@ var H = {
|
|
|
1849
1849
|
})]
|
|
1850
1850
|
})
|
|
1851
1851
|
}),
|
|
1852
|
-
k && _(
|
|
1852
|
+
k && _(U, document.body),
|
|
1853
1853
|
y && !u && /* @__PURE__ */ t("span", {
|
|
1854
1854
|
id: R,
|
|
1855
1855
|
className: X.message,
|
|
@@ -1910,7 +1910,7 @@ var H = {
|
|
|
1910
1910
|
}, [C]), /* @__PURE__ */ n("div", {
|
|
1911
1911
|
className: `${Tt.wrapper} ${m}`,
|
|
1912
1912
|
children: [
|
|
1913
|
-
l && /* @__PURE__ */ t(
|
|
1913
|
+
l && /* @__PURE__ */ t(ne, {
|
|
1914
1914
|
htmlFor: k,
|
|
1915
1915
|
required: x,
|
|
1916
1916
|
disabled: o,
|
|
@@ -1979,11 +1979,11 @@ var H = {
|
|
|
1979
1979
|
})
|
|
1980
1980
|
]
|
|
1981
1981
|
}),
|
|
1982
|
-
p && !u && /* @__PURE__ */ t(
|
|
1982
|
+
p && !u && /* @__PURE__ */ t(H, {
|
|
1983
1983
|
id: N,
|
|
1984
1984
|
children: p
|
|
1985
1985
|
}),
|
|
1986
|
-
u && /* @__PURE__ */ t(
|
|
1986
|
+
u && /* @__PURE__ */ t(H, {
|
|
1987
1987
|
id: P,
|
|
1988
1988
|
variant: "error",
|
|
1989
1989
|
children: u
|
|
@@ -1998,7 +1998,7 @@ var H = {
|
|
|
1998
1998
|
}
|
|
1999
1999
|
return Infinity;
|
|
2000
2000
|
}, jt = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: w = !1, needMark: T = !0, maxMenuHeight: E }) => {
|
|
2001
|
-
let D = f(), O = C ?? `ds-dropdown-multiple-${S ?? D}`, k = `${O}-listbox`, [A, j] = g(!1), [M, N] = g(null), P = h(null), F = h(null), I = h(null), L = h([]), R = m(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${O}-hint` : void 0, ee = u ? `${O}-error` : void 0,
|
|
2001
|
+
let D = f(), O = C ?? `ds-dropdown-multiple-${S ?? D}`, k = `${O}-listbox`, [A, j] = g(!1), [M, N] = g(null), P = h(null), F = h(null), I = h(null), L = h([]), R = m(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${O}-hint` : void 0, ee = u ? `${O}-error` : void 0, te = [z, ee].filter(Boolean).join(" ") || void 0, B = o && s, V = l(() => {
|
|
2002
2002
|
let e = F.current, t = I.current;
|
|
2003
2003
|
if (!e || !t) return;
|
|
2004
2004
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - Dt, a = n.top - Dt, o = i < r.height && a > i, s = Math.max(kt, o ? a : i), c = window.innerWidth - n.width - Dt;
|
|
@@ -2014,13 +2014,13 @@ var H = {
|
|
|
2014
2014
|
N(null);
|
|
2015
2015
|
return;
|
|
2016
2016
|
}
|
|
2017
|
-
return
|
|
2018
|
-
window.removeEventListener("resize",
|
|
2017
|
+
return V(), window.addEventListener("resize", V), window.addEventListener("scroll", V, !0), () => {
|
|
2018
|
+
window.removeEventListener("resize", V), window.removeEventListener("scroll", V, !0);
|
|
2019
2019
|
};
|
|
2020
2020
|
}, [
|
|
2021
2021
|
A,
|
|
2022
2022
|
e.length,
|
|
2023
|
-
|
|
2023
|
+
V
|
|
2024
2024
|
]), d(() => {
|
|
2025
2025
|
if (!A) return;
|
|
2026
2026
|
let e = (e) => {
|
|
@@ -2033,14 +2033,14 @@ var H = {
|
|
|
2033
2033
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
2034
2034
|
};
|
|
2035
2035
|
}, [A]);
|
|
2036
|
-
let
|
|
2036
|
+
let H = (t, n) => {
|
|
2037
2037
|
let r = bt(e, t, n);
|
|
2038
2038
|
r !== -1 && (L.current[r]?.focus(), L.current[r]?.scrollIntoView({ block: "nearest" }));
|
|
2039
|
-
},
|
|
2039
|
+
}, U = (t) => {
|
|
2040
2040
|
if (t.disabled) return;
|
|
2041
2041
|
let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
|
|
2042
2042
|
i?.(n, e.filter((e) => n.includes(e.value))), w && (j(!1), F.current?.focus());
|
|
2043
|
-
},
|
|
2043
|
+
}, W = A ? /* @__PURE__ */ t("ul", {
|
|
2044
2044
|
ref: I,
|
|
2045
2045
|
id: k,
|
|
2046
2046
|
className: X.menu,
|
|
@@ -2079,19 +2079,19 @@ var H = {
|
|
|
2079
2079
|
i.variant === "action" ? X.actionOption : "",
|
|
2080
2080
|
o ? X.selected : ""
|
|
2081
2081
|
].filter(Boolean).join(" "),
|
|
2082
|
-
onClick: () =>
|
|
2082
|
+
onClick: () => U(i),
|
|
2083
2083
|
onKeyDown: (t) => {
|
|
2084
2084
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
2085
2085
|
t.preventDefault();
|
|
2086
2086
|
let e = t.key === "ArrowDown" ? 1 : -1;
|
|
2087
|
-
|
|
2087
|
+
H(a + e, e);
|
|
2088
2088
|
}
|
|
2089
2089
|
if (t.key === "Home" || t.key === "End") {
|
|
2090
2090
|
t.preventDefault();
|
|
2091
2091
|
let n = t.key === "Home" ? 1 : -1;
|
|
2092
|
-
|
|
2092
|
+
H(t.key === "Home" ? 0 : e.length - 1, n);
|
|
2093
2093
|
}
|
|
2094
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
2094
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), U(i)), t.key === "Tab" && j(!1);
|
|
2095
2095
|
},
|
|
2096
2096
|
children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t(J, {
|
|
2097
2097
|
name: "IconCheck",
|
|
@@ -2110,18 +2110,18 @@ var H = {
|
|
|
2110
2110
|
x
|
|
2111
2111
|
].filter(Boolean).join(" "),
|
|
2112
2112
|
children: [
|
|
2113
|
-
c && /* @__PURE__ */ t(
|
|
2114
|
-
htmlFor:
|
|
2113
|
+
c && /* @__PURE__ */ t(ne, {
|
|
2114
|
+
htmlFor: B ? void 0 : O,
|
|
2115
2115
|
required: y,
|
|
2116
2116
|
disabled: o,
|
|
2117
2117
|
children: c
|
|
2118
2118
|
}),
|
|
2119
2119
|
/* @__PURE__ */ t("div", {
|
|
2120
2120
|
className: X.container,
|
|
2121
|
-
children:
|
|
2121
|
+
children: B ? /* @__PURE__ */ t("div", {
|
|
2122
2122
|
id: O,
|
|
2123
2123
|
className: `${X.disabledText} ${X[v]}`,
|
|
2124
|
-
"aria-describedby":
|
|
2124
|
+
"aria-describedby": te,
|
|
2125
2125
|
children: R || a
|
|
2126
2126
|
}) : /* @__PURE__ */ n("button", {
|
|
2127
2127
|
ref: F,
|
|
@@ -2133,14 +2133,14 @@ var H = {
|
|
|
2133
2133
|
"aria-haspopup": "listbox",
|
|
2134
2134
|
"aria-expanded": A,
|
|
2135
2135
|
"aria-controls": k,
|
|
2136
|
-
"aria-describedby":
|
|
2136
|
+
"aria-describedby": te,
|
|
2137
2137
|
"aria-invalid": !!u,
|
|
2138
2138
|
onClick: () => j((e) => !e),
|
|
2139
2139
|
onKeyDown: (t) => {
|
|
2140
2140
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
2141
2141
|
t.preventDefault(), j(!0);
|
|
2142
2142
|
let n = t.key === "ArrowDown" ? 1 : -1;
|
|
2143
|
-
requestAnimationFrame(() =>
|
|
2143
|
+
requestAnimationFrame(() => H(t.key === "ArrowDown" ? 0 : e.length - 1, n));
|
|
2144
2144
|
}
|
|
2145
2145
|
},
|
|
2146
2146
|
children: [/* @__PURE__ */ t("span", {
|
|
@@ -2157,7 +2157,7 @@ var H = {
|
|
|
2157
2157
|
})]
|
|
2158
2158
|
})
|
|
2159
2159
|
}),
|
|
2160
|
-
A && _(
|
|
2160
|
+
A && _(W, document.body),
|
|
2161
2161
|
b && !u && /* @__PURE__ */ t("span", {
|
|
2162
2162
|
id: z,
|
|
2163
2163
|
className: X.message,
|
|
@@ -2208,81 +2208,339 @@ var H = {
|
|
|
2208
2208
|
})
|
|
2209
2209
|
]
|
|
2210
2210
|
});
|
|
2211
|
+
}, Pt = {
|
|
2212
|
+
root: "_root_ymidq_1",
|
|
2213
|
+
trigger: "_trigger_ymidq_15",
|
|
2214
|
+
heading: "_heading_ymidq_41",
|
|
2215
|
+
title: "_title_ymidq_51",
|
|
2216
|
+
subtitle: "_subtitle_ymidq_59",
|
|
2217
|
+
icon: "_icon_ymidq_69",
|
|
2218
|
+
open: "_open_ymidq_91",
|
|
2219
|
+
content: "_content_ymidq_99",
|
|
2220
|
+
contentInner: "_contentInner_ymidq_119"
|
|
2221
|
+
}, Ft = (e, t, n, r = 16) => {
|
|
2222
|
+
if (t > Math.max(0, n - r * 2)) {
|
|
2223
|
+
let t = e - r;
|
|
2224
|
+
return Math.abs(t) <= 1 ? {
|
|
2225
|
+
alignment: "none",
|
|
2226
|
+
delta: 0
|
|
2227
|
+
} : {
|
|
2228
|
+
alignment: "start",
|
|
2229
|
+
delta: t
|
|
2230
|
+
};
|
|
2231
|
+
}
|
|
2232
|
+
let i = e + t, a = n - r;
|
|
2233
|
+
return i > a ? {
|
|
2234
|
+
alignment: "end",
|
|
2235
|
+
delta: i - a
|
|
2236
|
+
} : e < r ? {
|
|
2237
|
+
alignment: "start",
|
|
2238
|
+
delta: e - r
|
|
2239
|
+
} : {
|
|
2240
|
+
alignment: "none",
|
|
2241
|
+
delta: 0
|
|
2242
|
+
};
|
|
2243
|
+
}, It = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, autoScrollOnOpen: c = !0, scrollOffset: l = 16, className: u = "" }) => {
|
|
2244
|
+
let p = f(), [m, _] = g(a), v = o ?? m, y = h(null), b = h(null), x = h(v);
|
|
2245
|
+
return d(() => {
|
|
2246
|
+
let e = x.current;
|
|
2247
|
+
if (x.current = v, !v || e || !c) return;
|
|
2248
|
+
let t = y.current, n = b.current;
|
|
2249
|
+
if (!t || !n || typeof window > "u") return;
|
|
2250
|
+
let r = !1, i = () => {
|
|
2251
|
+
if (r) return;
|
|
2252
|
+
r = !0;
|
|
2253
|
+
let e = t.getBoundingClientRect(), n = Ft(e.top, e.height, window.innerHeight, l);
|
|
2254
|
+
if (n.alignment === "none") return;
|
|
2255
|
+
let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
2256
|
+
window.scrollBy({
|
|
2257
|
+
top: n.delta,
|
|
2258
|
+
behavior: i ? "auto" : "smooth"
|
|
2259
|
+
});
|
|
2260
|
+
}, a = (e) => {
|
|
2261
|
+
e.target === n && e.propertyName === "grid-template-rows" && i();
|
|
2262
|
+
};
|
|
2263
|
+
n.addEventListener("transitionend", a);
|
|
2264
|
+
let o = window.setTimeout(i, 280);
|
|
2265
|
+
return () => {
|
|
2266
|
+
n.removeEventListener("transitionend", a), window.clearTimeout(o);
|
|
2267
|
+
};
|
|
2268
|
+
}, [
|
|
2269
|
+
c,
|
|
2270
|
+
v,
|
|
2271
|
+
l
|
|
2272
|
+
]), /* @__PURE__ */ n("section", {
|
|
2273
|
+
ref: y,
|
|
2274
|
+
className: `${Pt.root} ${v ? Pt.open : ""} ${u}`,
|
|
2275
|
+
children: [/* @__PURE__ */ n("button", {
|
|
2276
|
+
type: "button",
|
|
2277
|
+
className: Pt.trigger,
|
|
2278
|
+
"aria-expanded": v,
|
|
2279
|
+
"aria-controls": p,
|
|
2280
|
+
onClick: () => {
|
|
2281
|
+
let e = !v;
|
|
2282
|
+
o === void 0 && _(e), s?.(e);
|
|
2283
|
+
},
|
|
2284
|
+
children: [/* @__PURE__ */ n("span", {
|
|
2285
|
+
className: Pt.heading,
|
|
2286
|
+
children: [/* @__PURE__ */ t("span", {
|
|
2287
|
+
className: Pt.title,
|
|
2288
|
+
children: e
|
|
2289
|
+
}), r && /* @__PURE__ */ t("span", {
|
|
2290
|
+
className: Pt.subtitle,
|
|
2291
|
+
children: r
|
|
2292
|
+
})]
|
|
2293
|
+
}), /* @__PURE__ */ t("span", {
|
|
2294
|
+
className: Pt.icon,
|
|
2295
|
+
"aria-hidden": "true",
|
|
2296
|
+
children: /* @__PURE__ */ t(J, {
|
|
2297
|
+
name: "IconChevron",
|
|
2298
|
+
width: 20,
|
|
2299
|
+
height: 20
|
|
2300
|
+
})
|
|
2301
|
+
})]
|
|
2302
|
+
}), /* @__PURE__ */ t("div", {
|
|
2303
|
+
ref: b,
|
|
2304
|
+
id: p,
|
|
2305
|
+
className: Pt.content,
|
|
2306
|
+
"aria-hidden": !v,
|
|
2307
|
+
children: /* @__PURE__ */ t("div", {
|
|
2308
|
+
className: Pt.contentInner,
|
|
2309
|
+
children: i
|
|
2310
|
+
})
|
|
2311
|
+
})]
|
|
2312
|
+
});
|
|
2313
|
+
}, Lt = ({ children: e, containerId: t = "overlay-root" }) => {
|
|
2314
|
+
let [n, r] = g(null);
|
|
2315
|
+
return d(() => {
|
|
2316
|
+
let e = document.getElementById(t);
|
|
2317
|
+
if (e) {
|
|
2318
|
+
r(e);
|
|
2319
|
+
return;
|
|
2320
|
+
}
|
|
2321
|
+
let n = document.createElement("div");
|
|
2322
|
+
return n.id = t, document.body.appendChild(n), r(n), () => {
|
|
2323
|
+
n.childElementCount === 0 && n.parentElement && n.remove();
|
|
2324
|
+
};
|
|
2325
|
+
}, [t]), n ? _(e, n) : null;
|
|
2326
|
+
}, Rt = 8, zt = 16, Bt = 8, Vt = 8, Ht = 16, Ut = {
|
|
2327
|
+
top: "bottom",
|
|
2328
|
+
right: "left",
|
|
2329
|
+
bottom: "top",
|
|
2330
|
+
left: "right"
|
|
2331
|
+
}, Wt = (e, t, n, r) => e === "top" ? t.top >= n.height + Rt + zt : e === "bottom" ? r.height - t.bottom >= n.height + Rt + zt : e === "left" ? t.left >= n.width + Rt + zt : r.width - t.right >= n.width + Rt + zt, Gt = (e, t, n) => n && t ? {
|
|
2332
|
+
top: t.y - Vt,
|
|
2333
|
+
right: t.x + Bt,
|
|
2334
|
+
bottom: t.y + Ht,
|
|
2335
|
+
left: t.x - Bt,
|
|
2336
|
+
width: 16,
|
|
2337
|
+
height: 24
|
|
2338
|
+
} : e, Kt = (e, t, n, r) => {
|
|
2339
|
+
if (!(t.bottom > 0 && t.right > 0 && t.top < r.height && t.left < r.width)) return null;
|
|
2340
|
+
let i = Wt(e, t, n, r) ? e : Wt(Ut[e], t, n, r) ? Ut[e] : e, a = t.left + (t.width - n.width) / 2, o = t.top + (t.height - n.height) / 2;
|
|
2341
|
+
return i === "top" && (o = t.top - n.height - Rt), i === "bottom" && (o = t.bottom + Rt), i === "left" && (a = t.left - n.width - Rt), i === "right" && (a = t.right + Rt), a = Math.min(Math.max(a, zt), Math.max(zt, r.width - n.width - zt)), o = Math.min(Math.max(o, zt), Math.max(zt, r.height - n.height - zt)), {
|
|
2342
|
+
left: a,
|
|
2343
|
+
top: o,
|
|
2344
|
+
visibility: "visible"
|
|
2345
|
+
};
|
|
2346
|
+
}, qt = {
|
|
2347
|
+
root: "_root_1pa4z_1",
|
|
2348
|
+
tooltip: "_tooltip_1pa4z_11",
|
|
2349
|
+
"ds-tooltip-in": "_ds-tooltip-in_1pa4z_1"
|
|
2350
|
+
}, Jt = (e, t) => (n) => {
|
|
2351
|
+
e?.(n), n.defaultPrevented || t(n);
|
|
2352
|
+
}, Yt = (e, t) => {
|
|
2353
|
+
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
2354
|
+
}, Xt = ({ content: e, children: a, placement: o = "top", followCursor: s = !1, delay: u = 450, disabled: p = !1, maxWidth: m = 280, className: _ = "", asChild: v = !1 }) => {
|
|
2355
|
+
let y = f(), [b, x] = g(!1), [S, C] = g({ visibility: "hidden" }), [w, T] = g(null), E = h(null), D = h(null), O = h(null), k = h(() => void 0), A = l(() => {
|
|
2356
|
+
E.current && clearTimeout(E.current), E.current = null, x(!1);
|
|
2357
|
+
}, []), j = l(() => {
|
|
2358
|
+
if (!(p || !e)) {
|
|
2359
|
+
if (E.current && clearTimeout(E.current), u <= 0) {
|
|
2360
|
+
E.current = null, x(!0);
|
|
2361
|
+
return;
|
|
2362
|
+
}
|
|
2363
|
+
E.current = setTimeout(() => x(!0), u);
|
|
2364
|
+
}
|
|
2365
|
+
}, [
|
|
2366
|
+
e,
|
|
2367
|
+
u,
|
|
2368
|
+
p
|
|
2369
|
+
]);
|
|
2370
|
+
if (d(() => {
|
|
2371
|
+
if (!b) {
|
|
2372
|
+
C({ visibility: "hidden" });
|
|
2373
|
+
return;
|
|
2374
|
+
}
|
|
2375
|
+
let e = () => {
|
|
2376
|
+
let e = D.current;
|
|
2377
|
+
if (!e || !w) return;
|
|
2378
|
+
let t = Kt(o, Gt(e.getBoundingClientRect(), O.current, s), w.getBoundingClientRect(), {
|
|
2379
|
+
width: window.innerWidth,
|
|
2380
|
+
height: window.innerHeight
|
|
2381
|
+
});
|
|
2382
|
+
if (!t) {
|
|
2383
|
+
A();
|
|
2384
|
+
return;
|
|
2385
|
+
}
|
|
2386
|
+
C(t);
|
|
2387
|
+
};
|
|
2388
|
+
k.current = e, e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0);
|
|
2389
|
+
let t = typeof ResizeObserver > "u" ? null : new ResizeObserver(e);
|
|
2390
|
+
return D.current && t?.observe(D.current), w && t?.observe(w), () => {
|
|
2391
|
+
k.current = () => void 0, window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0), t?.disconnect();
|
|
2392
|
+
};
|
|
2393
|
+
}, [
|
|
2394
|
+
s,
|
|
2395
|
+
A,
|
|
2396
|
+
b,
|
|
2397
|
+
o,
|
|
2398
|
+
w
|
|
2399
|
+
]), d(() => {
|
|
2400
|
+
let e = (e) => {
|
|
2401
|
+
e.key === "Escape" && A();
|
|
2402
|
+
};
|
|
2403
|
+
return document.addEventListener("keydown", e), () => {
|
|
2404
|
+
document.removeEventListener("keydown", e), E.current && clearTimeout(E.current);
|
|
2405
|
+
};
|
|
2406
|
+
}, [A]), !c(a)) return a;
|
|
2407
|
+
let M = {
|
|
2408
|
+
...S,
|
|
2409
|
+
"--ds-tooltip-max-width": typeof m == "number" ? `${m}px` : m
|
|
2410
|
+
}, N = a.props, P = (e) => {
|
|
2411
|
+
s && (O.current = {
|
|
2412
|
+
x: e.clientX,
|
|
2413
|
+
y: e.clientY
|
|
2414
|
+
}), j();
|
|
2415
|
+
}, F = () => {
|
|
2416
|
+
O.current = null, A();
|
|
2417
|
+
}, I = () => {
|
|
2418
|
+
O.current = null, j();
|
|
2419
|
+
}, L = (e) => {
|
|
2420
|
+
s && (O.current = {
|
|
2421
|
+
x: e.clientX,
|
|
2422
|
+
y: e.clientY
|
|
2423
|
+
}, b && k.current());
|
|
2424
|
+
}, R = i(a, {
|
|
2425
|
+
"aria-describedby": b ? y : void 0,
|
|
2426
|
+
onMouseEnter: Jt(N.onMouseEnter, P),
|
|
2427
|
+
onMouseLeave: Jt(N.onMouseLeave, F),
|
|
2428
|
+
onFocus: Jt(N.onFocus, I),
|
|
2429
|
+
onBlur: Jt(N.onBlur, A),
|
|
2430
|
+
...v ? {
|
|
2431
|
+
ref: (e) => {
|
|
2432
|
+
D.current = e, Yt(N.ref, e);
|
|
2433
|
+
},
|
|
2434
|
+
onPointerDown: Jt(N.onPointerDown, b ? A : j),
|
|
2435
|
+
onPointerMove: Jt(N.onPointerMove, L)
|
|
2436
|
+
} : {}
|
|
2437
|
+
}), z = b && /* @__PURE__ */ t(Lt, { children: /* @__PURE__ */ t("span", {
|
|
2438
|
+
ref: T,
|
|
2439
|
+
id: y,
|
|
2440
|
+
role: "tooltip",
|
|
2441
|
+
className: qt.tooltip,
|
|
2442
|
+
style: M,
|
|
2443
|
+
children: e
|
|
2444
|
+
}) });
|
|
2445
|
+
return v ? /* @__PURE__ */ n(r, { children: [R, z] }) : /* @__PURE__ */ n("span", {
|
|
2446
|
+
ref: D,
|
|
2447
|
+
className: `${qt.root} ${_}`,
|
|
2448
|
+
onPointerDown: b ? A : j,
|
|
2449
|
+
onPointerMove: L,
|
|
2450
|
+
children: [R, z]
|
|
2451
|
+
});
|
|
2211
2452
|
}, Z = {
|
|
2212
|
-
root: "
|
|
2213
|
-
toolbar: "
|
|
2214
|
-
totalWidget: "
|
|
2215
|
-
totalLabel: "
|
|
2216
|
-
totalValue: "
|
|
2217
|
-
srOnly: "
|
|
2218
|
-
bulkActions: "
|
|
2219
|
-
filterBar: "
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2453
|
+
root: "_root_1g27f_1",
|
|
2454
|
+
toolbar: "_toolbar_1g27f_15",
|
|
2455
|
+
totalWidget: "_totalWidget_1g27f_31",
|
|
2456
|
+
totalLabel: "_totalLabel_1g27f_53",
|
|
2457
|
+
totalValue: "_totalValue_1g27f_63",
|
|
2458
|
+
srOnly: "_srOnly_1g27f_77",
|
|
2459
|
+
bulkActions: "_bulkActions_1g27f_101",
|
|
2460
|
+
filterBar: "_filterBar_1g27f_123",
|
|
2461
|
+
filterBarEmbedded: "_filterBarEmbedded_1g27f_141",
|
|
2462
|
+
filterAccordion: "_filterAccordion_1g27f_153",
|
|
2463
|
+
filterFields: "_filterFields_1g27f_161",
|
|
2464
|
+
filterActions: "_filterActions_1g27f_175",
|
|
2465
|
+
filterFooter: "_filterFooter_1g27f_187",
|
|
2466
|
+
pageSizePanel: "_pageSizePanel_1g27f_205",
|
|
2467
|
+
embedded: "_embedded_1g27f_205",
|
|
2468
|
+
pageSizeSeparator: "_pageSizeSeparator_1g27f_225",
|
|
2469
|
+
pendingChanges: "_pendingChanges_1g27f_247",
|
|
2470
|
+
tableWrap: "_tableWrap_1g27f_259",
|
|
2471
|
+
table: "_table_1g27f_259",
|
|
2472
|
+
compact: "_compact_1g27f_309",
|
|
2473
|
+
selectionColumn: "_selectionColumn_1g27f_347",
|
|
2474
|
+
expansionColumn: "_expansionColumn_1g27f_355",
|
|
2475
|
+
expansionCell: "_expansionCell_1g27f_357",
|
|
2476
|
+
expansionIcon: "_expansionIcon_1g27f_369",
|
|
2477
|
+
expansionIconOpen: "_expansionIconOpen_1g27f_379",
|
|
2478
|
+
detailRow: "_detailRow_1g27f_389",
|
|
2479
|
+
stickyColumn: "_stickyColumn_1g27f_399",
|
|
2480
|
+
selectionHeaderCell: "_selectionHeaderCell_1g27f_435",
|
|
2481
|
+
selectionCell: "_selectionCell_1g27f_437",
|
|
2482
|
+
selectionHeaderControls: "_selectionHeaderControls_1g27f_449",
|
|
2483
|
+
mobileSelectionControls: "_mobileSelectionControls_1g27f_451",
|
|
2484
|
+
cardSelectionControls: "_cardSelectionControls_1g27f_453",
|
|
2485
|
+
singleSelectionControl: "_singleSelectionControl_1g27f_467",
|
|
2486
|
+
selectedRow: "_selectedRow_1g27f_497",
|
|
2487
|
+
sticky: "_sticky_1g27f_399",
|
|
2488
|
+
sortButton: "_sortButton_1g27f_535",
|
|
2489
|
+
state: "_state_1g27f_573",
|
|
2490
|
+
cards: "_cards_1g27f_585",
|
|
2491
|
+
mobileSort: "_mobileSort_1g27f_585",
|
|
2492
|
+
card: "_card_1g27f_453",
|
|
2493
|
+
spanTwo: "_spanTwo_1g27f_673",
|
|
2494
|
+
selectedCard: "_selectedCard_1g27f_681",
|
|
2495
|
+
customCardShell: "_customCardShell_1g27f_715",
|
|
2496
|
+
clickableRow: "_clickableRow_1g27f_729",
|
|
2497
|
+
cardDetail: "_cardDetail_1g27f_747",
|
|
2498
|
+
pagination: "_pagination_1g27f_773",
|
|
2499
|
+
bottom: "_bottom_1g27f_821",
|
|
2500
|
+
pageSizeMain: "_pageSizeMain_1g27f_835",
|
|
2501
|
+
pageSizeOptions: "_pageSizeOptions_1g27f_837",
|
|
2502
|
+
pageSizeFieldset: "_pageSizeFieldset_1g27f_849",
|
|
2503
|
+
pageSizeOption: "_pageSizeOption_1g27f_837",
|
|
2504
|
+
pageSizeOptionActive: "_pageSizeOptionActive_1g27f_927",
|
|
2505
|
+
pageSizeWarning: "_pageSizeWarning_1g27f_941",
|
|
2506
|
+
paginationRange: "_paginationRange_1g27f_953",
|
|
2507
|
+
paginationControls: "_paginationControls_1g27f_965",
|
|
2508
|
+
pageNumbers: "_pageNumbers_1g27f_967",
|
|
2509
|
+
pageButton: "_pageButton_1g27f_979",
|
|
2510
|
+
ellipsis: "_ellipsis_1g27f_989",
|
|
2511
|
+
previousIcon: "_previousIcon_1g27f_1001",
|
|
2512
|
+
nextIcon: "_nextIcon_1g27f_1009",
|
|
2513
|
+
default: "_default_1g27f_1137",
|
|
2514
|
+
tableOnMobile: "_tableOnMobile_1g27f_1137",
|
|
2515
|
+
wide: "_wide_1g27f_1167"
|
|
2516
|
+
}, Zt = b({
|
|
2271
2517
|
rowSortingFeature: y,
|
|
2272
2518
|
sortedRowModel: v()
|
|
2273
|
-
}),
|
|
2519
|
+
}), Qt = [
|
|
2274
2520
|
10,
|
|
2275
2521
|
30,
|
|
2276
2522
|
50,
|
|
2277
2523
|
-1
|
|
2278
|
-
],
|
|
2279
|
-
function
|
|
2524
|
+
], $t = 30, en = 8;
|
|
2525
|
+
function tn(e, t) {
|
|
2280
2526
|
return t.includes(e) ? e : t.includes(30) ? 30 : t.find((e) => Number.isSafeInteger(e) && e > 0) ?? 30;
|
|
2281
2527
|
}
|
|
2282
|
-
function
|
|
2283
|
-
return e === void 0 || !Number.isFinite(e) || e <= 0 ?
|
|
2528
|
+
function nn(e) {
|
|
2529
|
+
return e === void 0 || !Number.isFinite(e) || e <= 0 ? $t : Math.max(1, Math.floor(e));
|
|
2284
2530
|
}
|
|
2285
|
-
var
|
|
2531
|
+
var rn = ({ config: e, row: n, children: r }) => {
|
|
2532
|
+
if (!e) return r;
|
|
2533
|
+
let i = e.content(n);
|
|
2534
|
+
return i ? /* @__PURE__ */ t(Xt, {
|
|
2535
|
+
asChild: !0,
|
|
2536
|
+
content: i,
|
|
2537
|
+
placement: e.placement ?? "bottom",
|
|
2538
|
+
followCursor: e.followCursor ?? !0,
|
|
2539
|
+
delay: e.delay ?? 0,
|
|
2540
|
+
maxWidth: e.maxWidth,
|
|
2541
|
+
children: r
|
|
2542
|
+
}) : r;
|
|
2543
|
+
}, an = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
2286
2544
|
let o = e.type === "multi-select" ? e.options : void 0, [s, c] = g(Array.isArray(o) ? o : []), [l, u] = g(!1);
|
|
2287
2545
|
return d(() => {
|
|
2288
2546
|
if (o === void 0) return;
|
|
@@ -2325,20 +2583,20 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2325
2583
|
error: a,
|
|
2326
2584
|
onChange: (e) => r(e)
|
|
2327
2585
|
});
|
|
2328
|
-
},
|
|
2586
|
+
}, on = (e, t, n) => {
|
|
2329
2587
|
let r = new Set(e);
|
|
2330
2588
|
return t.forEach((e) => {
|
|
2331
2589
|
n ? r.add(e) : r.delete(e);
|
|
2332
2590
|
}), Array.from(r);
|
|
2333
|
-
},
|
|
2591
|
+
}, sn = (e) => {
|
|
2334
2592
|
if (!(!e || e.width === void 0 && e.minWidth === void 0 && e.maxWidth === void 0)) return {
|
|
2335
2593
|
width: e.width,
|
|
2336
2594
|
minWidth: e.minWidth,
|
|
2337
2595
|
maxWidth: e.maxWidth
|
|
2338
2596
|
};
|
|
2339
|
-
},
|
|
2597
|
+
}, cn = (e) => {
|
|
2340
2598
|
if (e?.sticky) return e.sticky === "start" ? { insetInlineStart: e.stickyOffset ?? 0 } : { insetInlineEnd: e.stickyOffset ?? 0 };
|
|
2341
|
-
},
|
|
2599
|
+
}, ln = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
|
|
2342
2600
|
0,
|
|
2343
2601
|
1,
|
|
2344
2602
|
2,
|
|
@@ -2362,7 +2620,7 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2362
2620
|
e + 1,
|
|
2363
2621
|
"ellipsis-end",
|
|
2364
2622
|
t - 1
|
|
2365
|
-
],
|
|
2623
|
+
], un = (e, t) => {
|
|
2366
2624
|
let n = /* @__PURE__ */ new Set();
|
|
2367
2625
|
for (let t of e) {
|
|
2368
2626
|
if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
|
|
@@ -2374,36 +2632,36 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2374
2632
|
for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
|
|
2375
2633
|
}
|
|
2376
2634
|
return null;
|
|
2377
|
-
},
|
|
2635
|
+
}, dn = (e, t) => typeof e == "function" ? e(t) : t[e], fn = (e) => {
|
|
2378
2636
|
if (e == null || e === "") return null;
|
|
2379
2637
|
let t = Date.parse(String(e));
|
|
2380
2638
|
return Number.isNaN(t) ? null : t;
|
|
2381
|
-
},
|
|
2382
|
-
let r =
|
|
2639
|
+
}, pn = (e, t, n) => {
|
|
2640
|
+
let r = fn(e.getValue(n)), i = fn(t.getValue(n));
|
|
2383
2641
|
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
2384
|
-
},
|
|
2642
|
+
}, mn = (e, t, n) => {
|
|
2385
2643
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2386
2644
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
2387
|
-
},
|
|
2645
|
+
}, hn = (e, t, n) => {
|
|
2388
2646
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2389
2647
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
2390
|
-
},
|
|
2648
|
+
}, gn = (e, t, n) => {
|
|
2391
2649
|
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
2392
2650
|
return r.localeCompare(i, void 0, {
|
|
2393
2651
|
numeric: !0,
|
|
2394
2652
|
sensitivity: "base"
|
|
2395
2653
|
});
|
|
2396
|
-
},
|
|
2654
|
+
}, _n = (e) => {
|
|
2397
2655
|
switch (e) {
|
|
2398
|
-
case "date": return
|
|
2399
|
-
case "number": return
|
|
2400
|
-
case "boolean": return
|
|
2656
|
+
case "date": return pn;
|
|
2657
|
+
case "number": return mn;
|
|
2658
|
+
case "boolean": return hn;
|
|
2401
2659
|
case "text":
|
|
2402
|
-
case void 0: return
|
|
2660
|
+
case void 0: return gn;
|
|
2403
2661
|
case "custom": return;
|
|
2404
2662
|
}
|
|
2405
|
-
},
|
|
2406
|
-
let t = (t) =>
|
|
2663
|
+
}, vn = (e) => {
|
|
2664
|
+
let t = (t) => dn(e.accessor, t), n = e.sortFn ?? _n(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
|
|
2407
2665
|
id: e.id,
|
|
2408
2666
|
accessorFn: t,
|
|
2409
2667
|
header: () => e.header,
|
|
@@ -2415,58 +2673,58 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2415
2673
|
sortDescFirst: e.sortDescFirst
|
|
2416
2674
|
};
|
|
2417
2675
|
return n !== void 0 && (i.sortFn = n), i;
|
|
2418
|
-
},
|
|
2419
|
-
let [
|
|
2420
|
-
if (
|
|
2421
|
-
let e = new Set(
|
|
2676
|
+
}, yn = ({ columns: i, data: a, virtualizationThreshold: o = $t, tableOnMobile: s = !1, mobileView: c, breakpoint: l = "default", sorting: u, onSortingChange: f, renderMobileCard: p, getRowId: _, getRowClassName: v, getRowStyle: y, toolbarContent: b, totalCountVariant: S = "default", totalCountLabel: C = "Всего", caption: w, ariaLabel: T, loading: E = !1, error: D, emptyState: O = "Нет данных", stickyHeader: k = !1, maxHeight: A, className: j = "", onRowClick: M, selectable: N = !1, selectedRowIds: P, onSelectedRowIdsChange: F, onRowDoubleClick: I, getRowSelectionLabel: L, selectAllRowsLabel: R = "Выбрать все строки на этой странице", resetSelectionLabel: z = "Сбросить выбор", showResetSelectionControl: ee = !0, openRowLabel: te = "Открыть строку", rowTooltip: V, pagination: ne = !1, paginationMode: H = "client", page: U = 1, pageSize: W = 30, onPageSizeChange: re, pageSizeOptions: ie = Qt, pageSizeDraft: ae, onPageSizeDraftChange: oe, pageSizeApplyMode: se = "table", totalCount: ce, onPageChange: G, visibleColumnIds: le, density: ue = "comfortable", renderBulkActions: de, renderExpandedRow: fe, expandedRowIds: pe, onExpandedRowIdsChange: me, getRowExpansionLabel: he, resultsAnnouncement: ge, filterBar: K }) => {
|
|
2677
|
+
let [_e, ve] = g([]), [ye, be] = g([]), [xe, Se] = g([]), [Ce, we] = g(0), [Te, Ee] = g(() => tn(W, ie)), De = nn(o), Oe = u ?? _e, ke = Oe.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), Ae = W === -1, je = Ae ? Math.max(1, (H === "server" ? Number(ce) : a.length) || a.length || 1) : Number.isFinite(W) && W > 0 ? Math.floor(W) : 30, Me = ne && H === "server", Ne = m(() => {
|
|
2678
|
+
if (le === void 0) return i;
|
|
2679
|
+
let e = new Set(le);
|
|
2422
2680
|
return i.filter((t) => e.has(t.id));
|
|
2423
|
-
}, [i,
|
|
2424
|
-
features:
|
|
2425
|
-
columns:
|
|
2681
|
+
}, [i, le]), Pe = m(() => Ne.length === 0 ? "Должна быть видима хотя бы одна колонка" : un(Ne, a), [a, Ne]), Fe = m(() => Ne.map(vn), [Ne]), Ie = Ne.some((e) => sn(e) !== void 0), Le = x({
|
|
2682
|
+
features: Zt,
|
|
2683
|
+
columns: Fe,
|
|
2426
2684
|
data: a,
|
|
2427
|
-
state: { sorting:
|
|
2685
|
+
state: { sorting: Oe },
|
|
2428
2686
|
onSortingChange: (e) => {
|
|
2429
|
-
let t = typeof e == "function" ? e(
|
|
2430
|
-
u === void 0 &&
|
|
2687
|
+
let t = typeof e == "function" ? e(Oe) : e;
|
|
2688
|
+
u === void 0 && ve(t), we(0), f?.(t);
|
|
2431
2689
|
},
|
|
2432
2690
|
getRowId: _
|
|
2433
|
-
}),
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
]),
|
|
2691
|
+
}), Re = Le.getRowModel().rows, ze = Me && Number.isFinite(ce) && Number(ce) >= 0 ? Math.floor(Number(ce)) : Re.length, Be = ne ? Math.max(1, Math.ceil(ze / je)) : 1, Ve = Number.isFinite(U) && U > 0 ? Math.floor(U) - 1 : 0, q = Math.min(Me ? Ve : Ce, Be - 1), He = m(() => ne && !Me ? Re.slice(q * je, (q + 1) * je) : Re, [
|
|
2692
|
+
Me,
|
|
2693
|
+
je,
|
|
2694
|
+
ne,
|
|
2695
|
+
q,
|
|
2696
|
+
Re
|
|
2697
|
+
]), Ue = He.length > De, We = m(() => ({
|
|
2440
2698
|
data: a,
|
|
2441
|
-
sortingKey:
|
|
2442
|
-
safePageIndex:
|
|
2443
|
-
normalizedPageSize:
|
|
2444
|
-
pagination:
|
|
2445
|
-
isServerPagination:
|
|
2446
|
-
normalizedVirtualizationThreshold:
|
|
2699
|
+
sortingKey: ke,
|
|
2700
|
+
safePageIndex: q,
|
|
2701
|
+
normalizedPageSize: je,
|
|
2702
|
+
pagination: ne,
|
|
2703
|
+
isServerPagination: Me,
|
|
2704
|
+
normalizedVirtualizationThreshold: De
|
|
2447
2705
|
}), [
|
|
2448
2706
|
a,
|
|
2449
|
-
De,
|
|
2450
|
-
Be,
|
|
2451
2707
|
ke,
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2708
|
+
q,
|
|
2709
|
+
je,
|
|
2710
|
+
ne,
|
|
2711
|
+
Me,
|
|
2712
|
+
De
|
|
2713
|
+
]), [Y, Ke] = g({
|
|
2714
|
+
context: We,
|
|
2715
|
+
count: De
|
|
2716
|
+
}), qe = Y.context === We ? Y.count : De;
|
|
2717
|
+
Y.context !== We && Ke({
|
|
2718
|
+
context: We,
|
|
2719
|
+
count: De
|
|
2462
2720
|
});
|
|
2463
|
-
let
|
|
2721
|
+
let Je = m(() => He.slice(0, qe), [He, qe]), Ye = Ue && qe < He.length, Xe = Ye ? Math.max(0, Je.length - en) : -1, Ze = h(/* @__PURE__ */ new Map()), Qe = h(/* @__PURE__ */ new Map());
|
|
2464
2722
|
d(() => {
|
|
2465
|
-
if (!
|
|
2466
|
-
let e = [...
|
|
2467
|
-
!t || !e.some((e) => e.isIntersecting) || (t = !1, n.disconnect(),
|
|
2468
|
-
context:
|
|
2469
|
-
count: Math.min(e.count +
|
|
2723
|
+
if (!Ye || E || Pe || D) return;
|
|
2724
|
+
let e = [...Ze.current.values(), ...Qe.current.values()], t = !0, n = new IntersectionObserver((e) => {
|
|
2725
|
+
!t || !e.some((e) => e.isIntersecting) || (t = !1, n.disconnect(), Ke((e) => e.context === We ? {
|
|
2726
|
+
context: We,
|
|
2727
|
+
count: Math.min(e.count + De, He.length)
|
|
2470
2728
|
} : e));
|
|
2471
2729
|
}, {
|
|
2472
2730
|
root: null,
|
|
@@ -2478,31 +2736,32 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2478
2736
|
t = !1, n.disconnect();
|
|
2479
2737
|
};
|
|
2480
2738
|
}, [
|
|
2481
|
-
|
|
2482
|
-
Y,
|
|
2483
|
-
Te,
|
|
2484
|
-
Ve.length,
|
|
2739
|
+
We,
|
|
2485
2740
|
qe,
|
|
2741
|
+
De,
|
|
2742
|
+
He.length,
|
|
2743
|
+
Ye,
|
|
2486
2744
|
E,
|
|
2487
|
-
|
|
2745
|
+
Pe,
|
|
2488
2746
|
D,
|
|
2489
2747
|
c,
|
|
2490
2748
|
s,
|
|
2491
2749
|
p
|
|
2492
2750
|
]);
|
|
2493
|
-
let
|
|
2751
|
+
let $e = P ?? ye, et = m(() => new Set($e), [$e]), tt = pe ?? xe, nt = m(() => new Set(tt), [tt]), rt = m(() => He.map((e) => e.id), [He]), it = rt.filter((e) => et.has(e)).length, at = rt.length > 0 && it === rt.length, ot = it > 0 && !at, st = m(() => Ne.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
2494
2752
|
id: e.id,
|
|
2495
2753
|
label: typeof e.header == "string" ? e.header : e.id
|
|
2496
|
-
})), [
|
|
2754
|
+
})), [Ne]), ct = m(() => ln(q, Be), [Be, q]), lt = c === void 0 ? s : c === "table", ut = [
|
|
2497
2755
|
Z.root,
|
|
2498
2756
|
l === "wide" ? Z.wide : Z.default,
|
|
2499
|
-
|
|
2500
|
-
|
|
2757
|
+
lt ? Z.tableOnMobile : "",
|
|
2758
|
+
ue === "compact" ? Z.compact : "",
|
|
2759
|
+
N && !ee ? Z.singleSelectionControl : "",
|
|
2501
2760
|
j
|
|
2502
|
-
].filter(Boolean).join(" "),
|
|
2503
|
-
|
|
2504
|
-
},
|
|
2505
|
-
let
|
|
2761
|
+
].filter(Boolean).join(" "), dt = Pe ?? D, ft = ne && !Ae && !dt && ze > je && (!E || Me), pt = ne && !!(re || oe || K), mt = ae ?? Te, ht = K ? (typeof K.validation == "function" ? K.validation(K.draftValues) : K.validation) ?? {} : {}, X = K ? JSON.stringify(K.draftValues) !== JSON.stringify(K.appliedValues) || mt !== W : !1, _t = Object.values(ht).some(Boolean), vt = ze === 0 ? 0 : q * je + 1, yt = Math.min((q + 1) * je, ze), bt = () => {
|
|
2762
|
+
mt !== W && (we(0), G?.(1), re?.(mt));
|
|
2763
|
+
}, xt = (e, r = !1, i = !1) => {
|
|
2764
|
+
let a = mt !== W, o = `ds-data-table-page-size-warning-${e}`;
|
|
2506
2765
|
return /* @__PURE__ */ n("div", {
|
|
2507
2766
|
className: `${Z.pageSizePanel} ${Z[e]} ${r ? Z.embedded : ""}`,
|
|
2508
2767
|
children: [
|
|
@@ -2513,189 +2772,202 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2513
2772
|
disabled: E || K?.applying,
|
|
2514
2773
|
children: [/* @__PURE__ */ t("legend", { children: "На странице" }), /* @__PURE__ */ t("div", {
|
|
2515
2774
|
className: Z.pageSizeOptions,
|
|
2516
|
-
children:
|
|
2775
|
+
children: ie.map((e) => /* @__PURE__ */ t("button", {
|
|
2517
2776
|
type: "button",
|
|
2518
|
-
className: `${Z.pageSizeOption} ${
|
|
2519
|
-
"aria-pressed":
|
|
2777
|
+
className: `${Z.pageSizeOption} ${mt === e ? Z.pageSizeOptionActive : ""}`,
|
|
2778
|
+
"aria-pressed": mt === e,
|
|
2520
2779
|
onClick: () => {
|
|
2521
|
-
|
|
2780
|
+
ae === void 0 && Ee(e), oe?.(e);
|
|
2522
2781
|
},
|
|
2523
2782
|
children: e === -1 ? "Все" : e
|
|
2524
2783
|
}, e))
|
|
2525
2784
|
})]
|
|
2526
|
-
}),
|
|
2785
|
+
}), se === "table" && !K && /* @__PURE__ */ t(B, {
|
|
2527
2786
|
size: "sm",
|
|
2528
|
-
disabled: E || !
|
|
2529
|
-
"aria-describedby":
|
|
2530
|
-
onClick:
|
|
2787
|
+
disabled: E || !a,
|
|
2788
|
+
"aria-describedby": mt === -1 && a && e === "top" ? o : void 0,
|
|
2789
|
+
onClick: bt,
|
|
2531
2790
|
children: "Применить"
|
|
2532
2791
|
})]
|
|
2533
2792
|
}),
|
|
2793
|
+
i && /* @__PURE__ */ t("span", {
|
|
2794
|
+
className: Z.pageSizeSeparator,
|
|
2795
|
+
"aria-hidden": "true",
|
|
2796
|
+
children: "|"
|
|
2797
|
+
}),
|
|
2534
2798
|
/* @__PURE__ */ n("span", {
|
|
2535
2799
|
className: Z.paginationRange,
|
|
2536
2800
|
children: [
|
|
2537
2801
|
"Показано ",
|
|
2538
|
-
|
|
2802
|
+
vt,
|
|
2539
2803
|
"–",
|
|
2540
|
-
|
|
2804
|
+
yt,
|
|
2541
2805
|
" из",
|
|
2542
2806
|
" ",
|
|
2543
|
-
|
|
2807
|
+
ze
|
|
2544
2808
|
]
|
|
2545
2809
|
}),
|
|
2546
|
-
|
|
2810
|
+
X && e === "top" && /* @__PURE__ */ t("span", {
|
|
2547
2811
|
className: Z.pendingChanges,
|
|
2548
2812
|
role: "status",
|
|
2549
2813
|
children: "Есть неприменённые изменения"
|
|
2550
2814
|
}),
|
|
2551
|
-
|
|
2552
|
-
id:
|
|
2815
|
+
Me && mt === -1 && a && /* @__PURE__ */ n("span", {
|
|
2816
|
+
id: o,
|
|
2553
2817
|
className: Z.pageSizeWarning,
|
|
2554
2818
|
"aria-hidden": e === "bottom" || void 0,
|
|
2555
2819
|
children: [
|
|
2556
2820
|
"Будут загружены все",
|
|
2557
2821
|
" ",
|
|
2558
|
-
|
|
2822
|
+
ze,
|
|
2559
2823
|
" ",
|
|
2560
2824
|
"записей"
|
|
2561
2825
|
]
|
|
2562
2826
|
})
|
|
2563
2827
|
]
|
|
2564
2828
|
});
|
|
2565
|
-
},
|
|
2566
|
-
let t = Math.max(0, Math.min(
|
|
2567
|
-
if (
|
|
2568
|
-
t !==
|
|
2829
|
+
}, St = (e) => {
|
|
2830
|
+
let t = Math.max(0, Math.min(Be - 1, e));
|
|
2831
|
+
if (Me) {
|
|
2832
|
+
t !== q && G?.(t + 1);
|
|
2569
2833
|
return;
|
|
2570
2834
|
}
|
|
2571
|
-
|
|
2572
|
-
},
|
|
2835
|
+
we(t);
|
|
2836
|
+
}, Ct = (e) => {
|
|
2573
2837
|
let t = Array.from(e);
|
|
2574
|
-
P === void 0 &&
|
|
2575
|
-
},
|
|
2576
|
-
let t = new Set(Qe);
|
|
2577
|
-
t.has(e) ? t.delete(e) : t.add(e), xt(t);
|
|
2578
|
-
}, Ct = () => {
|
|
2579
|
-
let e = Vt(Qe, tt, !rt);
|
|
2580
|
-
P === void 0 && ve(e), F?.(e);
|
|
2581
|
-
}, Tt = () => xt(/* @__PURE__ */ new Set()), Et = (e) => {
|
|
2838
|
+
P === void 0 && be(t), F?.(t);
|
|
2839
|
+
}, Tt = (e) => {
|
|
2582
2840
|
let t = new Set(et);
|
|
2841
|
+
t.has(e) ? t.delete(e) : t.add(e), Ct(t);
|
|
2842
|
+
}, Et = () => {
|
|
2843
|
+
let e = on(et, rt, !at);
|
|
2844
|
+
P === void 0 && be(e), F?.(e);
|
|
2845
|
+
}, Dt = () => Ct(/* @__PURE__ */ new Set()), Ot = (e) => {
|
|
2846
|
+
let t = new Set(nt);
|
|
2583
2847
|
t.has(e) ? t.delete(e) : t.add(e);
|
|
2584
2848
|
let n = Array.from(t);
|
|
2585
|
-
|
|
2586
|
-
},
|
|
2587
|
-
visibleCount:
|
|
2588
|
-
totalCount:
|
|
2589
|
-
selectedCount:
|
|
2590
|
-
}) ?? `Показано строк: ${
|
|
2591
|
-
|
|
2592
|
-
|
|
2849
|
+
pe === void 0 && Se(n), me?.(n);
|
|
2850
|
+
}, kt = a.filter((e, t) => et.has(_?.(e, t) ?? String(t))), At = ge?.({
|
|
2851
|
+
visibleCount: He.length,
|
|
2852
|
+
totalCount: ze,
|
|
2853
|
+
selectedCount: et.size
|
|
2854
|
+
}) ?? `Показано строк: ${He.length} из ${ze}. Выбрано: ${et.size}.`;
|
|
2855
|
+
d(() => {
|
|
2856
|
+
Me || we(0);
|
|
2593
2857
|
}, [
|
|
2594
2858
|
a,
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2859
|
+
Me,
|
|
2860
|
+
je,
|
|
2861
|
+
ne,
|
|
2862
|
+
ke
|
|
2599
2863
|
]), d(() => {
|
|
2600
|
-
!
|
|
2864
|
+
!Me && Ce >= Be && we(Be - 1);
|
|
2601
2865
|
}, [
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2866
|
+
Me,
|
|
2867
|
+
Be,
|
|
2868
|
+
Ce
|
|
2605
2869
|
]), d(() => {
|
|
2606
|
-
|
|
2607
|
-
}, [
|
|
2608
|
-
|
|
2870
|
+
Ee(tn(W, ie));
|
|
2871
|
+
}, [W, ie]);
|
|
2872
|
+
let jt = K && pt ? xt("top", !0, K.footerLayout === "inline") : null, Mt = K ? /* @__PURE__ */ n("div", {
|
|
2873
|
+
className: Z.filterActions,
|
|
2874
|
+
children: [/* @__PURE__ */ t(B, {
|
|
2875
|
+
variant: "empty",
|
|
2876
|
+
disabled: K.applying || E,
|
|
2877
|
+
onClick: () => {
|
|
2878
|
+
let e = K.resetValues ?? K.appliedValues;
|
|
2879
|
+
K.onDraftValuesChange(e);
|
|
2880
|
+
let t = K.resetPageSize ?? ie[0] ?? 30;
|
|
2881
|
+
ae === void 0 && Ee(t), oe?.(t), K.onReset?.({
|
|
2882
|
+
filters: e,
|
|
2883
|
+
pageSize: t
|
|
2884
|
+
});
|
|
2885
|
+
},
|
|
2886
|
+
children: K.resetLabel ?? "Сбросить"
|
|
2887
|
+
}), /* @__PURE__ */ t(B, {
|
|
2888
|
+
type: "submit",
|
|
2889
|
+
isLoading: K.applying,
|
|
2890
|
+
disabled: !X || _t || E,
|
|
2891
|
+
children: K.applyLabel ?? "Применить"
|
|
2892
|
+
})]
|
|
2893
|
+
}) : null, Nt = K ? /* @__PURE__ */ n("form", {
|
|
2894
|
+
className: `${Z.filterBar} ${K.collapsible ? Z.filterBarEmbedded : ""}`,
|
|
2895
|
+
role: "search",
|
|
2896
|
+
"aria-label": "Фильтры таблицы",
|
|
2897
|
+
onSubmit: (e) => {
|
|
2898
|
+
e.preventDefault(), !(!X || _t || K.applying || E) && (we(0), G?.(1), K.onApply({
|
|
2899
|
+
filters: K.draftValues,
|
|
2900
|
+
pageSize: mt
|
|
2901
|
+
}));
|
|
2902
|
+
},
|
|
2903
|
+
children: [/* @__PURE__ */ t("div", {
|
|
2904
|
+
className: Z.filterFields,
|
|
2905
|
+
children: K.fields.map((e) => /* @__PURE__ */ t(an, {
|
|
2906
|
+
field: e,
|
|
2907
|
+
value: K.draftValues[e.key],
|
|
2908
|
+
disabled: !!(e.disabled || K.applying || E),
|
|
2909
|
+
error: ht[e.key],
|
|
2910
|
+
setValue: (t) => K.onDraftValuesChange({
|
|
2911
|
+
...K.draftValues,
|
|
2912
|
+
[e.key]: t
|
|
2913
|
+
})
|
|
2914
|
+
}, e.key))
|
|
2915
|
+
}), K.footerLayout === "inline" ? /* @__PURE__ */ n("div", {
|
|
2916
|
+
className: Z.filterFooter,
|
|
2917
|
+
children: [jt, Mt]
|
|
2918
|
+
}) : /* @__PURE__ */ n(e, { children: [jt, Mt] })]
|
|
2919
|
+
}) : null, Pt = K?.collapsible ? /* @__PURE__ */ t(It, {
|
|
2920
|
+
title: K.collapsible.title ?? "Фильтры",
|
|
2921
|
+
defaultOpen: K.collapsible.defaultOpen,
|
|
2922
|
+
autoScrollOnOpen: K.collapsible.autoScrollOnOpen,
|
|
2923
|
+
scrollOffset: K.collapsible.scrollOffset,
|
|
2924
|
+
className: Z.filterAccordion,
|
|
2925
|
+
children: Nt
|
|
2926
|
+
}) : Nt;
|
|
2927
|
+
return /* @__PURE__ */ n("section", {
|
|
2928
|
+
className: ut,
|
|
2609
2929
|
"aria-busy": E,
|
|
2610
2930
|
children: [
|
|
2611
2931
|
/* @__PURE__ */ t("div", {
|
|
2612
2932
|
className: Z.srOnly,
|
|
2613
2933
|
"aria-live": "polite",
|
|
2614
2934
|
"aria-atomic": "true",
|
|
2615
|
-
children:
|
|
2935
|
+
children: At
|
|
2616
2936
|
}),
|
|
2617
|
-
|
|
2937
|
+
de && et.size > 0 && /* @__PURE__ */ t("div", {
|
|
2618
2938
|
className: Z.bulkActions,
|
|
2619
2939
|
role: "region",
|
|
2620
2940
|
"aria-label": "Действия с выбранными строками",
|
|
2621
|
-
children:
|
|
2622
|
-
selectedRowIds: Array.from(
|
|
2623
|
-
selectedRows:
|
|
2624
|
-
clearSelection:
|
|
2941
|
+
children: de({
|
|
2942
|
+
selectedRowIds: Array.from(et),
|
|
2943
|
+
selectedRows: kt,
|
|
2944
|
+
clearSelection: Dt
|
|
2625
2945
|
})
|
|
2626
2946
|
}),
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
role: "search",
|
|
2630
|
-
"aria-label": "Фильтры таблицы",
|
|
2631
|
-
onSubmit: (e) => {
|
|
2632
|
-
e.preventDefault(), !(!mt || ht || K.applying || E) && (Se(0), se?.(1), K.onApply({
|
|
2633
|
-
filters: K.draftValues,
|
|
2634
|
-
pageSize: ft
|
|
2635
|
-
}));
|
|
2636
|
-
},
|
|
2637
|
-
children: [
|
|
2638
|
-
/* @__PURE__ */ t("div", {
|
|
2639
|
-
className: Z.filterFields,
|
|
2640
|
-
children: K.fields.map((e) => /* @__PURE__ */ t(Bt, {
|
|
2641
|
-
field: e,
|
|
2642
|
-
value: K.draftValues[e.key],
|
|
2643
|
-
disabled: !!(e.disabled || K.applying || E),
|
|
2644
|
-
error: pt[e.key],
|
|
2645
|
-
setValue: (t) => K.onDraftValuesChange({
|
|
2646
|
-
...K.draftValues,
|
|
2647
|
-
[e.key]: t
|
|
2648
|
-
})
|
|
2649
|
-
}, e.key))
|
|
2650
|
-
}),
|
|
2651
|
-
dt && yt("top", !0),
|
|
2652
|
-
/* @__PURE__ */ n("div", {
|
|
2653
|
-
className: Z.filterActions,
|
|
2654
|
-
children: [/* @__PURE__ */ t(V, {
|
|
2655
|
-
variant: "empty",
|
|
2656
|
-
disabled: K.applying || E,
|
|
2657
|
-
onClick: () => {
|
|
2658
|
-
let e = K.resetValues ?? K.appliedValues;
|
|
2659
|
-
K.onDraftValuesChange(e);
|
|
2660
|
-
let t = K.resetPageSize ?? ne[0] ?? 30;
|
|
2661
|
-
re === void 0 && we(t), ie?.(t), K.onReset?.({
|
|
2662
|
-
filters: e,
|
|
2663
|
-
pageSize: t
|
|
2664
|
-
});
|
|
2665
|
-
},
|
|
2666
|
-
children: K.resetLabel ?? "Сбросить"
|
|
2667
|
-
}), /* @__PURE__ */ t(V, {
|
|
2668
|
-
type: "submit",
|
|
2669
|
-
isLoading: K.applying,
|
|
2670
|
-
disabled: !mt || ht || E,
|
|
2671
|
-
children: K.applyLabel ?? "Применить"
|
|
2672
|
-
})]
|
|
2673
|
-
})
|
|
2674
|
-
]
|
|
2675
|
-
}),
|
|
2676
|
-
dt && !K && yt("top"),
|
|
2947
|
+
Pt,
|
|
2948
|
+
pt && !K && xt("top"),
|
|
2677
2949
|
(S === "highlighted" || b != null) && /* @__PURE__ */ n("div", {
|
|
2678
2950
|
className: Z.toolbar,
|
|
2679
2951
|
children: [S === "highlighted" && /* @__PURE__ */ n("div", {
|
|
2680
2952
|
className: Z.totalWidget,
|
|
2681
|
-
"aria-label": `${C}: ${
|
|
2953
|
+
"aria-label": `${C}: ${ze}`,
|
|
2682
2954
|
children: [/* @__PURE__ */ t("span", {
|
|
2683
2955
|
className: Z.totalLabel,
|
|
2684
2956
|
children: C
|
|
2685
2957
|
}), /* @__PURE__ */ t("strong", {
|
|
2686
2958
|
className: Z.totalValue,
|
|
2687
|
-
children:
|
|
2959
|
+
children: ze
|
|
2688
2960
|
})]
|
|
2689
2961
|
}), b]
|
|
2690
2962
|
}),
|
|
2691
|
-
!
|
|
2963
|
+
!lt && !E && !dt && He.length > 0 && st.length > 0 && /* @__PURE__ */ t(wt, {
|
|
2692
2964
|
className: Z.mobileSort,
|
|
2693
|
-
options:
|
|
2694
|
-
value:
|
|
2695
|
-
id:
|
|
2696
|
-
direction:
|
|
2965
|
+
options: st,
|
|
2966
|
+
value: Oe[0] ? {
|
|
2967
|
+
id: Oe[0].id,
|
|
2968
|
+
direction: Oe[0].desc ? "desc" : "asc"
|
|
2697
2969
|
} : null,
|
|
2698
|
-
onChange: (e) =>
|
|
2970
|
+
onChange: (e) => Le.setSorting([{
|
|
2699
2971
|
id: e.id,
|
|
2700
2972
|
desc: e.direction === "desc"
|
|
2701
2973
|
}])
|
|
@@ -2708,15 +2980,15 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2708
2980
|
"aria-label": T,
|
|
2709
2981
|
children: [
|
|
2710
2982
|
w && /* @__PURE__ */ t("caption", { children: w }),
|
|
2711
|
-
(
|
|
2712
|
-
|
|
2983
|
+
(Ie || N || !!fe) && /* @__PURE__ */ n("colgroup", { children: [
|
|
2984
|
+
fe && /* @__PURE__ */ t("col", { className: Z.expansionColumn }),
|
|
2713
2985
|
N && /* @__PURE__ */ t("col", { className: Z.selectionColumn }),
|
|
2714
|
-
|
|
2986
|
+
Ne.map((e) => /* @__PURE__ */ t("col", { style: sn(e) }, e.id))
|
|
2715
2987
|
] }),
|
|
2716
2988
|
/* @__PURE__ */ t("thead", {
|
|
2717
2989
|
className: k ? Z.sticky : "",
|
|
2718
|
-
children:
|
|
2719
|
-
|
|
2990
|
+
children: Le.getHeaderGroups().map((e) => /* @__PURE__ */ n("tr", { children: [
|
|
2991
|
+
fe && /* @__PURE__ */ t("th", {
|
|
2720
2992
|
className: Z.expansionCell,
|
|
2721
2993
|
scope: "col",
|
|
2722
2994
|
children: /* @__PURE__ */ t("span", {
|
|
@@ -2730,18 +3002,18 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2730
3002
|
children: /* @__PURE__ */ n("div", {
|
|
2731
3003
|
className: Z.selectionHeaderControls,
|
|
2732
3004
|
children: [/* @__PURE__ */ t(Ge, {
|
|
2733
|
-
checked:
|
|
2734
|
-
indeterminate:
|
|
2735
|
-
disabled: E ||
|
|
3005
|
+
checked: at,
|
|
3006
|
+
indeterminate: ot,
|
|
3007
|
+
disabled: E || rt.length === 0,
|
|
2736
3008
|
ariaLabel: R,
|
|
2737
|
-
onChange:
|
|
2738
|
-
}), /* @__PURE__ */ t(
|
|
3009
|
+
onChange: Et
|
|
3010
|
+
}), ee && /* @__PURE__ */ t(B, {
|
|
2739
3011
|
size: "sm",
|
|
2740
3012
|
variant: "empty",
|
|
2741
|
-
disabled:
|
|
3013
|
+
disabled: et.size === 0,
|
|
2742
3014
|
"aria-label": z,
|
|
2743
3015
|
title: z,
|
|
2744
|
-
onClick:
|
|
3016
|
+
onClick: Dt,
|
|
2745
3017
|
children: /* @__PURE__ */ t(J, {
|
|
2746
3018
|
name: "IconX",
|
|
2747
3019
|
width: 16,
|
|
@@ -2751,21 +3023,21 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2751
3023
|
})
|
|
2752
3024
|
}),
|
|
2753
3025
|
e.headers.map((e) => {
|
|
2754
|
-
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler(), o =
|
|
3026
|
+
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler(), o = Ne.find((t) => t.id === e.column.id);
|
|
2755
3027
|
return /* @__PURE__ */ t("th", {
|
|
2756
3028
|
scope: "col",
|
|
2757
3029
|
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
2758
3030
|
className: o?.sticky ? Z.stickyColumn : void 0,
|
|
2759
3031
|
style: {
|
|
2760
|
-
...
|
|
2761
|
-
...
|
|
3032
|
+
...sn(o),
|
|
3033
|
+
...cn(o)
|
|
2762
3034
|
},
|
|
2763
3035
|
children: /* @__PURE__ */ n("button", {
|
|
2764
3036
|
type: "button",
|
|
2765
3037
|
className: Z.sortButton,
|
|
2766
3038
|
disabled: !i,
|
|
2767
3039
|
onClick: a,
|
|
2768
|
-
children: [/* @__PURE__ */ t(
|
|
3040
|
+
children: [/* @__PURE__ */ t(Le.FlexRender, { header: e }), /* @__PURE__ */ t(J, {
|
|
2769
3041
|
name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
|
|
2770
3042
|
width: 16,
|
|
2771
3043
|
height: 16
|
|
@@ -2776,92 +3048,96 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2776
3048
|
] }, e.id))
|
|
2777
3049
|
}),
|
|
2778
3050
|
/* @__PURE__ */ t("tbody", { children: E ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2779
|
-
colSpan:
|
|
3051
|
+
colSpan: Ne.length + +!!N + +!!fe,
|
|
2780
3052
|
children: /* @__PURE__ */ t(gt, {
|
|
2781
3053
|
lines: 3,
|
|
2782
3054
|
height: 65
|
|
2783
3055
|
})
|
|
2784
|
-
}) }) :
|
|
3056
|
+
}) }) : dt ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2785
3057
|
className: Z.state,
|
|
2786
|
-
colSpan:
|
|
2787
|
-
children:
|
|
2788
|
-
}) }) :
|
|
3058
|
+
colSpan: Ne.length + +!!N + +!!fe,
|
|
3059
|
+
children: dt
|
|
3060
|
+
}) }) : He.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2789
3061
|
className: Z.state,
|
|
2790
|
-
colSpan:
|
|
3062
|
+
colSpan: Ne.length + +!!N + +!!fe,
|
|
2791
3063
|
children: O
|
|
2792
|
-
}) }) : /* @__PURE__ */ t(e, { children:
|
|
2793
|
-
let a =
|
|
2794
|
-
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
variant: "empty",
|
|
2823
|
-
"aria-expanded": s,
|
|
2824
|
-
"aria-label": pe?.(e.original, s) ?? (s ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2825
|
-
onClick: () => Et(e.id),
|
|
2826
|
-
children: /* @__PURE__ */ t(J, {
|
|
2827
|
-
name: "IconChevron",
|
|
2828
|
-
width: 16,
|
|
2829
|
-
height: 16,
|
|
2830
|
-
className: s ? Z.expansionIconOpen : Z.expansionIcon
|
|
2831
|
-
})
|
|
2832
|
-
})
|
|
2833
|
-
}),
|
|
2834
|
-
N && /* @__PURE__ */ t("td", {
|
|
2835
|
-
className: Z.selectionCell,
|
|
2836
|
-
children: /* @__PURE__ */ t("div", {
|
|
3064
|
+
}) }) : /* @__PURE__ */ t(e, { children: Je.map((e, i) => {
|
|
3065
|
+
let a = et.has(e.id), o = L?.(e.original) ?? `Выбрать строку ${e.index + 1}`, s = nt.has(e.id);
|
|
3066
|
+
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ t(rn, {
|
|
3067
|
+
config: V,
|
|
3068
|
+
row: e.original,
|
|
3069
|
+
children: /* @__PURE__ */ n("tr", {
|
|
3070
|
+
ref: Xe >= 0 && i >= Xe ? (e) => {
|
|
3071
|
+
e ? Ze.current.set(i, e) : Ze.current.delete(i);
|
|
3072
|
+
} : void 0,
|
|
3073
|
+
className: [
|
|
3074
|
+
M || N ? Z.clickableRow : "",
|
|
3075
|
+
a ? Z.selectedRow : "",
|
|
3076
|
+
v?.(e.original)
|
|
3077
|
+
].filter(Boolean).join(" "),
|
|
3078
|
+
style: y?.(e.original),
|
|
3079
|
+
"aria-selected": N ? a : void 0,
|
|
3080
|
+
onClick: () => {
|
|
3081
|
+
N ? Tt(e.id) : M?.(e.original);
|
|
3082
|
+
},
|
|
3083
|
+
onDoubleClick: () => {
|
|
3084
|
+
N && I?.(e.original);
|
|
3085
|
+
},
|
|
3086
|
+
onKeyDown: (t) => {
|
|
3087
|
+
t.key === "Enter" ? (t.preventDefault(), N ? I?.(e.original) : M?.(e.original)) : t.key === " " && N && (t.preventDefault(), Tt(e.id));
|
|
3088
|
+
},
|
|
3089
|
+
tabIndex: M || N || I || V ? 0 : void 0,
|
|
3090
|
+
role: !N && M ? "button" : void 0,
|
|
3091
|
+
children: [
|
|
3092
|
+
fe && /* @__PURE__ */ t("td", {
|
|
3093
|
+
className: Z.expansionCell,
|
|
2837
3094
|
onClick: (e) => e.stopPropagation(),
|
|
2838
|
-
children: /* @__PURE__ */ t(
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
3095
|
+
children: /* @__PURE__ */ t(B, {
|
|
3096
|
+
size: "sm",
|
|
3097
|
+
variant: "empty",
|
|
3098
|
+
"aria-expanded": s,
|
|
3099
|
+
"aria-label": he?.(e.original, s) ?? (s ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
3100
|
+
onClick: () => Ot(e.id),
|
|
3101
|
+
children: /* @__PURE__ */ t(J, {
|
|
3102
|
+
name: "IconChevron",
|
|
3103
|
+
width: 16,
|
|
3104
|
+
height: 16,
|
|
3105
|
+
className: s ? Z.expansionIconOpen : Z.expansionIcon
|
|
3106
|
+
})
|
|
3107
|
+
})
|
|
3108
|
+
}),
|
|
3109
|
+
N && /* @__PURE__ */ t("td", {
|
|
3110
|
+
className: Z.selectionCell,
|
|
3111
|
+
children: /* @__PURE__ */ t("div", {
|
|
3112
|
+
onClick: (e) => e.stopPropagation(),
|
|
3113
|
+
children: /* @__PURE__ */ t(Ge, {
|
|
3114
|
+
checked: a,
|
|
3115
|
+
ariaLabel: o,
|
|
3116
|
+
onChange: () => Tt(e.id)
|
|
3117
|
+
})
|
|
2842
3118
|
})
|
|
3119
|
+
}),
|
|
3120
|
+
e.getAllCells().map((e) => {
|
|
3121
|
+
let n = Ne.find((t) => t.id === e.column.id);
|
|
3122
|
+
return /* @__PURE__ */ t("td", {
|
|
3123
|
+
className: n?.sticky ? Z.stickyColumn : void 0,
|
|
3124
|
+
style: {
|
|
3125
|
+
...sn(n),
|
|
3126
|
+
...cn(n)
|
|
3127
|
+
},
|
|
3128
|
+
children: /* @__PURE__ */ t(Le.FlexRender, { cell: e })
|
|
3129
|
+
}, e.id);
|
|
2843
3130
|
})
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
return /* @__PURE__ */ t("td", {
|
|
2848
|
-
className: n?.sticky ? Z.stickyColumn : void 0,
|
|
2849
|
-
style: {
|
|
2850
|
-
...Ht(n),
|
|
2851
|
-
...Ut(n)
|
|
2852
|
-
},
|
|
2853
|
-
children: /* @__PURE__ */ t(Fe.FlexRender, { cell: e })
|
|
2854
|
-
}, e.id);
|
|
2855
|
-
})
|
|
2856
|
-
]
|
|
2857
|
-
}), s && G && /* @__PURE__ */ t("tr", {
|
|
3131
|
+
]
|
|
3132
|
+
})
|
|
3133
|
+
}), s && fe && /* @__PURE__ */ t("tr", {
|
|
2858
3134
|
className: Z.detailRow,
|
|
2859
3135
|
children: /* @__PURE__ */ t("td", {
|
|
2860
|
-
colSpan:
|
|
2861
|
-
children:
|
|
3136
|
+
colSpan: Ne.length + +!!N + 1,
|
|
3137
|
+
children: fe({
|
|
2862
3138
|
row: e.original,
|
|
2863
3139
|
rowId: e.id,
|
|
2864
|
-
collapse: () =>
|
|
3140
|
+
collapse: () => Ot(e.id)
|
|
2865
3141
|
})
|
|
2866
3142
|
})
|
|
2867
3143
|
})] }, e.id);
|
|
@@ -2869,55 +3145,55 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2869
3145
|
]
|
|
2870
3146
|
})
|
|
2871
3147
|
}),
|
|
2872
|
-
!
|
|
3148
|
+
!lt && /* @__PURE__ */ n("div", {
|
|
2873
3149
|
className: Z.cards,
|
|
2874
3150
|
role: "list",
|
|
2875
3151
|
"aria-label": T ?? w,
|
|
2876
|
-
children: [N && !E && !
|
|
3152
|
+
children: [N && !E && !dt && He.length > 0 && /* @__PURE__ */ n("div", {
|
|
2877
3153
|
className: Z.mobileSelectionControls,
|
|
2878
3154
|
children: [/* @__PURE__ */ t(Ge, {
|
|
2879
|
-
checked:
|
|
2880
|
-
indeterminate:
|
|
3155
|
+
checked: at,
|
|
3156
|
+
indeterminate: ot,
|
|
2881
3157
|
ariaLabel: R,
|
|
2882
3158
|
label: R,
|
|
2883
|
-
onChange:
|
|
2884
|
-
}), /* @__PURE__ */ t(
|
|
3159
|
+
onChange: Et
|
|
3160
|
+
}), ee && /* @__PURE__ */ t(B, {
|
|
2885
3161
|
size: "sm",
|
|
2886
3162
|
variant: "empty",
|
|
2887
|
-
disabled:
|
|
2888
|
-
onClick:
|
|
3163
|
+
disabled: et.size === 0,
|
|
3164
|
+
onClick: Dt,
|
|
2889
3165
|
children: z
|
|
2890
3166
|
})]
|
|
2891
3167
|
}), E ? /* @__PURE__ */ t(gt, {
|
|
2892
3168
|
lines: 4,
|
|
2893
3169
|
height: 65
|
|
2894
|
-
}) :
|
|
3170
|
+
}) : dt ? /* @__PURE__ */ t("div", {
|
|
2895
3171
|
className: Z.state,
|
|
2896
|
-
children:
|
|
2897
|
-
}) :
|
|
3172
|
+
children: dt
|
|
3173
|
+
}) : He.length === 0 ? /* @__PURE__ */ t("div", {
|
|
2898
3174
|
className: Z.state,
|
|
2899
3175
|
children: O
|
|
2900
|
-
}) : /* @__PURE__ */ t(e, { children:
|
|
2901
|
-
let i =
|
|
3176
|
+
}) : /* @__PURE__ */ t(e, { children: Je.map((e, r) => {
|
|
3177
|
+
let i = et.has(e.id), a = nt.has(e.id), o = L?.(e.original) ?? `Выбрать строку ${e.index + 1}`, s = N && /* @__PURE__ */ n("div", {
|
|
2902
3178
|
className: Z.cardSelectionControls,
|
|
2903
3179
|
onClick: (e) => e.stopPropagation(),
|
|
2904
3180
|
children: [/* @__PURE__ */ t(Ge, {
|
|
2905
3181
|
checked: i,
|
|
2906
3182
|
ariaLabel: o,
|
|
2907
|
-
onChange: () =>
|
|
2908
|
-
}), I && /* @__PURE__ */ t(
|
|
3183
|
+
onChange: () => Tt(e.id)
|
|
3184
|
+
}), I && /* @__PURE__ */ t(B, {
|
|
2909
3185
|
size: "sm",
|
|
2910
3186
|
variant: "empty",
|
|
2911
3187
|
onClick: () => I(e.original),
|
|
2912
|
-
children:
|
|
3188
|
+
children: te
|
|
2913
3189
|
})]
|
|
2914
|
-
}), c =
|
|
3190
|
+
}), c = fe && /* @__PURE__ */ t(B, {
|
|
2915
3191
|
size: "sm",
|
|
2916
3192
|
variant: "empty",
|
|
2917
3193
|
"aria-expanded": a,
|
|
2918
|
-
"aria-label":
|
|
3194
|
+
"aria-label": he?.(e.original, a) ?? (a ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2919
3195
|
onClick: (t) => {
|
|
2920
|
-
t.stopPropagation(),
|
|
3196
|
+
t.stopPropagation(), Ot(e.id);
|
|
2921
3197
|
},
|
|
2922
3198
|
children: /* @__PURE__ */ t(J, {
|
|
2923
3199
|
name: "IconChevron",
|
|
@@ -2927,8 +3203,8 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2927
3203
|
})
|
|
2928
3204
|
});
|
|
2929
3205
|
if (p) return /* @__PURE__ */ n("div", {
|
|
2930
|
-
ref:
|
|
2931
|
-
e ?
|
|
3206
|
+
ref: Xe >= 0 && r >= Xe ? (e) => {
|
|
3207
|
+
e ? Qe.current.set(r, e) : Qe.current.delete(r);
|
|
2932
3208
|
} : void 0,
|
|
2933
3209
|
role: "listitem",
|
|
2934
3210
|
className: [
|
|
@@ -2939,29 +3215,29 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2939
3215
|
style: y?.(e.original),
|
|
2940
3216
|
"aria-selected": N ? i : void 0,
|
|
2941
3217
|
onClick: () => {
|
|
2942
|
-
N &&
|
|
3218
|
+
N && Tt(e.id);
|
|
2943
3219
|
},
|
|
2944
3220
|
children: [
|
|
2945
3221
|
s,
|
|
2946
3222
|
p({
|
|
2947
3223
|
row: e.original,
|
|
2948
|
-
columns:
|
|
3224
|
+
columns: Ne
|
|
2949
3225
|
}),
|
|
2950
3226
|
c,
|
|
2951
3227
|
a && /* @__PURE__ */ t("div", {
|
|
2952
3228
|
className: Z.cardDetail,
|
|
2953
|
-
children:
|
|
3229
|
+
children: fe?.({
|
|
2954
3230
|
row: e.original,
|
|
2955
3231
|
rowId: e.id,
|
|
2956
|
-
collapse: () =>
|
|
3232
|
+
collapse: () => Ot(e.id)
|
|
2957
3233
|
})
|
|
2958
3234
|
})
|
|
2959
3235
|
]
|
|
2960
3236
|
}, e.id);
|
|
2961
|
-
let l =
|
|
3237
|
+
let l = Ne.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), u = l.find((e) => e.mobile?.primary) ?? l.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => dn(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
|
|
2962
3238
|
return /* @__PURE__ */ n("article", {
|
|
2963
|
-
ref:
|
|
2964
|
-
e ?
|
|
3239
|
+
ref: Xe >= 0 && r >= Xe ? (e) => {
|
|
3240
|
+
e ? Qe.current.set(r, e) : Qe.current.delete(r);
|
|
2965
3241
|
} : void 0,
|
|
2966
3242
|
role: "listitem",
|
|
2967
3243
|
className: [
|
|
@@ -2972,7 +3248,7 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2972
3248
|
style: y?.(e.original),
|
|
2973
3249
|
"aria-selected": N ? i : void 0,
|
|
2974
3250
|
onClick: () => {
|
|
2975
|
-
N &&
|
|
3251
|
+
N && Tt(e.id);
|
|
2976
3252
|
},
|
|
2977
3253
|
children: [
|
|
2978
3254
|
s,
|
|
@@ -2985,40 +3261,40 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2985
3261
|
l.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: f(e) }, e.id)),
|
|
2986
3262
|
a && /* @__PURE__ */ t("div", {
|
|
2987
3263
|
className: Z.cardDetail,
|
|
2988
|
-
children:
|
|
3264
|
+
children: fe?.({
|
|
2989
3265
|
row: e.original,
|
|
2990
3266
|
rowId: e.id,
|
|
2991
|
-
collapse: () =>
|
|
3267
|
+
collapse: () => Ot(e.id)
|
|
2992
3268
|
})
|
|
2993
3269
|
})
|
|
2994
3270
|
]
|
|
2995
3271
|
}, e.id);
|
|
2996
3272
|
}) })]
|
|
2997
3273
|
}),
|
|
2998
|
-
(
|
|
3274
|
+
(ft || pt && !E && !dt && He.length > 0) && /* @__PURE__ */ n("nav", {
|
|
2999
3275
|
className: Z.pagination,
|
|
3000
3276
|
"aria-label": "Пагинация таблицы",
|
|
3001
|
-
children: [
|
|
3277
|
+
children: [pt ? xt("bottom") : /* @__PURE__ */ n("span", {
|
|
3002
3278
|
className: Z.paginationRange,
|
|
3003
3279
|
"aria-live": "polite",
|
|
3004
3280
|
children: [
|
|
3005
|
-
|
|
3281
|
+
vt,
|
|
3006
3282
|
"–",
|
|
3007
|
-
|
|
3283
|
+
yt,
|
|
3008
3284
|
" из",
|
|
3009
3285
|
" ",
|
|
3010
|
-
|
|
3286
|
+
ze
|
|
3011
3287
|
]
|
|
3012
|
-
}),
|
|
3288
|
+
}), ft && /* @__PURE__ */ n("div", {
|
|
3013
3289
|
className: Z.paginationControls,
|
|
3014
3290
|
children: [
|
|
3015
|
-
/* @__PURE__ */ n(
|
|
3291
|
+
/* @__PURE__ */ n(B, {
|
|
3016
3292
|
variant: "empty",
|
|
3017
3293
|
size: "md",
|
|
3018
|
-
disabled: E ||
|
|
3294
|
+
disabled: E || q === 0,
|
|
3019
3295
|
"aria-label": "Предыдущая страница",
|
|
3020
3296
|
onClick: () => {
|
|
3021
|
-
|
|
3297
|
+
St(q - 1);
|
|
3022
3298
|
},
|
|
3023
3299
|
children: [/* @__PURE__ */ t(J, {
|
|
3024
3300
|
name: "IconChevron",
|
|
@@ -3032,15 +3308,15 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3032
3308
|
}),
|
|
3033
3309
|
/* @__PURE__ */ t("div", {
|
|
3034
3310
|
className: Z.pageNumbers,
|
|
3035
|
-
children:
|
|
3036
|
-
variant: e ===
|
|
3311
|
+
children: ct.map((e) => typeof e == "number" ? /* @__PURE__ */ t(B, {
|
|
3312
|
+
variant: e === q ? "secondary" : "empty",
|
|
3037
3313
|
size: "md",
|
|
3038
3314
|
className: Z.pageButton,
|
|
3039
3315
|
"aria-label": `Перейти на страницу ${e + 1}`,
|
|
3040
|
-
"aria-current": e ===
|
|
3316
|
+
"aria-current": e === q ? "page" : void 0,
|
|
3041
3317
|
disabled: E,
|
|
3042
3318
|
onClick: () => {
|
|
3043
|
-
|
|
3319
|
+
St(e);
|
|
3044
3320
|
},
|
|
3045
3321
|
children: e + 1
|
|
3046
3322
|
}, e) : /* @__PURE__ */ t("span", {
|
|
@@ -3049,13 +3325,13 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3049
3325
|
children: "…"
|
|
3050
3326
|
}, e))
|
|
3051
3327
|
}),
|
|
3052
|
-
/* @__PURE__ */ n(
|
|
3328
|
+
/* @__PURE__ */ n(B, {
|
|
3053
3329
|
variant: "empty",
|
|
3054
3330
|
size: "md",
|
|
3055
|
-
disabled: E ||
|
|
3331
|
+
disabled: E || q === Be - 1,
|
|
3056
3332
|
"aria-label": "Следующая страница",
|
|
3057
3333
|
onClick: () => {
|
|
3058
|
-
|
|
3334
|
+
St(q + 1);
|
|
3059
3335
|
},
|
|
3060
3336
|
children: [/* @__PURE__ */ t("span", {
|
|
3061
3337
|
className: Z.paginationButtonLabel,
|
|
@@ -3072,10 +3348,10 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3072
3348
|
})
|
|
3073
3349
|
]
|
|
3074
3350
|
});
|
|
3075
|
-
},
|
|
3351
|
+
}, bn = (e, t) => {
|
|
3076
3352
|
let n = t.trim().toLocaleLowerCase();
|
|
3077
3353
|
return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
|
|
3078
|
-
},
|
|
3354
|
+
}, xn = (e, t, n) => {
|
|
3079
3355
|
if (!e.length) return -1;
|
|
3080
3356
|
for (let r = 0; r < e.length; r += 1) {
|
|
3081
3357
|
let i = (t + r * n + e.length) % e.length;
|
|
@@ -3101,24 +3377,24 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3101
3377
|
active: "_active_1os84_321",
|
|
3102
3378
|
actionOption: "_actionOption_1os84_341",
|
|
3103
3379
|
visuallyHidden: "_visuallyHidden_1os84_375"
|
|
3104
|
-
},
|
|
3380
|
+
}, Sn = 8, Cn = 6, wn = 5, Tn = 10, En = {
|
|
3105
3381
|
sm: 30,
|
|
3106
3382
|
md: 40,
|
|
3107
3383
|
lg: 50
|
|
3108
|
-
},
|
|
3384
|
+
}, Dn = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: o = "Ничего не найдено", disabled: s = !1, readOnly: c = !1, stringWhileDisabled: u = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: w, id: T, needMark: E = !0 }) => {
|
|
3109
3385
|
let D = f(), O = T ?? `ds-search-dropdown-${w ?? D}`, k = `${O}-listbox`, A = `${O}-status`, j = b ? `${O}-hint` : void 0, M = y ? `${O}-error` : void 0, N = [
|
|
3110
3386
|
A,
|
|
3111
3387
|
j,
|
|
3112
3388
|
M
|
|
3113
|
-
].filter(Boolean).join(" "), P = h(null), F = h(null), I = h([]), [L, R] = g(!1), [z, ee] = g(""), [
|
|
3114
|
-
d(() => ee(
|
|
3115
|
-
let oe = l(() => P.current?.querySelector("input") ?? null, []), se = l((e, t) =>
|
|
3116
|
-
|
|
3117
|
-
}, []),
|
|
3389
|
+
].filter(Boolean).join(" "), P = h(null), F = h(null), I = h([]), [L, R] = g(!1), [z, ee] = g(""), [te, B] = g(-1), [V, U] = g(null), W = m(() => e.find((e) => e.value === r), [e, r]), re = m(() => bn(e, z), [e, z]), ie = s && u, ae = te >= 0 ? re[te] : void 0;
|
|
3390
|
+
d(() => ee(W?.label ?? ""), [W?.label, r]);
|
|
3391
|
+
let oe = l(() => P.current?.querySelector("input") ?? null, []), se = l((e, t) => xn(re, e, t), [re]), ce = l((e) => {
|
|
3392
|
+
B(e), !(e < 0) && requestAnimationFrame(() => I.current[e]?.scrollIntoView({ block: "nearest" }));
|
|
3393
|
+
}, []), G = l(() => {
|
|
3118
3394
|
let e = oe();
|
|
3119
3395
|
if (!e) return;
|
|
3120
|
-
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(re.length,
|
|
3121
|
-
|
|
3396
|
+
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(re.length, wn)) * En[x] + Tn, r = window.innerHeight - t.bottom - Sn, i = t.top - Sn, a = r < n && i > r, o = a ? i : r, s = Math.max(En[x] + Tn, Math.min(n, o)), c = window.innerWidth - t.width - Sn, l = Math.max(Sn, Math.min(t.left, c)), u = a ? Math.max(Sn, t.top - s - Cn) : t.bottom + Cn;
|
|
3397
|
+
U({
|
|
3122
3398
|
top: u,
|
|
3123
3399
|
left: l,
|
|
3124
3400
|
width: t.width,
|
|
@@ -3131,35 +3407,35 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3131
3407
|
]);
|
|
3132
3408
|
p(() => {
|
|
3133
3409
|
if (!L) {
|
|
3134
|
-
|
|
3410
|
+
U(null);
|
|
3135
3411
|
return;
|
|
3136
3412
|
}
|
|
3137
|
-
return
|
|
3138
|
-
window.removeEventListener("resize",
|
|
3413
|
+
return G(), window.addEventListener("resize", G), window.addEventListener("scroll", G, !0), () => {
|
|
3414
|
+
window.removeEventListener("resize", G), window.removeEventListener("scroll", G, !0);
|
|
3139
3415
|
};
|
|
3140
|
-
}, [L,
|
|
3416
|
+
}, [L, G]), d(() => {
|
|
3141
3417
|
if (!L) return;
|
|
3142
3418
|
let e = (e) => {
|
|
3143
3419
|
let t = e.target;
|
|
3144
|
-
!P.current?.contains(t) && !F.current?.contains(t) && (R(!1),
|
|
3420
|
+
!P.current?.contains(t) && !F.current?.contains(t) && (R(!1), B(-1));
|
|
3145
3421
|
};
|
|
3146
3422
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
3147
3423
|
}, [L]);
|
|
3148
|
-
let
|
|
3149
|
-
s || c || (R(!0),
|
|
3150
|
-
},
|
|
3151
|
-
e.disabled || (ee(e.label), R(!1),
|
|
3424
|
+
let le = () => {
|
|
3425
|
+
s || c || (R(!0), B(se(0, 1)));
|
|
3426
|
+
}, ue = (e) => {
|
|
3427
|
+
e.disabled || (ee(e.label), R(!1), B(-1), i?.(e.value, e), oe()?.focus());
|
|
3152
3428
|
}, de = L ? /* @__PURE__ */ t("ul", {
|
|
3153
3429
|
ref: F,
|
|
3154
3430
|
id: k,
|
|
3155
3431
|
className: `${Q.menu} ${re.length === 0 ? Q.menuEmpty : ""}`,
|
|
3156
3432
|
role: "listbox",
|
|
3157
3433
|
"aria-label": v,
|
|
3158
|
-
style:
|
|
3159
|
-
top:
|
|
3160
|
-
left:
|
|
3161
|
-
width:
|
|
3162
|
-
maxHeight:
|
|
3434
|
+
style: V ? {
|
|
3435
|
+
top: V.top,
|
|
3436
|
+
left: V.left,
|
|
3437
|
+
width: V.width,
|
|
3438
|
+
maxHeight: V.maxHeight
|
|
3163
3439
|
} : {
|
|
3164
3440
|
top: 0,
|
|
3165
3441
|
left: 0,
|
|
@@ -3170,7 +3446,7 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3170
3446
|
className: `${Q.empty} ${Q[x]}`,
|
|
3171
3447
|
children: o
|
|
3172
3448
|
}) : re.map((e, i) => {
|
|
3173
|
-
let a = e.value === r, o = i ===
|
|
3449
|
+
let a = e.value === r, o = i === te;
|
|
3174
3450
|
return /* @__PURE__ */ t("li", {
|
|
3175
3451
|
role: "presentation",
|
|
3176
3452
|
children: /* @__PURE__ */ n("button", {
|
|
@@ -3193,9 +3469,9 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3193
3469
|
o ? Q.active : ""
|
|
3194
3470
|
].filter(Boolean).join(" "),
|
|
3195
3471
|
onPointerMove: () => {
|
|
3196
|
-
e.disabled ||
|
|
3472
|
+
e.disabled || B(i);
|
|
3197
3473
|
},
|
|
3198
|
-
onClick: () =>
|
|
3474
|
+
onClick: () => ue(e),
|
|
3199
3475
|
children: [/* @__PURE__ */ t("span", { children: e.label }), a && E && /* @__PURE__ */ t(J, {
|
|
3200
3476
|
name: "IconCheck",
|
|
3201
3477
|
width: 16,
|
|
@@ -3213,7 +3489,7 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3213
3489
|
C
|
|
3214
3490
|
].filter(Boolean).join(" "),
|
|
3215
3491
|
children: [
|
|
3216
|
-
v && /* @__PURE__ */ t(
|
|
3492
|
+
v && /* @__PURE__ */ t(ne, {
|
|
3217
3493
|
htmlFor: ie ? void 0 : O,
|
|
3218
3494
|
required: S,
|
|
3219
3495
|
disabled: s,
|
|
@@ -3221,7 +3497,7 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3221
3497
|
}),
|
|
3222
3498
|
ie ? /* @__PURE__ */ t("div", {
|
|
3223
3499
|
className: `${Q.disabledText} ${Q[x]}`,
|
|
3224
|
-
children:
|
|
3500
|
+
children: W?.label ?? a
|
|
3225
3501
|
}) : /* @__PURE__ */ n("div", {
|
|
3226
3502
|
className: Q.control,
|
|
3227
3503
|
children: [/* @__PURE__ */ t(Et, {
|
|
@@ -3236,31 +3512,31 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3236
3512
|
clearable: !1,
|
|
3237
3513
|
autoComplete: "off",
|
|
3238
3514
|
className: `${Q.inputHost} ${Q[x]}`,
|
|
3239
|
-
onFocus:
|
|
3515
|
+
onFocus: le,
|
|
3240
3516
|
onChange: (t) => {
|
|
3241
|
-
let n = String(t), r =
|
|
3242
|
-
ee(n), R(!0),
|
|
3517
|
+
let n = String(t), r = bn(e, n);
|
|
3518
|
+
ee(n), R(!0), B(xn(r, 0, 1));
|
|
3243
3519
|
},
|
|
3244
3520
|
role: "combobox",
|
|
3245
3521
|
"aria-autocomplete": "list",
|
|
3246
3522
|
"aria-expanded": L,
|
|
3247
3523
|
"aria-controls": k,
|
|
3248
|
-
"aria-activedescendant": ae ? `${O}-option-${
|
|
3524
|
+
"aria-activedescendant": ae ? `${O}-option-${te}` : void 0,
|
|
3249
3525
|
"aria-invalid": !!y,
|
|
3250
3526
|
"aria-describedby": N,
|
|
3251
|
-
onClick:
|
|
3527
|
+
onClick: le,
|
|
3252
3528
|
onKeyDown: (e) => {
|
|
3253
3529
|
if (!(s || c)) {
|
|
3254
3530
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
3255
3531
|
e.preventDefault();
|
|
3256
|
-
let t = e.key === "ArrowDown" ? 1 : -1, n =
|
|
3532
|
+
let t = e.key === "ArrowDown" ? 1 : -1, n = te >= 0 ? te + t : t === 1 ? 0 : re.length - 1;
|
|
3257
3533
|
R(!0), ce(se(n, t));
|
|
3258
3534
|
} else if (e.key === "Home" || e.key === "End") {
|
|
3259
3535
|
if (!L) return;
|
|
3260
3536
|
e.preventDefault();
|
|
3261
3537
|
let t = e.key === "Home" ? 1 : -1;
|
|
3262
3538
|
ce(se(e.key === "Home" ? 0 : re.length - 1, t));
|
|
3263
|
-
} else e.key === "Enter" && L && ae ? (e.preventDefault(),
|
|
3539
|
+
} else e.key === "Enter" && L && ae ? (e.preventDefault(), ue(ae)) : e.key === "Escape" && L ? (e.preventDefault(), R(!1), B(-1)) : e.key === "Tab" && (R(!1), B(-1));
|
|
3264
3540
|
}
|
|
3265
3541
|
}
|
|
3266
3542
|
}), /* @__PURE__ */ t("span", {
|
|
@@ -3280,36 +3556,36 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3280
3556
|
"aria-live": "polite",
|
|
3281
3557
|
children: ["Найдено вариантов: ", re.length]
|
|
3282
3558
|
}),
|
|
3283
|
-
b && !y && /* @__PURE__ */ t(
|
|
3559
|
+
b && !y && /* @__PURE__ */ t(H, {
|
|
3284
3560
|
id: j,
|
|
3285
3561
|
children: b
|
|
3286
3562
|
}),
|
|
3287
|
-
y && /* @__PURE__ */ t(
|
|
3563
|
+
y && /* @__PURE__ */ t(H, {
|
|
3288
3564
|
id: M,
|
|
3289
3565
|
variant: "error",
|
|
3290
3566
|
children: y
|
|
3291
3567
|
})
|
|
3292
3568
|
]
|
|
3293
3569
|
});
|
|
3294
|
-
},
|
|
3570
|
+
}, On = {
|
|
3295
3571
|
root: "_root_11adi_1",
|
|
3296
3572
|
header: "_header_11adi_21",
|
|
3297
3573
|
title: "_title_11adi_41",
|
|
3298
3574
|
dismiss: "_dismiss_11adi_55",
|
|
3299
3575
|
content: "_content_11adi_65"
|
|
3300
|
-
},
|
|
3576
|
+
}, kn = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: c = "" }) => {
|
|
3301
3577
|
let l = `ds-info-block-${f()}`;
|
|
3302
3578
|
return /* @__PURE__ */ n("section", {
|
|
3303
|
-
className: `${
|
|
3579
|
+
className: `${On.root} ${c}`,
|
|
3304
3580
|
"aria-labelledby": l,
|
|
3305
3581
|
children: [/* @__PURE__ */ n("header", {
|
|
3306
|
-
className:
|
|
3582
|
+
className: On.header,
|
|
3307
3583
|
children: [/* @__PURE__ */ t(s, {
|
|
3308
3584
|
id: l,
|
|
3309
|
-
className:
|
|
3585
|
+
className: On.title,
|
|
3310
3586
|
children: e
|
|
3311
|
-
}), i && /* @__PURE__ */ t(
|
|
3312
|
-
className:
|
|
3587
|
+
}), i && /* @__PURE__ */ t(B, {
|
|
3588
|
+
className: On.dismiss,
|
|
3313
3589
|
variant: "empty",
|
|
3314
3590
|
onClick: a,
|
|
3315
3591
|
"aria-label": o,
|
|
@@ -3320,15 +3596,15 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3320
3596
|
})
|
|
3321
3597
|
})]
|
|
3322
3598
|
}), /* @__PURE__ */ t("div", {
|
|
3323
|
-
className:
|
|
3599
|
+
className: On.content,
|
|
3324
3600
|
children: r
|
|
3325
3601
|
})]
|
|
3326
3602
|
});
|
|
3327
|
-
},
|
|
3603
|
+
}, An = {
|
|
3328
3604
|
root: "_root_1ecm3_1",
|
|
3329
3605
|
grid: "_grid_1ecm3_13",
|
|
3330
3606
|
actions: "_actions_1ecm3_27"
|
|
3331
|
-
},
|
|
3607
|
+
}, jn = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
|
|
3332
3608
|
let d = (e, t) => {
|
|
3333
3609
|
let n = {
|
|
3334
3610
|
...r,
|
|
@@ -3337,11 +3613,11 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3337
3613
|
i?.(n, e), s === "instant" && a?.(n);
|
|
3338
3614
|
};
|
|
3339
3615
|
return /* @__PURE__ */ n("section", {
|
|
3340
|
-
className: `${
|
|
3616
|
+
className: `${An.root} ${u}`,
|
|
3341
3617
|
"aria-label": "Фильтры",
|
|
3342
3618
|
"aria-busy": c,
|
|
3343
3619
|
children: [/* @__PURE__ */ t("div", {
|
|
3344
|
-
className:
|
|
3620
|
+
className: An.grid,
|
|
3345
3621
|
children: e.filter((e) => !e.hidden).map((e) => {
|
|
3346
3622
|
let n = l || c || e.disabled, i = r[e.id];
|
|
3347
3623
|
if (e.type === "input") {
|
|
@@ -3409,13 +3685,13 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3409
3685
|
}, e.id);
|
|
3410
3686
|
})
|
|
3411
3687
|
}), (o || s === "manual") && /* @__PURE__ */ n("div", {
|
|
3412
|
-
className:
|
|
3413
|
-
children: [o && /* @__PURE__ */ t(
|
|
3688
|
+
className: An.actions,
|
|
3689
|
+
children: [o && /* @__PURE__ */ t(B, {
|
|
3414
3690
|
variant: "destructiveOutline",
|
|
3415
3691
|
disabled: l || c,
|
|
3416
3692
|
onClick: o,
|
|
3417
3693
|
children: "Сбросить"
|
|
3418
|
-
}), s === "manual" && /* @__PURE__ */ t(
|
|
3694
|
+
}), s === "manual" && /* @__PURE__ */ t(B, {
|
|
3419
3695
|
isLoading: c,
|
|
3420
3696
|
disabled: l,
|
|
3421
3697
|
onClick: () => a?.(r),
|
|
@@ -3423,7 +3699,7 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3423
3699
|
})]
|
|
3424
3700
|
})]
|
|
3425
3701
|
});
|
|
3426
|
-
},
|
|
3702
|
+
}, Mn = {
|
|
3427
3703
|
grid: "_grid_1q540_1",
|
|
3428
3704
|
comfortable: "_comfortable_1q540_11",
|
|
3429
3705
|
compact: "_compact_1q540_19",
|
|
@@ -3440,23 +3716,23 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3440
3716
|
summary: "_summary_1q540_101",
|
|
3441
3717
|
summaryTitle: "_summaryTitle_1q540_137",
|
|
3442
3718
|
summaryList: "_summaryList_1q540_145"
|
|
3443
|
-
},
|
|
3719
|
+
}, Nn = ({ columns: e = 2, density: n = "comfortable", className: r = "", ...i }) => /* @__PURE__ */ t("div", {
|
|
3444
3720
|
...i,
|
|
3445
|
-
className: `${
|
|
3446
|
-
}),
|
|
3721
|
+
className: `${Mn.grid} ${Mn[`columns${e}`]} ${Mn[n]} ${r}`
|
|
3722
|
+
}), Pn = ({ span: e = 1, className: n = "", ...r }) => /* @__PURE__ */ t("div", {
|
|
3447
3723
|
...r,
|
|
3448
|
-
className: `${
|
|
3449
|
-
}),
|
|
3724
|
+
className: `${Mn.item} ${Mn[`span${e}`]} ${n}`
|
|
3725
|
+
}), Fn = ({ title: e = "Проверьте заполнение формы", items: r, focusField: i, className: a = "", ...o }) => r.length === 0 ? null : /* @__PURE__ */ n("div", {
|
|
3450
3726
|
...o,
|
|
3451
|
-
className: `${
|
|
3727
|
+
className: `${Mn.summary} ${a}`,
|
|
3452
3728
|
role: "alert",
|
|
3453
3729
|
"aria-atomic": "true",
|
|
3454
3730
|
tabIndex: -1,
|
|
3455
3731
|
children: [/* @__PURE__ */ t("strong", {
|
|
3456
|
-
className:
|
|
3732
|
+
className: Mn.summaryTitle,
|
|
3457
3733
|
children: e
|
|
3458
3734
|
}), /* @__PURE__ */ t("ul", {
|
|
3459
|
-
className:
|
|
3735
|
+
className: Mn.summaryList,
|
|
3460
3736
|
children: r.map((e) => /* @__PURE__ */ t("li", { children: e.fieldId ? /* @__PURE__ */ t("a", {
|
|
3461
3737
|
href: `#${e.fieldId}`,
|
|
3462
3738
|
onClick: (t) => {
|
|
@@ -3465,7 +3741,7 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3465
3741
|
children: e.message
|
|
3466
3742
|
}) : e.message }, e.id))
|
|
3467
3743
|
})]
|
|
3468
|
-
}),
|
|
3744
|
+
}), In = {
|
|
3469
3745
|
wrapper: "_wrapper_yxnr3_1",
|
|
3470
3746
|
dropzone: "_dropzone_yxnr3_15",
|
|
3471
3747
|
dragActive: "_dragActive_yxnr3_45",
|
|
@@ -3478,12 +3754,12 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3478
3754
|
file: "_file_yxnr3_133",
|
|
3479
3755
|
fileName: "_fileName_yxnr3_175",
|
|
3480
3756
|
fileSize: "_fileSize_yxnr3_187"
|
|
3481
|
-
},
|
|
3757
|
+
}, Ln = (e) => `${e.name}:${e.size}:${e.lastModified}`, Rn = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, zn = (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), Bn = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: c, label: l, hint: u, error: d, required: p = !1, disabled: m = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: w }) => {
|
|
3482
3758
|
let T = f(), E = y ?? `ds-file-input-${v ?? T}`, D = h(null), O = h(0), [k, A] = g(!1), j = u ? `${E}-hint` : void 0, M = d ? `${E}-error` : void 0, N = [j, M].filter(Boolean).join(" ") || void 0, P = !m && !_, F = (e) => {
|
|
3483
|
-
let t = [], n = new Set(r.map(
|
|
3759
|
+
let t = [], n = new Set(r.map(Ln)), l = e.filter((e) => zn(e, o) ? s !== void 0 && e.size > s ? (t.push({
|
|
3484
3760
|
file: e,
|
|
3485
3761
|
reason: "maxSize"
|
|
3486
|
-
}), !1) : !n.has(
|
|
3762
|
+
}), !1) : !n.has(Ln(e)) && (n.add(Ln(e)), !0) : (t.push({
|
|
3487
3763
|
file: e,
|
|
3488
3764
|
reason: "accept"
|
|
3489
3765
|
}), !1)), u = a ? c : 1, d = a ? [...r, ...l] : l.slice(-1);
|
|
@@ -3493,16 +3769,16 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3493
3769
|
})), d = d.slice(0, u)), t.length && w?.(t), l.length && i?.(d), D.current && (D.current.value = "");
|
|
3494
3770
|
};
|
|
3495
3771
|
return /* @__PURE__ */ n("div", {
|
|
3496
|
-
className: `${
|
|
3772
|
+
className: `${In.wrapper} ${b}`,
|
|
3497
3773
|
children: [
|
|
3498
|
-
l && /* @__PURE__ */ t(
|
|
3774
|
+
l && /* @__PURE__ */ t(ne, {
|
|
3499
3775
|
htmlFor: E,
|
|
3500
3776
|
required: p,
|
|
3501
3777
|
disabled: m,
|
|
3502
3778
|
children: l
|
|
3503
3779
|
}),
|
|
3504
3780
|
/* @__PURE__ */ n("div", {
|
|
3505
|
-
className: `${
|
|
3781
|
+
className: `${In.dropzone} ${k ? In.dragActive : ""} ${m ? In.disabled : ""} ${d ? In.error : ""}`,
|
|
3506
3782
|
onDragEnter: (e) => {
|
|
3507
3783
|
e.preventDefault(), P && ++O.current === 1 && A(!0);
|
|
3508
3784
|
},
|
|
@@ -3517,7 +3793,7 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3517
3793
|
ref: D,
|
|
3518
3794
|
id: E,
|
|
3519
3795
|
name: v,
|
|
3520
|
-
className:
|
|
3796
|
+
className: In.nativeInput,
|
|
3521
3797
|
type: "file",
|
|
3522
3798
|
multiple: a,
|
|
3523
3799
|
accept: o,
|
|
@@ -3528,21 +3804,21 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3528
3804
|
onChange: (e) => F(Array.from(e.target.files ?? []))
|
|
3529
3805
|
}), r.length ? /* @__PURE__ */ n(e, { children: [
|
|
3530
3806
|
/* @__PURE__ */ t("ul", {
|
|
3531
|
-
className:
|
|
3807
|
+
className: In.files,
|
|
3532
3808
|
"aria-live": "polite",
|
|
3533
3809
|
children: r.map((e, a) => /* @__PURE__ */ n("li", {
|
|
3534
|
-
className:
|
|
3810
|
+
className: In.file,
|
|
3535
3811
|
children: [
|
|
3536
3812
|
/* @__PURE__ */ t("span", {
|
|
3537
|
-
className:
|
|
3813
|
+
className: In.fileName,
|
|
3538
3814
|
title: e.name,
|
|
3539
3815
|
children: e.name
|
|
3540
3816
|
}),
|
|
3541
3817
|
/* @__PURE__ */ t("span", {
|
|
3542
|
-
className:
|
|
3543
|
-
children:
|
|
3818
|
+
className: In.fileSize,
|
|
3819
|
+
children: Rn(e.size)
|
|
3544
3820
|
}),
|
|
3545
|
-
P && /* @__PURE__ */ t(
|
|
3821
|
+
P && /* @__PURE__ */ t(B, {
|
|
3546
3822
|
variant: "empty",
|
|
3547
3823
|
size: "sm",
|
|
3548
3824
|
"aria-label": `Удалить файл ${e.name}`,
|
|
@@ -3554,25 +3830,25 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3554
3830
|
})
|
|
3555
3831
|
})
|
|
3556
3832
|
]
|
|
3557
|
-
},
|
|
3833
|
+
}, Ln(e)))
|
|
3558
3834
|
}),
|
|
3559
|
-
P && (a || r.length === 0) && /* @__PURE__ */ t(
|
|
3560
|
-
className:
|
|
3835
|
+
P && (a || r.length === 0) && /* @__PURE__ */ t(B, {
|
|
3836
|
+
className: In.browseButton,
|
|
3561
3837
|
size: "sm",
|
|
3562
3838
|
onClick: () => D.current?.click(),
|
|
3563
3839
|
children: C
|
|
3564
3840
|
}),
|
|
3565
|
-
P && !a && /* @__PURE__ */ t(
|
|
3566
|
-
className:
|
|
3841
|
+
P && !a && /* @__PURE__ */ t(B, {
|
|
3842
|
+
className: In.browseButton,
|
|
3567
3843
|
size: "sm",
|
|
3568
3844
|
onClick: () => D.current?.click(),
|
|
3569
3845
|
children: S
|
|
3570
3846
|
})
|
|
3571
3847
|
] }) : /* @__PURE__ */ n("div", {
|
|
3572
|
-
className:
|
|
3848
|
+
className: In.empty,
|
|
3573
3849
|
children: [
|
|
3574
3850
|
/* @__PURE__ */ t("span", {
|
|
3575
|
-
className:
|
|
3851
|
+
className: In.uploadIcon,
|
|
3576
3852
|
"aria-hidden": "true",
|
|
3577
3853
|
children: /* @__PURE__ */ t(J, {
|
|
3578
3854
|
name: "IconUpload",
|
|
@@ -3581,18 +3857,18 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3581
3857
|
})
|
|
3582
3858
|
}),
|
|
3583
3859
|
/* @__PURE__ */ t("strong", { children: k ? "Отпустите файлы здесь" : x }),
|
|
3584
|
-
!k && P && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(
|
|
3860
|
+
!k && P && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(B, {
|
|
3585
3861
|
onClick: () => D.current?.click(),
|
|
3586
3862
|
children: S
|
|
3587
3863
|
})] })
|
|
3588
3864
|
]
|
|
3589
3865
|
})]
|
|
3590
3866
|
}),
|
|
3591
|
-
u && !d && /* @__PURE__ */ t(
|
|
3867
|
+
u && !d && /* @__PURE__ */ t(H, {
|
|
3592
3868
|
id: j,
|
|
3593
3869
|
children: u
|
|
3594
3870
|
}),
|
|
3595
|
-
d && /* @__PURE__ */ t(
|
|
3871
|
+
d && /* @__PURE__ */ t(H, {
|
|
3596
3872
|
id: M,
|
|
3597
3873
|
variant: "error",
|
|
3598
3874
|
live: !0,
|
|
@@ -3600,20 +3876,7 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3600
3876
|
})
|
|
3601
3877
|
]
|
|
3602
3878
|
});
|
|
3603
|
-
},
|
|
3604
|
-
let [n, r] = g(null);
|
|
3605
|
-
return d(() => {
|
|
3606
|
-
let e = document.getElementById(t);
|
|
3607
|
-
if (e) {
|
|
3608
|
-
r(e);
|
|
3609
|
-
return;
|
|
3610
|
-
}
|
|
3611
|
-
let n = document.createElement("div");
|
|
3612
|
-
return n.id = t, document.body.appendChild(n), r(n), () => {
|
|
3613
|
-
n.childElementCount === 0 && n.parentElement && n.remove();
|
|
3614
|
-
};
|
|
3615
|
-
}, [t]), n ? _(e, n) : null;
|
|
3616
|
-
}, wn = typeof window > "u" ? d : p, Tn = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
|
|
3879
|
+
}, Vn = typeof window > "u" ? d : p, Hn = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
|
|
3617
3880
|
let [o, s] = g(null), [c, u] = g({
|
|
3618
3881
|
position: "fixed",
|
|
3619
3882
|
visibility: "hidden",
|
|
@@ -3636,7 +3899,7 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3636
3899
|
o,
|
|
3637
3900
|
i
|
|
3638
3901
|
]);
|
|
3639
|
-
return
|
|
3902
|
+
return Vn(() => {
|
|
3640
3903
|
if (!o) return;
|
|
3641
3904
|
d(), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0);
|
|
3642
3905
|
let t = typeof ResizeObserver > "u" ? null : new ResizeObserver(d);
|
|
@@ -3647,13 +3910,13 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3647
3910
|
e,
|
|
3648
3911
|
o,
|
|
3649
3912
|
d
|
|
3650
|
-
]), /* @__PURE__ */ t(
|
|
3913
|
+
]), /* @__PURE__ */ t(Lt, { children: /* @__PURE__ */ t("div", {
|
|
3651
3914
|
ref: s,
|
|
3652
3915
|
className: a,
|
|
3653
3916
|
style: c,
|
|
3654
3917
|
children: n
|
|
3655
3918
|
}) });
|
|
3656
|
-
},
|
|
3919
|
+
}, Un = {
|
|
3657
3920
|
wrapper: "_wrapper_1tid7_1",
|
|
3658
3921
|
control: "_control_1tid7_15",
|
|
3659
3922
|
textarea: "_textarea_1tid7_25",
|
|
@@ -3667,12 +3930,12 @@ var Bt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3667
3930
|
clearAction: "_clearAction_1tid7_171",
|
|
3668
3931
|
messages: "_messages_1tid7_251",
|
|
3669
3932
|
counter: "_counter_1tid7_265"
|
|
3670
|
-
},
|
|
3671
|
-
function
|
|
3933
|
+
}, Wn = 2;
|
|
3934
|
+
function Gn(e) {
|
|
3672
3935
|
let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
|
|
3673
3936
|
return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
|
|
3674
3937
|
}
|
|
3675
|
-
function
|
|
3938
|
+
function Kn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: s = !1, label: c, error: u, hint: p, className: m = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = Wn, maxRows: w, autoResize: T = !0, ...E }) {
|
|
3676
3939
|
let D = f(), O = _ ?? `ds-textarea-${g ?? D}`, k = h(null), A = p ? `${O}-hint` : void 0, j = u ? `${O}-error` : void 0, M = S && x ? `${O}-count` : void 0, N = [
|
|
3677
3940
|
A,
|
|
3678
3941
|
j,
|
|
@@ -3680,7 +3943,7 @@ function kn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3680
3943
|
].filter(Boolean).join(" ") || void 0, P = Math.max(1, C), F = w === void 0 ? void 0 : Math.max(P, w), I = l(() => {
|
|
3681
3944
|
let e = k.current;
|
|
3682
3945
|
if (!e || !T) return;
|
|
3683
|
-
let t = window.getComputedStyle(e), n =
|
|
3946
|
+
let t = window.getComputedStyle(e), n = Gn(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * P + r, a = F === void 0 ? Infinity : n * F + r;
|
|
3684
3947
|
e.style.height = "auto";
|
|
3685
3948
|
let o = Math.min(Math.max(e.scrollHeight, i), a);
|
|
3686
3949
|
e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
|
|
@@ -3712,9 +3975,9 @@ function kn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3712
3975
|
e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), I());
|
|
3713
3976
|
}, z = { "--ds-textarea-min-rows": P };
|
|
3714
3977
|
return /* @__PURE__ */ n("div", {
|
|
3715
|
-
className: `${
|
|
3978
|
+
className: `${Un.wrapper} ${m}`,
|
|
3716
3979
|
children: [
|
|
3717
|
-
c && /* @__PURE__ */ t(
|
|
3980
|
+
c && /* @__PURE__ */ t(ne, {
|
|
3718
3981
|
htmlFor: O,
|
|
3719
3982
|
required: b,
|
|
3720
3983
|
disabled: a,
|
|
@@ -3722,12 +3985,12 @@ function kn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3722
3985
|
}),
|
|
3723
3986
|
a && s ? /* @__PURE__ */ t("div", {
|
|
3724
3987
|
id: O,
|
|
3725
|
-
className: `${
|
|
3988
|
+
className: `${Un.disabledText} ${Un[v]}`,
|
|
3726
3989
|
style: z,
|
|
3727
3990
|
"aria-describedby": N,
|
|
3728
3991
|
children: e || i
|
|
3729
3992
|
}) : /* @__PURE__ */ n("div", {
|
|
3730
|
-
className:
|
|
3993
|
+
className: Un.control,
|
|
3731
3994
|
children: [/* @__PURE__ */ t("textarea", {
|
|
3732
3995
|
ref: k,
|
|
3733
3996
|
id: O,
|
|
@@ -3742,12 +4005,12 @@ function kn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3742
4005
|
style: z,
|
|
3743
4006
|
"aria-invalid": !!u,
|
|
3744
4007
|
"aria-describedby": N,
|
|
3745
|
-
className: `${
|
|
4008
|
+
className: `${Un.textarea} ${Un[v]} ${T ? Un.autoResize : Un.manualResize} ${u ? Un.textareaError : ""}`,
|
|
3746
4009
|
onChange: L,
|
|
3747
4010
|
...E
|
|
3748
4011
|
}), y && e && !a && !o && /* @__PURE__ */ t("button", {
|
|
3749
4012
|
type: "button",
|
|
3750
|
-
className:
|
|
4013
|
+
className: Un.clearAction,
|
|
3751
4014
|
"aria-label": "Очистить поле",
|
|
3752
4015
|
onClick: R,
|
|
3753
4016
|
children: /* @__PURE__ */ t(J, {
|
|
@@ -3758,20 +4021,20 @@ function kn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3758
4021
|
})]
|
|
3759
4022
|
}),
|
|
3760
4023
|
(p || u || M) && /* @__PURE__ */ n("div", {
|
|
3761
|
-
className:
|
|
4024
|
+
className: Un.messages,
|
|
3762
4025
|
children: [
|
|
3763
|
-
p && !u && /* @__PURE__ */ t(
|
|
4026
|
+
p && !u && /* @__PURE__ */ t(H, {
|
|
3764
4027
|
id: A,
|
|
3765
4028
|
children: p
|
|
3766
4029
|
}),
|
|
3767
|
-
u && /* @__PURE__ */ t(
|
|
4030
|
+
u && /* @__PURE__ */ t(H, {
|
|
3768
4031
|
id: j,
|
|
3769
4032
|
variant: "error",
|
|
3770
4033
|
children: u
|
|
3771
4034
|
}),
|
|
3772
4035
|
M && /* @__PURE__ */ n("span", {
|
|
3773
4036
|
id: M,
|
|
3774
|
-
className:
|
|
4037
|
+
className: Un.counter,
|
|
3775
4038
|
children: [
|
|
3776
4039
|
e.length,
|
|
3777
4040
|
" / ",
|
|
@@ -3785,11 +4048,11 @@ function kn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3785
4048
|
}
|
|
3786
4049
|
//#endregion
|
|
3787
4050
|
//#region src/components/DSModal/modal.store.ts
|
|
3788
|
-
var
|
|
4051
|
+
var qn = 0, Jn = S((e, t) => ({
|
|
3789
4052
|
modals: [],
|
|
3790
4053
|
openModal: (t, n = {}, r = {}) => {
|
|
3791
|
-
|
|
3792
|
-
let i = `ds-modal-${
|
|
4054
|
+
qn += 1;
|
|
4055
|
+
let i = `ds-modal-${qn}`;
|
|
3793
4056
|
return e((e) => ({ modals: [...e.modals, {
|
|
3794
4057
|
id: i,
|
|
3795
4058
|
name: t,
|
|
@@ -3813,10 +4076,10 @@ var An = 0, jn = S((e, t) => ({
|
|
|
3813
4076
|
let n = t().modals;
|
|
3814
4077
|
n.length && (e({ modals: [] }), n.forEach((e) => e.onClose?.()));
|
|
3815
4078
|
}
|
|
3816
|
-
})),
|
|
3817
|
-
|
|
3818
|
-
},
|
|
3819
|
-
function
|
|
4079
|
+
})), Yn = () => {
|
|
4080
|
+
Jn.getState().closeAllModals(), qn = 0;
|
|
4081
|
+
}, Xn = 8, Zn = 96, Qn = .55;
|
|
4082
|
+
function $n(e, t, n) {
|
|
3820
4083
|
return {
|
|
3821
4084
|
startX: e,
|
|
3822
4085
|
startY: t,
|
|
@@ -3824,16 +4087,16 @@ function In(e, t, n) {
|
|
|
3824
4087
|
intent: "pending"
|
|
3825
4088
|
};
|
|
3826
4089
|
}
|
|
3827
|
-
function
|
|
4090
|
+
function er(e, t, n) {
|
|
3828
4091
|
let r = t - e.startX, i = n - e.startY;
|
|
3829
|
-
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >=
|
|
4092
|
+
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >= Xn && (e.intent = Math.abs(i) > Math.abs(r) ? "vertical" : "horizontal"), e.intent === "vertical" ? Math.max(0, i) : 0;
|
|
3830
4093
|
}
|
|
3831
|
-
function
|
|
4094
|
+
function tr(e, t, n) {
|
|
3832
4095
|
if (e.intent !== "vertical") return !1;
|
|
3833
4096
|
let r = Math.max(0, t - e.startY), i = Math.max(1, n - e.startTime);
|
|
3834
|
-
return r >=
|
|
4097
|
+
return r >= Zn || r >= 32 && r / i >= Qn;
|
|
3835
4098
|
}
|
|
3836
|
-
var
|
|
4099
|
+
var nr = {
|
|
3837
4100
|
layer: "_layer_tnds0_1",
|
|
3838
4101
|
backdrop: "_backdrop_tnds0_15",
|
|
3839
4102
|
"backdrop-enter": "_backdrop-enter_tnds0_1",
|
|
@@ -3846,10 +4109,10 @@ var zn = {
|
|
|
3846
4109
|
close: "_close_tnds0_141",
|
|
3847
4110
|
dragHandle: "_dragHandle_tnds0_149",
|
|
3848
4111
|
"sheet-enter": "_sheet-enter_tnds0_1"
|
|
3849
|
-
},
|
|
3850
|
-
function
|
|
4112
|
+
}, rr = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", ir = a({});
|
|
4113
|
+
function ar(e) {
|
|
3851
4114
|
if (e.key !== "Tab") return;
|
|
3852
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
4115
|
+
let t = Array.from(e.currentTarget.querySelectorAll(rr));
|
|
3853
4116
|
if (!t.length) {
|
|
3854
4117
|
e.preventDefault();
|
|
3855
4118
|
return;
|
|
@@ -3857,18 +4120,18 @@ function Hn(e) {
|
|
|
3857
4120
|
let n = t[0], r = t.at(-1);
|
|
3858
4121
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
|
|
3859
4122
|
}
|
|
3860
|
-
var
|
|
3861
|
-
let l = u(
|
|
4123
|
+
var or = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
|
|
4124
|
+
let l = u(ir), p = r ?? l.title, m = i ?? l.description, _ = f(), v = f(), y = h(null), b = h(null), x = h(null), [S, C] = g(0), [w, T] = g(!1), E = Jn((e) => e.closeModal), D = l.requestClose ?? (() => E(a)), O = p != null, k = m != null;
|
|
3862
4125
|
d(() => {
|
|
3863
4126
|
let e = document.activeElement, t = y.current;
|
|
3864
|
-
return (t?.querySelector(
|
|
4127
|
+
return (t?.querySelector(rr) ?? t)?.focus(), () => e?.focus();
|
|
3865
4128
|
}, []);
|
|
3866
4129
|
let A = (e) => {
|
|
3867
4130
|
e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, T(!1), C(0);
|
|
3868
4131
|
};
|
|
3869
4132
|
return /* @__PURE__ */ n("div", {
|
|
3870
4133
|
ref: y,
|
|
3871
|
-
className: `${
|
|
4134
|
+
className: `${nr.panel} ${s}`,
|
|
3872
4135
|
"data-closing": l.closing || void 0,
|
|
3873
4136
|
"data-dragging": w || void 0,
|
|
3874
4137
|
style: { "--ds-modal-drag-offset": `${S}px` },
|
|
@@ -3877,36 +4140,36 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3877
4140
|
"aria-labelledby": O ? _ : void 0,
|
|
3878
4141
|
"aria-describedby": k ? v : void 0,
|
|
3879
4142
|
tabIndex: -1,
|
|
3880
|
-
onKeyDown:
|
|
4143
|
+
onKeyDown: ar,
|
|
3881
4144
|
children: [
|
|
3882
4145
|
/* @__PURE__ */ t("button", {
|
|
3883
4146
|
type: "button",
|
|
3884
|
-
className:
|
|
4147
|
+
className: nr.dragHandle,
|
|
3885
4148
|
"aria-label": "Потяните вниз, чтобы закрыть модальное окно",
|
|
3886
4149
|
onPointerDown: (e) => {
|
|
3887
|
-
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current =
|
|
4150
|
+
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current = $n(e.clientX, e.clientY, e.timeStamp), e.currentTarget.setPointerCapture(e.pointerId));
|
|
3888
4151
|
},
|
|
3889
4152
|
onPointerMove: (e) => {
|
|
3890
4153
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3891
|
-
let t =
|
|
4154
|
+
let t = er(b.current, e.clientX, e.clientY);
|
|
3892
4155
|
b.current.intent === "vertical" && (e.preventDefault(), T(!0), C(t));
|
|
3893
4156
|
},
|
|
3894
4157
|
onPointerUp: (e) => {
|
|
3895
4158
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3896
|
-
let t =
|
|
4159
|
+
let t = tr(b.current, e.clientY, e.timeStamp);
|
|
3897
4160
|
A(e.currentTarget), t && D();
|
|
3898
4161
|
},
|
|
3899
4162
|
onPointerCancel: (e) => A(e.currentTarget),
|
|
3900
4163
|
children: /* @__PURE__ */ t("span", {})
|
|
3901
4164
|
}),
|
|
3902
4165
|
(O || o) && /* @__PURE__ */ n("header", {
|
|
3903
|
-
className:
|
|
4166
|
+
className: nr.header,
|
|
3904
4167
|
children: [O && /* @__PURE__ */ t("h2", {
|
|
3905
4168
|
id: _,
|
|
3906
|
-
className:
|
|
4169
|
+
className: nr.title,
|
|
3907
4170
|
children: p
|
|
3908
|
-
}), /* @__PURE__ */ t(
|
|
3909
|
-
className:
|
|
4171
|
+
}), /* @__PURE__ */ t(B, {
|
|
4172
|
+
className: nr.close,
|
|
3910
4173
|
variant: "empty",
|
|
3911
4174
|
size: "sm",
|
|
3912
4175
|
"aria-label": o,
|
|
@@ -3920,17 +4183,17 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3920
4183
|
}),
|
|
3921
4184
|
k && /* @__PURE__ */ t("p", {
|
|
3922
4185
|
id: v,
|
|
3923
|
-
className:
|
|
4186
|
+
className: nr.description,
|
|
3924
4187
|
children: m
|
|
3925
4188
|
}),
|
|
3926
4189
|
/* @__PURE__ */ t("div", {
|
|
3927
|
-
className:
|
|
4190
|
+
className: nr.content,
|
|
3928
4191
|
children: e
|
|
3929
4192
|
})
|
|
3930
4193
|
]
|
|
3931
4194
|
});
|
|
3932
|
-
},
|
|
3933
|
-
let n =
|
|
4195
|
+
}, sr = ({ registry: e }) => {
|
|
4196
|
+
let n = Jn((e) => e.modals), r = Jn((e) => e.closeModal), [i, a] = g(() => /* @__PURE__ */ new Set()), o = h(/* @__PURE__ */ new Map()), s = (e) => {
|
|
3934
4197
|
if (o.current.has(e)) return;
|
|
3935
4198
|
a((t) => new Set(t).add(e));
|
|
3936
4199
|
let t = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -3946,7 +4209,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3946
4209
|
return () => e.forEach((e) => window.clearTimeout(e));
|
|
3947
4210
|
}, []), d(() => {
|
|
3948
4211
|
let e = (e) => {
|
|
3949
|
-
let t =
|
|
4212
|
+
let t = Jn.getState().modals.at(-1);
|
|
3950
4213
|
e.key === "Escape" && t?.closeOnEscape && s(t.id);
|
|
3951
4214
|
};
|
|
3952
4215
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
@@ -3959,21 +4222,21 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3959
4222
|
n,
|
|
3960
4223
|
e
|
|
3961
4224
|
]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
3962
|
-
className:
|
|
4225
|
+
className: nr.layer,
|
|
3963
4226
|
"aria-label": "Модальные окна",
|
|
3964
4227
|
children: n.map((r, a) => {
|
|
3965
4228
|
let o = e[r.name];
|
|
3966
4229
|
if (!o) return null;
|
|
3967
4230
|
let c = i.has(r.id);
|
|
3968
4231
|
return /* @__PURE__ */ t("div", {
|
|
3969
|
-
className:
|
|
4232
|
+
className: nr.backdrop,
|
|
3970
4233
|
"data-closing": c || void 0,
|
|
3971
4234
|
"aria-hidden": a !== n.length - 1 || void 0,
|
|
3972
4235
|
inert: a !== n.length - 1 || void 0,
|
|
3973
4236
|
onMouseDown: (e) => {
|
|
3974
4237
|
e.target === e.currentTarget && r.closeOnBackdrop && s(r.id);
|
|
3975
4238
|
},
|
|
3976
|
-
children: /* @__PURE__ */ t(
|
|
4239
|
+
children: /* @__PURE__ */ t(ir.Provider, {
|
|
3977
4240
|
value: {
|
|
3978
4241
|
title: r.title ?? r.payload.title,
|
|
3979
4242
|
description: r.description ?? r.payload.description,
|
|
@@ -3990,82 +4253,82 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3990
4253
|
}, r.id);
|
|
3991
4254
|
})
|
|
3992
4255
|
}), document.body);
|
|
3993
|
-
},
|
|
3994
|
-
let o =
|
|
4256
|
+
}, cr = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
|
|
4257
|
+
let o = Jn((e) => e.modals.length);
|
|
3995
4258
|
return d(() => {
|
|
3996
4259
|
if (!a || o === 0) return;
|
|
3997
4260
|
let e = document.body.style.overflow;
|
|
3998
4261
|
return document.body.style.overflow = "hidden", () => {
|
|
3999
4262
|
document.body.style.overflow = e;
|
|
4000
4263
|
};
|
|
4001
|
-
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(
|
|
4002
|
-
},
|
|
4264
|
+
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(sr, { registry: r })] });
|
|
4265
|
+
}, lr = (e) => e, ur = {
|
|
4003
4266
|
message: "_message_c23ie_1",
|
|
4004
4267
|
actions: "_actions_c23ie_13"
|
|
4005
|
-
},
|
|
4268
|
+
}, dr = /* @__PURE__ */ new Map(), fr = 0, pr = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
|
|
4006
4269
|
let u = (e) => {
|
|
4007
|
-
|
|
4270
|
+
dr.get(l)?.(e), dr.delete(l), r();
|
|
4008
4271
|
};
|
|
4009
|
-
return /* @__PURE__ */ n(
|
|
4272
|
+
return /* @__PURE__ */ n(or, {
|
|
4010
4273
|
modalId: e,
|
|
4011
4274
|
title: i,
|
|
4012
4275
|
role: "alertdialog",
|
|
4013
4276
|
children: [/* @__PURE__ */ t("p", {
|
|
4014
|
-
className:
|
|
4277
|
+
className: ur.message,
|
|
4015
4278
|
children: a
|
|
4016
4279
|
}), /* @__PURE__ */ n("div", {
|
|
4017
|
-
className:
|
|
4018
|
-
children: [/* @__PURE__ */ t(
|
|
4280
|
+
className: ur.actions,
|
|
4281
|
+
children: [/* @__PURE__ */ t(B, {
|
|
4019
4282
|
variant: "outline",
|
|
4020
4283
|
onClick: () => u(!1),
|
|
4021
4284
|
children: s
|
|
4022
|
-
}), /* @__PURE__ */ t(
|
|
4285
|
+
}), /* @__PURE__ */ t(B, {
|
|
4023
4286
|
variant: c === "danger" ? "destructive" : "primary",
|
|
4024
4287
|
onClick: () => u(!0),
|
|
4025
4288
|
children: o
|
|
4026
4289
|
})]
|
|
4027
4290
|
})]
|
|
4028
4291
|
});
|
|
4029
|
-
},
|
|
4292
|
+
}, mr = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(or, {
|
|
4030
4293
|
modalId: e,
|
|
4031
4294
|
title: i,
|
|
4032
4295
|
role: "alertdialog",
|
|
4033
4296
|
children: [/* @__PURE__ */ t("p", {
|
|
4034
|
-
className:
|
|
4297
|
+
className: ur.message,
|
|
4035
4298
|
children: a
|
|
4036
4299
|
}), /* @__PURE__ */ t("div", {
|
|
4037
|
-
className:
|
|
4038
|
-
children: /* @__PURE__ */ t(
|
|
4300
|
+
className: ur.actions,
|
|
4301
|
+
children: /* @__PURE__ */ t(B, {
|
|
4039
4302
|
onClick: r,
|
|
4040
4303
|
children: o
|
|
4041
4304
|
})
|
|
4042
4305
|
})]
|
|
4043
|
-
}),
|
|
4044
|
-
ConfirmModal:
|
|
4045
|
-
ErrorModal:
|
|
4046
|
-
}),
|
|
4047
|
-
let e =
|
|
4306
|
+
}), hr = lr({
|
|
4307
|
+
ConfirmModal: pr,
|
|
4308
|
+
ErrorModal: mr
|
|
4309
|
+
}), gr = () => {
|
|
4310
|
+
let e = Jn((e) => e.openModal);
|
|
4048
4311
|
return (t = {}) => new Promise((n) => {
|
|
4049
|
-
|
|
4050
|
-
let r = `confirm-${
|
|
4051
|
-
|
|
4312
|
+
fr += 1;
|
|
4313
|
+
let r = `confirm-${fr}`;
|
|
4314
|
+
dr.set(r, n), e("ConfirmModal", {
|
|
4052
4315
|
...t,
|
|
4053
4316
|
requestId: r
|
|
4054
4317
|
}, {
|
|
4055
4318
|
closeOnEscape: !1,
|
|
4056
4319
|
onClose: () => {
|
|
4057
|
-
|
|
4320
|
+
dr.get(r)?.(!1), dr.delete(r);
|
|
4058
4321
|
}
|
|
4059
4322
|
});
|
|
4060
4323
|
});
|
|
4061
|
-
},
|
|
4062
|
-
let e =
|
|
4324
|
+
}, _r = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", vr = () => {
|
|
4325
|
+
let e = Jn((e) => e.openModal);
|
|
4063
4326
|
return { showError: (t, n) => e("ErrorModal", {
|
|
4064
4327
|
title: n,
|
|
4065
|
-
message:
|
|
4328
|
+
message: _r(t)
|
|
4066
4329
|
}) };
|
|
4067
|
-
},
|
|
4068
|
-
let e =
|
|
4330
|
+
}, yr = S(() => ({})), br = S(() => ({})), xr = () => {
|
|
4331
|
+
let e = Jn((e) => e.modals), t = Jn((e) => e.openModal), n = Jn((e) => e.closeModal), r = Jn((e) => e.closeTopModal), i = Jn((e) => e.closeAllModals), a = l((e, n = {}, r) => t(e, n, r), [t]), o = l((t) => e.some((e) => e.name === t), [e]);
|
|
4069
4332
|
return m(() => ({
|
|
4070
4333
|
openModal: a,
|
|
4071
4334
|
closeModal: n,
|
|
@@ -4081,7 +4344,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4081
4344
|
e.length,
|
|
4082
4345
|
a
|
|
4083
4346
|
]);
|
|
4084
|
-
},
|
|
4347
|
+
}, Sr = {
|
|
4085
4348
|
layer: "_layer_2i8uw_1",
|
|
4086
4349
|
backdrop: "_backdrop_2i8uw_13",
|
|
4087
4350
|
panel: "_panel_2i8uw_27",
|
|
@@ -4101,16 +4364,16 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4101
4364
|
"enter-right": "_enter-right_2i8uw_1",
|
|
4102
4365
|
"enter-left": "_enter-left_2i8uw_1",
|
|
4103
4366
|
"enter-bottom": "_enter-bottom_2i8uw_1"
|
|
4104
|
-
},
|
|
4367
|
+
}, Cr = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", wr = a(null), Tr = (e) => {
|
|
4105
4368
|
if (e.key !== "Tab") return;
|
|
4106
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
4369
|
+
let t = Array.from(e.currentTarget.querySelectorAll(Cr));
|
|
4107
4370
|
if (!t.length) {
|
|
4108
4371
|
e.preventDefault();
|
|
4109
4372
|
return;
|
|
4110
4373
|
}
|
|
4111
4374
|
let n = t[0], r = t.at(-1);
|
|
4112
4375
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
4113
|
-
},
|
|
4376
|
+
}, Er = () => u(wr), Dr = ({ open: e, onCloseRequest: r, children: i, title: a, description: o, headerActions: s, footer: c, placement: l = "right", size: u = "md", closeOnEscape: p = !0, closeOnBackdrop: m = !0, preventClose: g = !1, closeLabel: v = "Закрыть", initialFocusRef: y, returnFocusRef: b, className: x = "" }) => {
|
|
4114
4377
|
let S = h(null), C = f(), w = f(), T = (e) => {
|
|
4115
4378
|
g || r(e);
|
|
4116
4379
|
};
|
|
@@ -4119,7 +4382,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4119
4382
|
let t = document.activeElement, n = b?.current, i = document.body.style.overflow;
|
|
4120
4383
|
document.body.style.overflow = "hidden";
|
|
4121
4384
|
let a = S.current;
|
|
4122
|
-
(y?.current ?? a?.querySelector(
|
|
4385
|
+
(y?.current ?? a?.querySelector(Cr) ?? a)?.focus();
|
|
4123
4386
|
let o = (e) => {
|
|
4124
4387
|
e.key === "Escape" && p && !g && r("escape");
|
|
4125
4388
|
};
|
|
@@ -4134,29 +4397,29 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4134
4397
|
g,
|
|
4135
4398
|
b
|
|
4136
4399
|
]), !e || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
4137
|
-
className:
|
|
4400
|
+
className: Sr.layer,
|
|
4138
4401
|
children: /* @__PURE__ */ t("div", {
|
|
4139
|
-
className:
|
|
4402
|
+
className: Sr.backdrop,
|
|
4140
4403
|
onMouseDown: (e) => {
|
|
4141
4404
|
e.target === e.currentTarget && m && T("backdrop");
|
|
4142
4405
|
},
|
|
4143
|
-
children: /* @__PURE__ */ t(
|
|
4406
|
+
children: /* @__PURE__ */ t(wr.Provider, {
|
|
4144
4407
|
value: { requestClose: T },
|
|
4145
4408
|
children: /* @__PURE__ */ n("section", {
|
|
4146
4409
|
ref: S,
|
|
4147
|
-
className: `${
|
|
4410
|
+
className: `${Sr.panel} ${Sr[l]} ${Sr[u]} ${x}`,
|
|
4148
4411
|
role: "dialog",
|
|
4149
4412
|
"aria-modal": "true",
|
|
4150
4413
|
"aria-labelledby": a ? C : void 0,
|
|
4151
4414
|
"aria-describedby": o ? w : void 0,
|
|
4152
4415
|
tabIndex: -1,
|
|
4153
|
-
onKeyDown:
|
|
4416
|
+
onKeyDown: Tr,
|
|
4154
4417
|
children: [
|
|
4155
4418
|
/* @__PURE__ */ n("header", {
|
|
4156
|
-
className:
|
|
4419
|
+
className: Sr.header,
|
|
4157
4420
|
children: [
|
|
4158
4421
|
/* @__PURE__ */ n("div", {
|
|
4159
|
-
className:
|
|
4422
|
+
className: Sr.heading,
|
|
4160
4423
|
children: [a && /* @__PURE__ */ t("h2", {
|
|
4161
4424
|
id: C,
|
|
4162
4425
|
children: a
|
|
@@ -4166,10 +4429,10 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4166
4429
|
})]
|
|
4167
4430
|
}),
|
|
4168
4431
|
s && /* @__PURE__ */ t("div", {
|
|
4169
|
-
className:
|
|
4432
|
+
className: Sr.headerActions,
|
|
4170
4433
|
children: s
|
|
4171
4434
|
}),
|
|
4172
|
-
/* @__PURE__ */ t(
|
|
4435
|
+
/* @__PURE__ */ t(B, {
|
|
4173
4436
|
variant: "empty",
|
|
4174
4437
|
size: "sm",
|
|
4175
4438
|
"aria-label": v,
|
|
@@ -4184,11 +4447,11 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4184
4447
|
]
|
|
4185
4448
|
}),
|
|
4186
4449
|
/* @__PURE__ */ t("div", {
|
|
4187
|
-
className:
|
|
4450
|
+
className: Sr.content,
|
|
4188
4451
|
children: i
|
|
4189
4452
|
}),
|
|
4190
4453
|
c && /* @__PURE__ */ t("footer", {
|
|
4191
|
-
className:
|
|
4454
|
+
className: Sr.footer,
|
|
4192
4455
|
children: c
|
|
4193
4456
|
})
|
|
4194
4457
|
]
|
|
@@ -4196,17 +4459,17 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4196
4459
|
})
|
|
4197
4460
|
})
|
|
4198
4461
|
}), document.body);
|
|
4199
|
-
},
|
|
4462
|
+
}, Or = ({ placement: e = "right", ...n }) => /* @__PURE__ */ t(Dr, {
|
|
4200
4463
|
...n,
|
|
4201
4464
|
placement: e
|
|
4202
|
-
}),
|
|
4465
|
+
}), kr = (e) => /* @__PURE__ */ t(Dr, {
|
|
4203
4466
|
...e,
|
|
4204
4467
|
placement: "bottom"
|
|
4205
|
-
}),
|
|
4468
|
+
}), Ar = (e) => /* @__PURE__ */ t(Dr, {
|
|
4206
4469
|
...e,
|
|
4207
4470
|
placement: "fullscreen",
|
|
4208
4471
|
size: "xl"
|
|
4209
|
-
}),
|
|
4472
|
+
}), jr = {
|
|
4210
4473
|
wrapper: "_wrapper_hpk6i_1",
|
|
4211
4474
|
container: "_container_hpk6i_15",
|
|
4212
4475
|
inner: "_inner_hpk6i_35",
|
|
@@ -4221,29 +4484,29 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4221
4484
|
empty: "_empty_hpk6i_153",
|
|
4222
4485
|
destructive: "_destructive_hpk6i_161",
|
|
4223
4486
|
destructiveOutline: "_destructiveOutline_hpk6i_169"
|
|
4224
|
-
},
|
|
4225
|
-
className:
|
|
4487
|
+
}, Mr = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
|
|
4488
|
+
className: jr.wrapper,
|
|
4226
4489
|
children: /* @__PURE__ */ t("div", {
|
|
4227
|
-
className:
|
|
4490
|
+
className: jr.container,
|
|
4228
4491
|
children: /* @__PURE__ */ n("div", {
|
|
4229
|
-
className:
|
|
4492
|
+
className: jr.inner,
|
|
4230
4493
|
children: [
|
|
4231
4494
|
/* @__PURE__ */ t("div", {
|
|
4232
|
-
className:
|
|
4233
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4495
|
+
className: jr.cube,
|
|
4496
|
+
children: /* @__PURE__ */ t("div", { className: `${jr.cube__inner} ${jr[e]}` })
|
|
4234
4497
|
}),
|
|
4235
4498
|
/* @__PURE__ */ t("div", {
|
|
4236
|
-
className:
|
|
4237
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4499
|
+
className: jr.cube,
|
|
4500
|
+
children: /* @__PURE__ */ t("div", { className: `${jr.cube__inner} ${jr[e]}` })
|
|
4238
4501
|
}),
|
|
4239
4502
|
/* @__PURE__ */ t("div", {
|
|
4240
|
-
className:
|
|
4241
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4503
|
+
className: jr.cube,
|
|
4504
|
+
children: /* @__PURE__ */ t("div", { className: `${jr.cube__inner} ${jr[e]}` })
|
|
4242
4505
|
})
|
|
4243
4506
|
]
|
|
4244
4507
|
})
|
|
4245
4508
|
})
|
|
4246
|
-
}),
|
|
4509
|
+
}), Nr = {
|
|
4247
4510
|
viewport: "_viewport_22b73_1",
|
|
4248
4511
|
"top-right": "_top-right_22b73_21",
|
|
4249
4512
|
"top-left": "_top-left_22b73_31",
|
|
@@ -4259,12 +4522,12 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4259
4522
|
success: "_success_22b73_195",
|
|
4260
4523
|
warning: "_warning_22b73_203",
|
|
4261
4524
|
error: "_error_22b73_211"
|
|
4262
|
-
},
|
|
4525
|
+
}, Pr = {
|
|
4263
4526
|
info: "IconInfoCircle",
|
|
4264
4527
|
success: "IconSuccessCircle",
|
|
4265
4528
|
warning: "IconWarning",
|
|
4266
4529
|
error: "IconWarning"
|
|
4267
|
-
},
|
|
4530
|
+
}, Fr = ({ toast: e, onClose: r }) => {
|
|
4268
4531
|
let [i, a] = g(!1), [o, s] = g(() => typeof document < "u" && document.hidden), c = h(e.duration), l = h(Date.now());
|
|
4269
4532
|
return d(() => {
|
|
4270
4533
|
if (i || o || e.duration <= 0) return;
|
|
@@ -4284,7 +4547,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4284
4547
|
let e = () => s(document.hidden);
|
|
4285
4548
|
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
4286
4549
|
}, []), /* @__PURE__ */ n("article", {
|
|
4287
|
-
className: `${
|
|
4550
|
+
className: `${Nr.toast} ${Nr[e.variant]}`,
|
|
4288
4551
|
role: e.variant === "error" ? "alert" : "status",
|
|
4289
4552
|
"aria-live": e.variant === "error" ? "assertive" : "polite",
|
|
4290
4553
|
onMouseEnter: () => a(!0),
|
|
@@ -4293,27 +4556,27 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4293
4556
|
onBlur: () => a(!1),
|
|
4294
4557
|
children: [
|
|
4295
4558
|
/* @__PURE__ */ t("div", {
|
|
4296
|
-
className:
|
|
4559
|
+
className: Nr.icon,
|
|
4297
4560
|
"aria-hidden": "true",
|
|
4298
4561
|
children: /* @__PURE__ */ t(J, {
|
|
4299
|
-
name:
|
|
4562
|
+
name: Pr[e.variant],
|
|
4300
4563
|
color: "var(--ds-toast-accent)",
|
|
4301
4564
|
width: 20,
|
|
4302
4565
|
height: 20
|
|
4303
4566
|
})
|
|
4304
4567
|
}),
|
|
4305
4568
|
/* @__PURE__ */ n("div", {
|
|
4306
|
-
className:
|
|
4569
|
+
className: Nr.body,
|
|
4307
4570
|
children: [
|
|
4308
4571
|
e.title && /* @__PURE__ */ t("strong", {
|
|
4309
|
-
className:
|
|
4572
|
+
className: Nr.title,
|
|
4310
4573
|
children: e.title
|
|
4311
4574
|
}),
|
|
4312
4575
|
/* @__PURE__ */ t("div", {
|
|
4313
|
-
className:
|
|
4576
|
+
className: Nr.message,
|
|
4314
4577
|
children: e.message
|
|
4315
4578
|
}),
|
|
4316
|
-
e.action && /* @__PURE__ */ t(
|
|
4579
|
+
e.action && /* @__PURE__ */ t(B, {
|
|
4317
4580
|
variant: "empty",
|
|
4318
4581
|
size: "sm",
|
|
4319
4582
|
onClick: () => {
|
|
@@ -4323,7 +4586,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4323
4586
|
})
|
|
4324
4587
|
]
|
|
4325
4588
|
}),
|
|
4326
|
-
e.closable && /* @__PURE__ */ t(
|
|
4589
|
+
e.closable && /* @__PURE__ */ t(B, {
|
|
4327
4590
|
variant: "empty",
|
|
4328
4591
|
size: "sm",
|
|
4329
4592
|
"aria-label": "Закрыть уведомление",
|
|
@@ -4336,15 +4599,15 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4336
4599
|
})
|
|
4337
4600
|
]
|
|
4338
4601
|
});
|
|
4339
|
-
},
|
|
4602
|
+
}, Ir = 0, Lr = S((e, t) => ({
|
|
4340
4603
|
toasts: [],
|
|
4341
4604
|
showToast: (n) => {
|
|
4342
4605
|
if (n.dedupeKey) {
|
|
4343
4606
|
let e = t().toasts.find((e) => e.dedupeKey === n.dedupeKey);
|
|
4344
4607
|
if (e) return e.id;
|
|
4345
4608
|
}
|
|
4346
|
-
|
|
4347
|
-
let r = `ds-toast-${
|
|
4609
|
+
Ir += 1;
|
|
4610
|
+
let r = `ds-toast-${Ir}`;
|
|
4348
4611
|
return e((e) => ({ toasts: [...e.toasts, {
|
|
4349
4612
|
variant: "info",
|
|
4350
4613
|
duration: 5e3,
|
|
@@ -4355,18 +4618,18 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4355
4618
|
},
|
|
4356
4619
|
removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
|
|
4357
4620
|
clearToasts: () => e({ toasts: [] })
|
|
4358
|
-
})),
|
|
4359
|
-
let r =
|
|
4621
|
+
})), Rr = () => Lr.setState({ toasts: [] }), zr = ({ position: e = "top-right", maxVisible: n }) => {
|
|
4622
|
+
let r = Lr((e) => e.toasts), i = Lr((e) => e.removeToast), a = n === void 0 ? r : r.slice(0, Math.max(0, Math.floor(n)));
|
|
4360
4623
|
return /* @__PURE__ */ t("div", {
|
|
4361
|
-
className: `${
|
|
4624
|
+
className: `${Nr.viewport} ${Nr[e]}`,
|
|
4362
4625
|
"aria-label": "Уведомления",
|
|
4363
|
-
children: a.map((e) => /* @__PURE__ */ t(
|
|
4626
|
+
children: a.map((e) => /* @__PURE__ */ t(Fr, {
|
|
4364
4627
|
toast: e,
|
|
4365
4628
|
onClose: i
|
|
4366
4629
|
}, e.id))
|
|
4367
4630
|
});
|
|
4368
|
-
},
|
|
4369
|
-
let e =
|
|
4631
|
+
}, Br = () => {
|
|
4632
|
+
let e = Lr((e) => e.showToast), t = Lr((e) => e.removeToast), n = Lr((e) => e.clearToasts), r = l((t) => e({
|
|
4370
4633
|
...t,
|
|
4371
4634
|
variant: "info"
|
|
4372
4635
|
}), [e]), i = l((t) => e({
|
|
@@ -4396,96 +4659,13 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4396
4659
|
i,
|
|
4397
4660
|
a
|
|
4398
4661
|
]);
|
|
4399
|
-
},
|
|
4400
|
-
root: "_root_1pa4z_1",
|
|
4401
|
-
tooltip: "_tooltip_1pa4z_11",
|
|
4402
|
-
"ds-tooltip-in": "_ds-tooltip-in_1pa4z_1"
|
|
4403
|
-
}, Tr = 8, Er = 16, Dr = {
|
|
4404
|
-
top: "bottom",
|
|
4405
|
-
right: "left",
|
|
4406
|
-
bottom: "top",
|
|
4407
|
-
left: "right"
|
|
4408
|
-
}, Or = (e, t, n) => e === "top" ? t.top >= n.height + Tr + Er : e === "bottom" ? window.innerHeight - t.bottom >= n.height + Tr + Er : e === "left" ? t.left >= n.width + Tr + Er : window.innerWidth - t.right >= n.width + Tr + Er, kr = (e, t, n) => {
|
|
4409
|
-
if (!(t.bottom > 0 && t.right > 0 && t.top < window.innerHeight && t.left < window.innerWidth)) return null;
|
|
4410
|
-
let r = Or(e, t, n) ? e : Or(Dr[e], t, n) ? Dr[e] : e, i = t.left + (t.width - n.width) / 2, a = t.top + (t.height - n.height) / 2;
|
|
4411
|
-
return r === "top" && (a = t.top - n.height - Tr), r === "bottom" && (a = t.bottom + Tr), r === "left" && (i = t.left - n.width - Tr), r === "right" && (i = t.right + Tr), i = Math.min(Math.max(i, Er), Math.max(Er, window.innerWidth - n.width - Er)), a = Math.min(Math.max(a, Er), Math.max(Er, window.innerHeight - n.height - Er)), {
|
|
4412
|
-
left: i,
|
|
4413
|
-
top: a,
|
|
4414
|
-
visibility: "visible"
|
|
4415
|
-
};
|
|
4416
|
-
}, Ar = ({ content: e, children: r, placement: a = "top", delay: o = 450, disabled: s = !1, maxWidth: u = 280, className: p = "" }) => {
|
|
4417
|
-
let m = f(), [_, v] = g(!1), [y, b] = g({ visibility: "hidden" }), [x, S] = g(null), C = h(null), w = h(null), T = l(() => {
|
|
4418
|
-
C.current && clearTimeout(C.current), C.current = null, v(!1);
|
|
4419
|
-
}, []), E = l(() => {
|
|
4420
|
-
s || !e || (C.current && clearTimeout(C.current), C.current = setTimeout(() => v(!0), o));
|
|
4421
|
-
}, [
|
|
4422
|
-
e,
|
|
4423
|
-
o,
|
|
4424
|
-
s
|
|
4425
|
-
]);
|
|
4426
|
-
if (d(() => {
|
|
4427
|
-
if (!_) {
|
|
4428
|
-
b({ visibility: "hidden" });
|
|
4429
|
-
return;
|
|
4430
|
-
}
|
|
4431
|
-
let e = () => {
|
|
4432
|
-
let e = w.current;
|
|
4433
|
-
if (!e || !x) return;
|
|
4434
|
-
let t = kr(a, e.getBoundingClientRect(), x.getBoundingClientRect());
|
|
4435
|
-
if (!t) {
|
|
4436
|
-
T();
|
|
4437
|
-
return;
|
|
4438
|
-
}
|
|
4439
|
-
b(t);
|
|
4440
|
-
};
|
|
4441
|
-
e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0);
|
|
4442
|
-
let t = typeof ResizeObserver > "u" ? null : new ResizeObserver(e);
|
|
4443
|
-
return w.current && t?.observe(w.current), x && t?.observe(x), () => {
|
|
4444
|
-
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0), t?.disconnect();
|
|
4445
|
-
};
|
|
4446
|
-
}, [
|
|
4447
|
-
T,
|
|
4448
|
-
_,
|
|
4449
|
-
a,
|
|
4450
|
-
x
|
|
4451
|
-
]), d(() => {
|
|
4452
|
-
let e = (e) => {
|
|
4453
|
-
e.key === "Escape" && T();
|
|
4454
|
-
};
|
|
4455
|
-
return document.addEventListener("keydown", e), () => {
|
|
4456
|
-
document.removeEventListener("keydown", e), C.current && clearTimeout(C.current);
|
|
4457
|
-
};
|
|
4458
|
-
}, [T]), !c(r)) return r;
|
|
4459
|
-
let D = {
|
|
4460
|
-
...y,
|
|
4461
|
-
"--ds-tooltip-max-width": typeof u == "number" ? `${u}px` : u
|
|
4462
|
-
}, O = i(r, {
|
|
4463
|
-
"aria-describedby": _ ? m : void 0,
|
|
4464
|
-
onMouseEnter: E,
|
|
4465
|
-
onMouseLeave: T,
|
|
4466
|
-
onFocus: E,
|
|
4467
|
-
onBlur: T
|
|
4468
|
-
});
|
|
4469
|
-
return /* @__PURE__ */ n("span", {
|
|
4470
|
-
ref: w,
|
|
4471
|
-
className: `${wr.root} ${p}`,
|
|
4472
|
-
onPointerDown: _ ? T : E,
|
|
4473
|
-
children: [O, _ && /* @__PURE__ */ t(Cn, { children: /* @__PURE__ */ t("span", {
|
|
4474
|
-
ref: S,
|
|
4475
|
-
id: m,
|
|
4476
|
-
role: "tooltip",
|
|
4477
|
-
className: wr.tooltip,
|
|
4478
|
-
style: D,
|
|
4479
|
-
children: e
|
|
4480
|
-
}) })]
|
|
4481
|
-
});
|
|
4482
|
-
}, jr = {
|
|
4662
|
+
}, Vr = {
|
|
4483
4663
|
root: "_root_bs28m_1",
|
|
4484
4664
|
tabList: "_tabList_bs28m_11",
|
|
4485
4665
|
tab: "_tab_bs28m_11",
|
|
4486
4666
|
panels: "_panels_bs28m_127",
|
|
4487
4667
|
panel: "_panel_bs28m_127"
|
|
4488
|
-
},
|
|
4668
|
+
}, Hr = ({ items: e, value: r, onChange: i, ariaLabel: a = "Вкладки", disabled: o = !1, loading: s = !1, className: c = "" }) => {
|
|
4489
4669
|
let l = `ds-tabs-${f().replace(/:/g, "")}`, u = h([]), d = o || s, p = e.findIndex((e) => e.id === r), m = e.findIndex((e) => !e.disabled), g = p >= 0 && !e[p]?.disabled ? p : m, _ = (t) => {
|
|
4490
4670
|
let n = e[t];
|
|
4491
4671
|
!n || n.disabled || d || (i(n.id), u.current[t]?.focus(), u.current[t]?.scrollIntoView({
|
|
@@ -4515,10 +4695,10 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4515
4695
|
t.preventDefault(), _(a);
|
|
4516
4696
|
};
|
|
4517
4697
|
return /* @__PURE__ */ n("div", {
|
|
4518
|
-
className: `${
|
|
4698
|
+
className: `${Vr.root} ${c}`,
|
|
4519
4699
|
"aria-busy": s || void 0,
|
|
4520
4700
|
children: [/* @__PURE__ */ t("div", {
|
|
4521
|
-
className:
|
|
4701
|
+
className: Vr.tabList,
|
|
4522
4702
|
role: "tablist",
|
|
4523
4703
|
"aria-label": a,
|
|
4524
4704
|
"aria-orientation": "horizontal",
|
|
@@ -4530,7 +4710,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4530
4710
|
u.current[n] = e;
|
|
4531
4711
|
},
|
|
4532
4712
|
id: a,
|
|
4533
|
-
className:
|
|
4713
|
+
className: Vr.tab,
|
|
4534
4714
|
type: "button",
|
|
4535
4715
|
role: "tab",
|
|
4536
4716
|
"aria-selected": i,
|
|
@@ -4543,12 +4723,12 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4543
4723
|
}, e.id);
|
|
4544
4724
|
})
|
|
4545
4725
|
}), /* @__PURE__ */ t("div", {
|
|
4546
|
-
className:
|
|
4726
|
+
className: Vr.panels,
|
|
4547
4727
|
children: e.map((e, n) => {
|
|
4548
4728
|
let i = e.id === r;
|
|
4549
4729
|
return /* @__PURE__ */ t("div", {
|
|
4550
4730
|
id: `${l}-panel-${n}`,
|
|
4551
|
-
className:
|
|
4731
|
+
className: Vr.panel,
|
|
4552
4732
|
role: "tabpanel",
|
|
4553
4733
|
"aria-labelledby": `${l}-tab-${n}`,
|
|
4554
4734
|
tabIndex: 0,
|
|
@@ -4558,7 +4738,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4558
4738
|
})
|
|
4559
4739
|
})]
|
|
4560
4740
|
});
|
|
4561
|
-
},
|
|
4741
|
+
}, Ur = (e) => {
|
|
4562
4742
|
if (!Number.isFinite(e) || e < 0) return "00:00";
|
|
4563
4743
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = `${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
|
|
4564
4744
|
return n ? `${n}:${a}` : a;
|
|
@@ -4591,24 +4771,24 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4591
4771
|
settingsActionLabel: "_settingsActionLabel_m0ykf_693",
|
|
4592
4772
|
caption: "_caption_m0ykf_705",
|
|
4593
4773
|
fullscreen: "_fullscreen_m0ykf_719"
|
|
4594
|
-
},
|
|
4774
|
+
}, Wr = 2500, Gr = 5, Kr = .05, qr = [
|
|
4595
4775
|
.5,
|
|
4596
4776
|
.75,
|
|
4597
4777
|
1,
|
|
4598
4778
|
1.25,
|
|
4599
4779
|
1.5,
|
|
4600
4780
|
2
|
|
4601
|
-
],
|
|
4602
|
-
let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, w] = g(!1), [T, E] = g(r.length > 0), [D, O] = g(!1), [k, A] = g(!1), [j, M] = g(!1), [N, P] = g(0), [F, I] = g(0), [L, R] = g(0), [z,
|
|
4781
|
+
], Jr = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: s = "contain", loading: c = !1, error: u, fallback: f, className: p = "", controls: m = !0, playsInline: _ = !0, ...v }) => {
|
|
4782
|
+
let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, w] = g(!1), [T, E] = g(r.length > 0), [D, O] = g(!1), [k, A] = g(!1), [j, M] = g(!1), [N, P] = g(0), [F, I] = g(0), [L, R] = g(0), [z, te] = g(1), [V, ne] = g(!!v.muted), [H, U] = g(1), [W, re] = g(!!v.loop), [ie, ae] = g(-1), [oe, se] = g(!1), [ce, G] = g(!0), [le, ue] = g(!1), [de, fe] = g(!1), pe = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), me = i.map((e, t) => ({
|
|
4603
4783
|
track: e,
|
|
4604
4784
|
index: t
|
|
4605
|
-
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"),
|
|
4606
|
-
|
|
4785
|
+
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), he = u ?? (C ? "Не удалось воспроизвести видео" : void 0), ge = c || T && !he && r.length > 0, K = !ge && !he && r.length === 0, _e = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, ve = l(() => {
|
|
4786
|
+
G(!0), window.clearTimeout(S.current), k && !oe && (S.current = window.setTimeout(() => G(!1), Wr));
|
|
4607
4787
|
}, [k, oe]);
|
|
4608
4788
|
d(() => {
|
|
4609
4789
|
w(!1), E(r.length > 0), O(!1), A(!1), M(!1), P(0), I(0), R(0);
|
|
4610
4790
|
}, [pe, r.length]), d(() => (ve(), () => window.clearTimeout(S.current)), [ve]), d(() => {
|
|
4611
|
-
let e = () =>
|
|
4791
|
+
let e = () => ue(document.fullscreenElement === b.current), t = () => fe(document.pictureInPictureElement === x.current);
|
|
4612
4792
|
return document.addEventListener("fullscreenchange", e), document.addEventListener("enterpictureinpicture", t), document.addEventListener("leavepictureinpicture", t), () => {
|
|
4613
4793
|
document.removeEventListener("fullscreenchange", e), document.removeEventListener("enterpictureinpicture", t), document.removeEventListener("leavepictureinpicture", t);
|
|
4614
4794
|
};
|
|
@@ -4621,7 +4801,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4621
4801
|
}, [oe]);
|
|
4622
4802
|
let ye = async () => {
|
|
4623
4803
|
let e = x.current;
|
|
4624
|
-
if (!(!e ||
|
|
4804
|
+
if (!(!e || he || ge)) {
|
|
4625
4805
|
if (e.paused || e.ended) {
|
|
4626
4806
|
e.ended && (e.currentTime = 0);
|
|
4627
4807
|
try {
|
|
@@ -4644,7 +4824,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4644
4824
|
if (b.current) try {
|
|
4645
4825
|
document.fullscreenElement ? await document.exitFullscreen() : await b.current.requestFullscreen();
|
|
4646
4826
|
} catch {
|
|
4647
|
-
|
|
4827
|
+
ue(!1);
|
|
4648
4828
|
}
|
|
4649
4829
|
}, we = async () => {
|
|
4650
4830
|
let e = x.current;
|
|
@@ -4662,7 +4842,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4662
4842
|
let t = e.target;
|
|
4663
4843
|
if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
|
|
4664
4844
|
let n = e.key.toLowerCase();
|
|
4665
|
-
n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), be()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" && me.length ? (e.preventDefault(), Te(ie === -1 ? me[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Se(N + (e.key === "ArrowRight" ?
|
|
4845
|
+
n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), be()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" && me.length ? (e.preventDefault(), Te(ie === -1 ? me[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Se(N + (e.key === "ArrowRight" ? Gr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), xe(z + (e.key === "ArrowUp" ? Kr : -.05))) : e.key === "Escape" && se(!1), ve();
|
|
4666
4846
|
}, De = () => {
|
|
4667
4847
|
let e = x.current;
|
|
4668
4848
|
w(!1), E(!0), e?.load();
|
|
@@ -4676,15 +4856,15 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4676
4856
|
onKeyDown: Ee,
|
|
4677
4857
|
children: [/* @__PURE__ */ n("div", {
|
|
4678
4858
|
ref: b,
|
|
4679
|
-
className: `${$.frame} ${
|
|
4859
|
+
className: `${$.frame} ${le ? $.fullscreen : ""}`,
|
|
4680
4860
|
style: { aspectRatio: o },
|
|
4681
|
-
"aria-busy":
|
|
4861
|
+
"aria-busy": ge || void 0,
|
|
4682
4862
|
tabIndex: m && r.length ? 0 : void 0,
|
|
4683
4863
|
onPointerMove: ve,
|
|
4684
4864
|
onPointerDown: ve,
|
|
4685
4865
|
onFocusCapture: ve,
|
|
4686
4866
|
onMouseLeave: () => {
|
|
4687
|
-
k && !oe &&
|
|
4867
|
+
k && !oe && G(!1);
|
|
4688
4868
|
},
|
|
4689
4869
|
children: [
|
|
4690
4870
|
r.length > 0 && /* @__PURE__ */ n("video", {
|
|
@@ -4693,7 +4873,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4693
4873
|
"aria-label": a,
|
|
4694
4874
|
controls: !1,
|
|
4695
4875
|
playsInline: _,
|
|
4696
|
-
loop:
|
|
4876
|
+
loop: W,
|
|
4697
4877
|
className: $.video,
|
|
4698
4878
|
style: { objectFit: s },
|
|
4699
4879
|
onClick: (e) => {
|
|
@@ -4739,20 +4919,20 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4739
4919
|
A(!1), v.onPause?.(e);
|
|
4740
4920
|
},
|
|
4741
4921
|
onEnded: (e) => {
|
|
4742
|
-
A(!1), M(!0),
|
|
4922
|
+
A(!1), M(!0), G(!0), v.onEnded?.(e);
|
|
4743
4923
|
},
|
|
4744
4924
|
onVolumeChange: (e) => {
|
|
4745
|
-
|
|
4925
|
+
te(e.currentTarget.volume), ne(e.currentTarget.muted), v.onVolumeChange?.(e);
|
|
4746
4926
|
},
|
|
4747
4927
|
onRateChange: (e) => {
|
|
4748
|
-
|
|
4928
|
+
U(e.currentTarget.playbackRate), v.onRateChange?.(e);
|
|
4749
4929
|
},
|
|
4750
4930
|
onError: (e) => {
|
|
4751
4931
|
E(!1), O(!1), w(!0), v.onError?.(e);
|
|
4752
4932
|
},
|
|
4753
4933
|
children: [r.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), i.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
|
|
4754
4934
|
}),
|
|
4755
|
-
|
|
4935
|
+
ge && /* @__PURE__ */ n("div", {
|
|
4756
4936
|
className: $.overlay,
|
|
4757
4937
|
role: "status",
|
|
4758
4938
|
"aria-live": "polite",
|
|
@@ -4761,17 +4941,17 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4761
4941
|
"aria-hidden": "true",
|
|
4762
4942
|
children: /* @__PURE__ */ t("div", {
|
|
4763
4943
|
className: $.loaderScale,
|
|
4764
|
-
children: /* @__PURE__ */ t(
|
|
4944
|
+
children: /* @__PURE__ */ t(Mr, {})
|
|
4765
4945
|
})
|
|
4766
4946
|
}), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
|
|
4767
4947
|
}),
|
|
4768
|
-
!
|
|
4948
|
+
!ge && D && !he && /* @__PURE__ */ t("div", {
|
|
4769
4949
|
className: $.buffering,
|
|
4770
4950
|
role: "status",
|
|
4771
4951
|
"aria-label": "Буферизация видео",
|
|
4772
4952
|
children: /* @__PURE__ */ t(ee, { variant: "primary" })
|
|
4773
4953
|
}),
|
|
4774
|
-
|
|
4954
|
+
K && /* @__PURE__ */ n("div", {
|
|
4775
4955
|
className: `${$.state} ${$.empty}`,
|
|
4776
4956
|
role: "status",
|
|
4777
4957
|
children: [
|
|
@@ -4785,7 +4965,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4785
4965
|
f ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
|
|
4786
4966
|
]
|
|
4787
4967
|
}),
|
|
4788
|
-
!
|
|
4968
|
+
!ge && he && /* @__PURE__ */ n("div", {
|
|
4789
4969
|
className: `${$.state} ${$.error}`,
|
|
4790
4970
|
role: "alert",
|
|
4791
4971
|
children: [
|
|
@@ -4795,8 +4975,8 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4795
4975
|
width: 40,
|
|
4796
4976
|
height: 40
|
|
4797
4977
|
}),
|
|
4798
|
-
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children:
|
|
4799
|
-
r.length > 0 && /* @__PURE__ */ t(
|
|
4978
|
+
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: he })] }),
|
|
4979
|
+
r.length > 0 && /* @__PURE__ */ t(B, {
|
|
4800
4980
|
size: "sm",
|
|
4801
4981
|
variant: "secondary",
|
|
4802
4982
|
onClick: De,
|
|
@@ -4804,7 +4984,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4804
4984
|
})
|
|
4805
4985
|
]
|
|
4806
4986
|
}),
|
|
4807
|
-
!
|
|
4987
|
+
!ge && !he && j && /* @__PURE__ */ t("button", {
|
|
4808
4988
|
type: "button",
|
|
4809
4989
|
className: $.replay,
|
|
4810
4990
|
"aria-label": "Воспроизвести заново",
|
|
@@ -4815,7 +4995,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4815
4995
|
height: 28
|
|
4816
4996
|
})
|
|
4817
4997
|
}),
|
|
4818
|
-
m && r.length > 0 && !
|
|
4998
|
+
m && r.length > 0 && !ge && !he && /* @__PURE__ */ n("div", {
|
|
4819
4999
|
className: `${$.controlsLayer} ${ce || !k ? $.controlsVisible : ""}`,
|
|
4820
5000
|
onClick: (e) => e.stopPropagation(),
|
|
4821
5001
|
children: [oe && /* @__PURE__ */ n("div", {
|
|
@@ -4824,12 +5004,12 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4824
5004
|
"aria-label": "Настройки видео",
|
|
4825
5005
|
children: [
|
|
4826
5006
|
/* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Скорость" }), /* @__PURE__ */ t("select", {
|
|
4827
|
-
value:
|
|
5007
|
+
value: H,
|
|
4828
5008
|
onChange: (e) => {
|
|
4829
5009
|
let t = Number(e.target.value);
|
|
4830
5010
|
x.current && (x.current.playbackRate = t);
|
|
4831
5011
|
},
|
|
4832
|
-
children:
|
|
5012
|
+
children: qr.map((e) => /* @__PURE__ */ n("option", {
|
|
4833
5013
|
value: e,
|
|
4834
5014
|
children: [e, "×"]
|
|
4835
5015
|
}, e))
|
|
@@ -4848,9 +5028,9 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4848
5028
|
/* @__PURE__ */ n("button", {
|
|
4849
5029
|
type: "button",
|
|
4850
5030
|
className: $.settingsAction,
|
|
4851
|
-
"aria-pressed":
|
|
5031
|
+
"aria-pressed": W,
|
|
4852
5032
|
onClick: () => re((e) => !e),
|
|
4853
|
-
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children:
|
|
5033
|
+
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: W ? "Вкл." : "Выкл." })]
|
|
4854
5034
|
}),
|
|
4855
5035
|
_e && /* @__PURE__ */ t("button", {
|
|
4856
5036
|
type: "button",
|
|
@@ -4890,12 +5070,12 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4890
5070
|
children: [/* @__PURE__ */ t("button", {
|
|
4891
5071
|
type: "button",
|
|
4892
5072
|
className: $.controlButton,
|
|
4893
|
-
"aria-label":
|
|
4894
|
-
"aria-pressed":
|
|
5073
|
+
"aria-label": V ? "Включить звук" : "Выключить звук",
|
|
5074
|
+
"aria-pressed": V,
|
|
4895
5075
|
title: "Звук (M)",
|
|
4896
5076
|
onClick: be,
|
|
4897
5077
|
children: /* @__PURE__ */ t(J, {
|
|
4898
|
-
name:
|
|
5078
|
+
name: V || z === 0 ? "IconVolumeMuted" : "IconVolume",
|
|
4899
5079
|
width: 22,
|
|
4900
5080
|
height: 22
|
|
4901
5081
|
})
|
|
@@ -4905,9 +5085,9 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4905
5085
|
min: 0,
|
|
4906
5086
|
max: 1,
|
|
4907
5087
|
step: .05,
|
|
4908
|
-
value:
|
|
5088
|
+
value: V ? 0 : z,
|
|
4909
5089
|
"aria-label": "Громкость",
|
|
4910
|
-
"aria-valuetext": `${Math.round((
|
|
5090
|
+
"aria-valuetext": `${Math.round((V ? 0 : z) * 100)}%`,
|
|
4911
5091
|
onChange: (e) => xe(Number(e.target.value))
|
|
4912
5092
|
})]
|
|
4913
5093
|
}),
|
|
@@ -4916,7 +5096,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4916
5096
|
children: [
|
|
4917
5097
|
/* @__PURE__ */ t("span", {
|
|
4918
5098
|
className: $.time,
|
|
4919
|
-
children:
|
|
5099
|
+
children: Ur(N)
|
|
4920
5100
|
}),
|
|
4921
5101
|
/* @__PURE__ */ t("input", {
|
|
4922
5102
|
className: $.timeline,
|
|
@@ -4927,12 +5107,12 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4927
5107
|
step: .01,
|
|
4928
5108
|
value: Math.min(N, F || 0),
|
|
4929
5109
|
"aria-label": "Позиция воспроизведения",
|
|
4930
|
-
"aria-valuetext": `${
|
|
5110
|
+
"aria-valuetext": `${Ur(N)} из ${Ur(F)}`,
|
|
4931
5111
|
onChange: (e) => Se(Number(e.target.value))
|
|
4932
5112
|
}),
|
|
4933
5113
|
/* @__PURE__ */ t("span", {
|
|
4934
5114
|
className: $.time,
|
|
4935
|
-
children:
|
|
5115
|
+
children: Ur(F)
|
|
4936
5116
|
})
|
|
4937
5117
|
]
|
|
4938
5118
|
}),
|
|
@@ -4953,11 +5133,11 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4953
5133
|
}), /* @__PURE__ */ t("button", {
|
|
4954
5134
|
type: "button",
|
|
4955
5135
|
className: $.controlButton,
|
|
4956
|
-
"aria-label":
|
|
5136
|
+
"aria-label": le ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
|
|
4957
5137
|
title: "Полноэкранный режим (F)",
|
|
4958
5138
|
onClick: () => void Ce(),
|
|
4959
5139
|
children: /* @__PURE__ */ t(J, {
|
|
4960
|
-
name:
|
|
5140
|
+
name: le ? "IconFullscreenExit" : "IconFullscreen",
|
|
4961
5141
|
width: 22,
|
|
4962
5142
|
height: 22
|
|
4963
5143
|
})
|
|
@@ -4972,109 +5152,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4972
5152
|
children: a
|
|
4973
5153
|
})]
|
|
4974
5154
|
});
|
|
4975
|
-
},
|
|
4976
|
-
root: "_root_ymidq_1",
|
|
4977
|
-
trigger: "_trigger_ymidq_15",
|
|
4978
|
-
heading: "_heading_ymidq_41",
|
|
4979
|
-
title: "_title_ymidq_51",
|
|
4980
|
-
subtitle: "_subtitle_ymidq_59",
|
|
4981
|
-
icon: "_icon_ymidq_69",
|
|
4982
|
-
open: "_open_ymidq_91",
|
|
4983
|
-
content: "_content_ymidq_99",
|
|
4984
|
-
contentInner: "_contentInner_ymidq_119"
|
|
4985
|
-
}, Br = (e, t, n, r = 16) => {
|
|
4986
|
-
if (t > Math.max(0, n - r * 2)) {
|
|
4987
|
-
let t = e - r;
|
|
4988
|
-
return Math.abs(t) <= 1 ? {
|
|
4989
|
-
alignment: "none",
|
|
4990
|
-
delta: 0
|
|
4991
|
-
} : {
|
|
4992
|
-
alignment: "start",
|
|
4993
|
-
delta: t
|
|
4994
|
-
};
|
|
4995
|
-
}
|
|
4996
|
-
let i = e + t, a = n - r;
|
|
4997
|
-
return i > a ? {
|
|
4998
|
-
alignment: "end",
|
|
4999
|
-
delta: i - a
|
|
5000
|
-
} : e < r ? {
|
|
5001
|
-
alignment: "start",
|
|
5002
|
-
delta: e - r
|
|
5003
|
-
} : {
|
|
5004
|
-
alignment: "none",
|
|
5005
|
-
delta: 0
|
|
5006
|
-
};
|
|
5007
|
-
}, Vr = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, autoScrollOnOpen: c = !0, scrollOffset: l = 16, className: u = "" }) => {
|
|
5008
|
-
let p = f(), [m, _] = g(a), v = o ?? m, y = h(null), b = h(null), x = h(v);
|
|
5009
|
-
return d(() => {
|
|
5010
|
-
let e = x.current;
|
|
5011
|
-
if (x.current = v, !v || e || !c) return;
|
|
5012
|
-
let t = y.current, n = b.current;
|
|
5013
|
-
if (!t || !n || typeof window > "u") return;
|
|
5014
|
-
let r = !1, i = () => {
|
|
5015
|
-
if (r) return;
|
|
5016
|
-
r = !0;
|
|
5017
|
-
let e = t.getBoundingClientRect(), n = Br(e.top, e.height, window.innerHeight, l);
|
|
5018
|
-
if (n.alignment === "none") return;
|
|
5019
|
-
let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
5020
|
-
window.scrollBy({
|
|
5021
|
-
top: n.delta,
|
|
5022
|
-
behavior: i ? "auto" : "smooth"
|
|
5023
|
-
});
|
|
5024
|
-
}, a = (e) => {
|
|
5025
|
-
e.target === n && e.propertyName === "grid-template-rows" && i();
|
|
5026
|
-
};
|
|
5027
|
-
n.addEventListener("transitionend", a);
|
|
5028
|
-
let o = window.setTimeout(i, 280);
|
|
5029
|
-
return () => {
|
|
5030
|
-
n.removeEventListener("transitionend", a), window.clearTimeout(o);
|
|
5031
|
-
};
|
|
5032
|
-
}, [
|
|
5033
|
-
c,
|
|
5034
|
-
v,
|
|
5035
|
-
l
|
|
5036
|
-
]), /* @__PURE__ */ n("section", {
|
|
5037
|
-
ref: y,
|
|
5038
|
-
className: `${zr.root} ${v ? zr.open : ""} ${u}`,
|
|
5039
|
-
children: [/* @__PURE__ */ n("button", {
|
|
5040
|
-
type: "button",
|
|
5041
|
-
className: zr.trigger,
|
|
5042
|
-
"aria-expanded": v,
|
|
5043
|
-
"aria-controls": p,
|
|
5044
|
-
onClick: () => {
|
|
5045
|
-
let e = !v;
|
|
5046
|
-
o === void 0 && _(e), s?.(e);
|
|
5047
|
-
},
|
|
5048
|
-
children: [/* @__PURE__ */ n("span", {
|
|
5049
|
-
className: zr.heading,
|
|
5050
|
-
children: [/* @__PURE__ */ t("span", {
|
|
5051
|
-
className: zr.title,
|
|
5052
|
-
children: e
|
|
5053
|
-
}), r && /* @__PURE__ */ t("span", {
|
|
5054
|
-
className: zr.subtitle,
|
|
5055
|
-
children: r
|
|
5056
|
-
})]
|
|
5057
|
-
}), /* @__PURE__ */ t("span", {
|
|
5058
|
-
className: zr.icon,
|
|
5059
|
-
"aria-hidden": "true",
|
|
5060
|
-
children: /* @__PURE__ */ t(J, {
|
|
5061
|
-
name: "IconChevron",
|
|
5062
|
-
width: 20,
|
|
5063
|
-
height: 20
|
|
5064
|
-
})
|
|
5065
|
-
})]
|
|
5066
|
-
}), /* @__PURE__ */ t("div", {
|
|
5067
|
-
ref: b,
|
|
5068
|
-
id: p,
|
|
5069
|
-
className: zr.content,
|
|
5070
|
-
"aria-hidden": !v,
|
|
5071
|
-
children: /* @__PURE__ */ t("div", {
|
|
5072
|
-
className: zr.contentInner,
|
|
5073
|
-
children: i
|
|
5074
|
-
})
|
|
5075
|
-
})]
|
|
5076
|
-
});
|
|
5077
|
-
}, Hr = {
|
|
5155
|
+
}, Yr = {
|
|
5078
5156
|
root: "_root_14ewt_1",
|
|
5079
5157
|
topSlot: "_topSlot_14ewt_29",
|
|
5080
5158
|
searchSlot: "_searchSlot_14ewt_31",
|
|
@@ -5092,14 +5170,14 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5092
5170
|
description: "_description_14ewt_235",
|
|
5093
5171
|
badge: "_badge_14ewt_269",
|
|
5094
5172
|
empty: "_empty_14ewt_281"
|
|
5095
|
-
},
|
|
5173
|
+
}, Xr = (e, t, n) => {
|
|
5096
5174
|
if (e.length === 0) return -1;
|
|
5097
5175
|
for (let r = 1; r <= e.length; r += 1) {
|
|
5098
5176
|
let i = (t + n * r + e.length) % e.length;
|
|
5099
5177
|
if (!e[i]?.disabled) return i;
|
|
5100
5178
|
}
|
|
5101
5179
|
return -1;
|
|
5102
|
-
},
|
|
5180
|
+
}, Zr = ({ groups: r, currentItemId: i, ariaLabel: a = "Основная навигация", searchSlot: o, topSlot: s, bottomSlot: c, emptyState: l, renderLink: u, onItemSelect: d, className: p = "" }) => {
|
|
5103
5181
|
let m = f(), g = h(null), _ = h({
|
|
5104
5182
|
value: "",
|
|
5105
5183
|
time: 0
|
|
@@ -5111,7 +5189,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5111
5189
|
let n = v.findIndex((e) => e.id === t.id);
|
|
5112
5190
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
5113
5191
|
e.preventDefault();
|
|
5114
|
-
let t =
|
|
5192
|
+
let t = Xr(v, n, e.key === "ArrowDown" ? 1 : -1);
|
|
5115
5193
|
x(v[t]);
|
|
5116
5194
|
return;
|
|
5117
5195
|
}
|
|
@@ -5131,26 +5209,26 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5131
5209
|
let a = r.id === i, o = {
|
|
5132
5210
|
children: /* @__PURE__ */ n(e, { children: [
|
|
5133
5211
|
r.icon && /* @__PURE__ */ t("span", {
|
|
5134
|
-
className:
|
|
5212
|
+
className: Yr.icon,
|
|
5135
5213
|
"aria-hidden": "true",
|
|
5136
5214
|
children: r.icon
|
|
5137
5215
|
}),
|
|
5138
5216
|
/* @__PURE__ */ n("span", {
|
|
5139
|
-
className:
|
|
5217
|
+
className: Yr.copy,
|
|
5140
5218
|
children: [/* @__PURE__ */ t("span", {
|
|
5141
|
-
className:
|
|
5219
|
+
className: Yr.label,
|
|
5142
5220
|
children: r.label
|
|
5143
5221
|
}), r.description && /* @__PURE__ */ t("span", {
|
|
5144
|
-
className:
|
|
5222
|
+
className: Yr.description,
|
|
5145
5223
|
children: r.description
|
|
5146
5224
|
})]
|
|
5147
5225
|
}),
|
|
5148
5226
|
r.badge && /* @__PURE__ */ t("span", {
|
|
5149
|
-
className:
|
|
5227
|
+
className: Yr.badge,
|
|
5150
5228
|
children: r.badge
|
|
5151
5229
|
})
|
|
5152
5230
|
] }),
|
|
5153
|
-
className: `${
|
|
5231
|
+
className: `${Yr.link} ${a ? Yr.current : ""}`,
|
|
5154
5232
|
tabIndex: r.id === b ? 0 : -1,
|
|
5155
5233
|
"aria-current": a ? "page" : void 0,
|
|
5156
5234
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5166,7 +5244,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5166
5244
|
onKeyDown: (e) => S(e, r)
|
|
5167
5245
|
};
|
|
5168
5246
|
return /* @__PURE__ */ t("li", {
|
|
5169
|
-
className:
|
|
5247
|
+
className: Yr.item,
|
|
5170
5248
|
children: u ? u(r, o) : r.href ? /* @__PURE__ */ t("a", {
|
|
5171
5249
|
href: r.href,
|
|
5172
5250
|
...o,
|
|
@@ -5181,45 +5259,45 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5181
5259
|
};
|
|
5182
5260
|
return /* @__PURE__ */ n("nav", {
|
|
5183
5261
|
ref: g,
|
|
5184
|
-
className: `${
|
|
5262
|
+
className: `${Yr.root} ${p}`,
|
|
5185
5263
|
"aria-label": a,
|
|
5186
5264
|
children: [
|
|
5187
5265
|
s && /* @__PURE__ */ t("div", {
|
|
5188
|
-
className:
|
|
5266
|
+
className: Yr.topSlot,
|
|
5189
5267
|
children: s
|
|
5190
5268
|
}),
|
|
5191
5269
|
o && /* @__PURE__ */ t("div", {
|
|
5192
|
-
className:
|
|
5270
|
+
className: Yr.searchSlot,
|
|
5193
5271
|
children: o
|
|
5194
5272
|
}),
|
|
5195
5273
|
/* @__PURE__ */ n("div", {
|
|
5196
|
-
className:
|
|
5274
|
+
className: Yr.groups,
|
|
5197
5275
|
children: [r.map((e) => {
|
|
5198
5276
|
let r = `${m}-${e.id}`;
|
|
5199
5277
|
return /* @__PURE__ */ n("section", {
|
|
5200
|
-
className:
|
|
5278
|
+
className: Yr.group,
|
|
5201
5279
|
"aria-labelledby": e.label ? r : void 0,
|
|
5202
5280
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
5203
5281
|
id: r,
|
|
5204
|
-
className:
|
|
5282
|
+
className: Yr.groupLabel,
|
|
5205
5283
|
children: e.label
|
|
5206
5284
|
}), /* @__PURE__ */ t("ul", {
|
|
5207
|
-
className:
|
|
5285
|
+
className: Yr.list,
|
|
5208
5286
|
children: e.items.map(C)
|
|
5209
5287
|
})]
|
|
5210
5288
|
}, e.id);
|
|
5211
5289
|
}), v.length === 0 && l && /* @__PURE__ */ t("div", {
|
|
5212
|
-
className:
|
|
5290
|
+
className: Yr.empty,
|
|
5213
5291
|
children: l
|
|
5214
5292
|
})]
|
|
5215
5293
|
}),
|
|
5216
5294
|
c && /* @__PURE__ */ t("div", {
|
|
5217
|
-
className:
|
|
5295
|
+
className: Yr.bottomSlot,
|
|
5218
5296
|
children: c
|
|
5219
5297
|
})
|
|
5220
5298
|
]
|
|
5221
5299
|
});
|
|
5222
|
-
},
|
|
5300
|
+
}, Qr = {
|
|
5223
5301
|
root: "_root_2mdgb_1",
|
|
5224
5302
|
list: "_list_2mdgb_19",
|
|
5225
5303
|
item: "_item_2mdgb_37",
|
|
@@ -5229,7 +5307,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5229
5307
|
icon: "_icon_2mdgb_141",
|
|
5230
5308
|
badge: "_badge_2mdgb_149",
|
|
5231
5309
|
label: "_label_2mdgb_163"
|
|
5232
|
-
},
|
|
5310
|
+
}, $r = ({ items: r, currentItemId: i, ariaLabel: a = "Мобильная навигация", renderLink: o, onItemSelect: s, className: c = "" }) => {
|
|
5233
5311
|
let l = h(null), u = r.filter((e) => !e.disabled), d = u.some((e) => e.id === i) ? i : u[0]?.id, f = (e) => {
|
|
5234
5312
|
l.current?.querySelectorAll("[data-ds-navigation-item]")[e]?.focus();
|
|
5235
5313
|
}, p = (e, t) => {
|
|
@@ -5246,27 +5324,27 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5246
5324
|
};
|
|
5247
5325
|
return /* @__PURE__ */ t("nav", {
|
|
5248
5326
|
ref: l,
|
|
5249
|
-
className: `${
|
|
5327
|
+
className: `${Qr.root} ${c}`,
|
|
5250
5328
|
"aria-label": a,
|
|
5251
5329
|
children: /* @__PURE__ */ t("ul", {
|
|
5252
|
-
className:
|
|
5330
|
+
className: Qr.list,
|
|
5253
5331
|
children: r.map((r) => {
|
|
5254
5332
|
let a = r.id === i, c = {
|
|
5255
5333
|
children: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("span", {
|
|
5256
|
-
className:
|
|
5334
|
+
className: Qr.visual,
|
|
5257
5335
|
children: [r.icon && /* @__PURE__ */ t("span", {
|
|
5258
|
-
className:
|
|
5336
|
+
className: Qr.icon,
|
|
5259
5337
|
"aria-hidden": "true",
|
|
5260
5338
|
children: r.icon
|
|
5261
5339
|
}), r.badge && /* @__PURE__ */ t("span", {
|
|
5262
|
-
className:
|
|
5340
|
+
className: Qr.badge,
|
|
5263
5341
|
children: r.badge
|
|
5264
5342
|
})]
|
|
5265
5343
|
}), /* @__PURE__ */ t("span", {
|
|
5266
|
-
className:
|
|
5344
|
+
className: Qr.label,
|
|
5267
5345
|
children: r.label
|
|
5268
5346
|
})] }),
|
|
5269
|
-
className: `${
|
|
5347
|
+
className: `${Qr.link} ${a ? Qr.current : ""}`,
|
|
5270
5348
|
tabIndex: r.id === d ? 0 : -1,
|
|
5271
5349
|
"aria-current": a ? "page" : void 0,
|
|
5272
5350
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5282,7 +5360,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5282
5360
|
onKeyDown: (e) => p(e, r)
|
|
5283
5361
|
};
|
|
5284
5362
|
return /* @__PURE__ */ t("li", {
|
|
5285
|
-
className:
|
|
5363
|
+
className: Qr.item,
|
|
5286
5364
|
children: o ? o(r, c) : r.href ? /* @__PURE__ */ t("a", {
|
|
5287
5365
|
href: r.href,
|
|
5288
5366
|
...c,
|
|
@@ -5297,7 +5375,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5297
5375
|
})
|
|
5298
5376
|
})
|
|
5299
5377
|
});
|
|
5300
|
-
},
|
|
5378
|
+
}, ei = {
|
|
5301
5379
|
logo: "_logo_1kw5e_17",
|
|
5302
5380
|
edgeStart: "_edgeStart_1kw5e_33",
|
|
5303
5381
|
edgeMiddle: "_edgeMiddle_1kw5e_41",
|
|
@@ -5312,19 +5390,19 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5312
5390
|
wordmark: "_wordmark_1kw5e_127",
|
|
5313
5391
|
edge: "_edge_1kw5e_33",
|
|
5314
5392
|
pane: "_pane_1kw5e_57"
|
|
5315
|
-
},
|
|
5393
|
+
}, ti = {
|
|
5316
5394
|
sm: 24,
|
|
5317
5395
|
md: 40,
|
|
5318
5396
|
lg: 56
|
|
5319
|
-
},
|
|
5397
|
+
}, ni = {
|
|
5320
5398
|
icon: "0 0 128 224",
|
|
5321
5399
|
wordmark: "0 0 600 160",
|
|
5322
5400
|
lockup: "0 0 675 200"
|
|
5323
|
-
},
|
|
5401
|
+
}, ri = {
|
|
5324
5402
|
icon: 128 / 224,
|
|
5325
5403
|
wordmark: 600 / 160,
|
|
5326
5404
|
lockup: 675 / 200
|
|
5327
|
-
},
|
|
5405
|
+
}, ii = ({ id: e, transform: r }) => /* @__PURE__ */ n("g", {
|
|
5328
5406
|
transform: r,
|
|
5329
5407
|
children: [
|
|
5330
5408
|
/* @__PURE__ */ n("defs", { children: [
|
|
@@ -5336,14 +5414,14 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5336
5414
|
y2: "216",
|
|
5337
5415
|
gradientUnits: "userSpaceOnUse",
|
|
5338
5416
|
children: [
|
|
5339
|
-
/* @__PURE__ */ t("stop", { className:
|
|
5417
|
+
/* @__PURE__ */ t("stop", { className: ei.edgeStart }),
|
|
5340
5418
|
/* @__PURE__ */ t("stop", {
|
|
5341
5419
|
offset: "0.52",
|
|
5342
|
-
className:
|
|
5420
|
+
className: ei.edgeMiddle
|
|
5343
5421
|
}),
|
|
5344
5422
|
/* @__PURE__ */ t("stop", {
|
|
5345
5423
|
offset: "1",
|
|
5346
|
-
className:
|
|
5424
|
+
className: ei.edgeEnd
|
|
5347
5425
|
})
|
|
5348
5426
|
]
|
|
5349
5427
|
}),
|
|
@@ -5355,14 +5433,14 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5355
5433
|
y2: "199",
|
|
5356
5434
|
gradientUnits: "userSpaceOnUse",
|
|
5357
5435
|
children: [
|
|
5358
|
-
/* @__PURE__ */ t("stop", { className:
|
|
5436
|
+
/* @__PURE__ */ t("stop", { className: ei.paneStart }),
|
|
5359
5437
|
/* @__PURE__ */ t("stop", {
|
|
5360
5438
|
offset: "0.52",
|
|
5361
|
-
className:
|
|
5439
|
+
className: ei.paneMiddle
|
|
5362
5440
|
}),
|
|
5363
5441
|
/* @__PURE__ */ t("stop", {
|
|
5364
5442
|
offset: "1",
|
|
5365
|
-
className:
|
|
5443
|
+
className: ei.paneEnd
|
|
5366
5444
|
})
|
|
5367
5445
|
]
|
|
5368
5446
|
}),
|
|
@@ -5374,25 +5452,25 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5374
5452
|
y2: "176",
|
|
5375
5453
|
gradientUnits: "userSpaceOnUse",
|
|
5376
5454
|
children: [
|
|
5377
|
-
/* @__PURE__ */ t("stop", { className:
|
|
5455
|
+
/* @__PURE__ */ t("stop", { className: ei.sheenStart }),
|
|
5378
5456
|
/* @__PURE__ */ t("stop", {
|
|
5379
5457
|
offset: "0.42",
|
|
5380
|
-
className:
|
|
5458
|
+
className: ei.sheenMiddle
|
|
5381
5459
|
}),
|
|
5382
5460
|
/* @__PURE__ */ t("stop", {
|
|
5383
5461
|
offset: "1",
|
|
5384
|
-
className:
|
|
5462
|
+
className: ei.sheenEnd
|
|
5385
5463
|
})
|
|
5386
5464
|
]
|
|
5387
5465
|
})
|
|
5388
5466
|
] }),
|
|
5389
5467
|
/* @__PURE__ */ t("path", {
|
|
5390
|
-
className:
|
|
5468
|
+
className: ei.edge,
|
|
5391
5469
|
d: "M12 13.5 28 8v208l-16-5.5z",
|
|
5392
5470
|
fill: `url(#${e}-edge)`
|
|
5393
5471
|
}),
|
|
5394
5472
|
/* @__PURE__ */ t("path", {
|
|
5395
|
-
className:
|
|
5473
|
+
className: ei.pane,
|
|
5396
5474
|
d: "M28 8 116 51.5v121L28 216z",
|
|
5397
5475
|
fill: `url(#${e}-pane)`
|
|
5398
5476
|
}),
|
|
@@ -5401,22 +5479,22 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5401
5479
|
fill: `url(#${e}-sheen)`
|
|
5402
5480
|
}),
|
|
5403
5481
|
/* @__PURE__ */ t("path", {
|
|
5404
|
-
className:
|
|
5482
|
+
className: ei.rim,
|
|
5405
5483
|
d: "M115 53v118.5l-4.5 2.5V55.2z"
|
|
5406
5484
|
})
|
|
5407
5485
|
]
|
|
5408
|
-
}),
|
|
5409
|
-
className:
|
|
5486
|
+
}), ai = ({ transform: e }) => /* @__PURE__ */ t("text", {
|
|
5487
|
+
className: ei.wordmark,
|
|
5410
5488
|
x: "8",
|
|
5411
5489
|
y: "128",
|
|
5412
5490
|
transform: e,
|
|
5413
5491
|
children: "Стекло"
|
|
5414
|
-
}),
|
|
5415
|
-
let p = `ds-logo-${f().replaceAll(":", "")}`, m = l ?? (typeof i == "number" ? Math.max(1, i) :
|
|
5492
|
+
}), oi = ({ variant: r = "lockup", size: i = "md", decorative: a = !1, className: o = "", title: s = "Стекло", width: c, height: l, "aria-label": u, ...d }) => {
|
|
5493
|
+
let p = `ds-logo-${f().replaceAll(":", "")}`, m = l ?? (typeof i == "number" ? Math.max(1, i) : ti[i]), h = typeof m == "number" ? m : ti.md, g = c ?? Number((h * ri[r]).toFixed(2)), _ = `${p}-title`;
|
|
5416
5494
|
return /* @__PURE__ */ n("svg", {
|
|
5417
5495
|
...d,
|
|
5418
|
-
className: `${
|
|
5419
|
-
viewBox:
|
|
5496
|
+
className: `${ei.logo} ${o}`,
|
|
5497
|
+
viewBox: ni[r],
|
|
5420
5498
|
width: g,
|
|
5421
5499
|
height: m,
|
|
5422
5500
|
role: a ? void 0 : "img",
|
|
@@ -5429,56 +5507,56 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5429
5507
|
id: _,
|
|
5430
5508
|
children: s
|
|
5431
5509
|
}),
|
|
5432
|
-
r === "icon" && /* @__PURE__ */ t(
|
|
5433
|
-
r === "wordmark" && /* @__PURE__ */ t(
|
|
5434
|
-
r === "lockup" && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(
|
|
5510
|
+
r === "icon" && /* @__PURE__ */ t(ii, { id: p }),
|
|
5511
|
+
r === "wordmark" && /* @__PURE__ */ t(ai, {}),
|
|
5512
|
+
r === "lockup" && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(ii, {
|
|
5435
5513
|
id: p,
|
|
5436
5514
|
transform: "translate(16 0) scale(.86)"
|
|
5437
|
-
}), /* @__PURE__ */ t(
|
|
5515
|
+
}), /* @__PURE__ */ t(ai, { transform: "translate(156 36) scale(.84)" })] })
|
|
5438
5516
|
]
|
|
5439
5517
|
});
|
|
5440
|
-
},
|
|
5518
|
+
}, si = {
|
|
5441
5519
|
brand: "_brand_uueok_1",
|
|
5442
5520
|
symbol: "_symbol_uueok_25",
|
|
5443
5521
|
identity: "_identity_uueok_33",
|
|
5444
5522
|
collapsed: "_collapsed_uueok_55",
|
|
5445
5523
|
wordmark: "_wordmark_uueok_63",
|
|
5446
5524
|
serviceName: "_serviceName_uueok_71"
|
|
5447
|
-
},
|
|
5525
|
+
}, ci = ({ serviceName: e, collapsed: r = !1, logoSize: i, className: a = "", "aria-label": o, ...s }) => {
|
|
5448
5526
|
let c = o ?? `Стекло. ${e}`;
|
|
5449
5527
|
return /* @__PURE__ */ n("div", {
|
|
5450
5528
|
...s,
|
|
5451
|
-
className: `${
|
|
5529
|
+
className: `${si.brand} ${r ? si.collapsed : ""} ${a}`,
|
|
5452
5530
|
"data-collapsed": r || void 0,
|
|
5453
5531
|
"aria-label": c,
|
|
5454
5532
|
title: r ? c : s.title,
|
|
5455
|
-
children: [/* @__PURE__ */ t(
|
|
5456
|
-
className:
|
|
5533
|
+
children: [/* @__PURE__ */ t(oi, {
|
|
5534
|
+
className: si.symbol,
|
|
5457
5535
|
variant: "icon",
|
|
5458
5536
|
size: i ?? 44,
|
|
5459
5537
|
decorative: !0
|
|
5460
5538
|
}), /* @__PURE__ */ n("span", {
|
|
5461
|
-
className:
|
|
5539
|
+
className: si.identity,
|
|
5462
5540
|
"aria-hidden": "true",
|
|
5463
|
-
children: [/* @__PURE__ */ t(
|
|
5464
|
-
className:
|
|
5541
|
+
children: [/* @__PURE__ */ t(oi, {
|
|
5542
|
+
className: si.wordmark,
|
|
5465
5543
|
variant: "wordmark",
|
|
5466
5544
|
size: 32,
|
|
5467
5545
|
decorative: !0
|
|
5468
5546
|
}), /* @__PURE__ */ t("span", {
|
|
5469
|
-
className:
|
|
5547
|
+
className: si.serviceName,
|
|
5470
5548
|
title: e,
|
|
5471
5549
|
children: e
|
|
5472
5550
|
})]
|
|
5473
5551
|
})]
|
|
5474
5552
|
});
|
|
5475
|
-
},
|
|
5553
|
+
}, li = {
|
|
5476
5554
|
sample: "_sample_3woga_1",
|
|
5477
5555
|
menu: "_menu_3woga_59",
|
|
5478
5556
|
options: "_options_3woga_81",
|
|
5479
5557
|
legend: "_legend_3woga_93",
|
|
5480
5558
|
option: "_option_3woga_81"
|
|
5481
|
-
},
|
|
5559
|
+
}, ui = ({ value: r, onChange: i, compact: a = !1, disabled: o = !1 }) => {
|
|
5482
5560
|
let [s, c] = g(!1), l = h(null), [u, p] = g(null), m = f();
|
|
5483
5561
|
return d(() => {
|
|
5484
5562
|
if (!s) return;
|
|
@@ -5494,7 +5572,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5494
5572
|
if (!u) return;
|
|
5495
5573
|
let e = requestAnimationFrame(() => u.querySelector("input:checked")?.focus());
|
|
5496
5574
|
return () => cancelAnimationFrame(e);
|
|
5497
|
-
}, [u]), /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n(
|
|
5575
|
+
}, [u]), /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n(B, {
|
|
5498
5576
|
ref: l,
|
|
5499
5577
|
variant: "empty",
|
|
5500
5578
|
disabled: o,
|
|
@@ -5506,7 +5584,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5506
5584
|
children: [
|
|
5507
5585
|
/* @__PURE__ */ t("span", {
|
|
5508
5586
|
"data-ds-theme": r,
|
|
5509
|
-
className:
|
|
5587
|
+
className: li.sample,
|
|
5510
5588
|
"aria-hidden": "true"
|
|
5511
5589
|
}),
|
|
5512
5590
|
!a && w[r],
|
|
@@ -5517,22 +5595,22 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5517
5595
|
"aria-hidden": "true"
|
|
5518
5596
|
})
|
|
5519
5597
|
]
|
|
5520
|
-
}), s && !o && /* @__PURE__ */ t(
|
|
5598
|
+
}), s && !o && /* @__PURE__ */ t(Hn, {
|
|
5521
5599
|
anchorRef: l,
|
|
5522
5600
|
children: /* @__PURE__ */ t("div", {
|
|
5523
5601
|
ref: p,
|
|
5524
5602
|
id: m,
|
|
5525
|
-
className:
|
|
5603
|
+
className: li.menu,
|
|
5526
5604
|
onBlur: (e) => {
|
|
5527
5605
|
e.relatedTarget instanceof Node && !e.currentTarget.contains(e.relatedTarget) && !l.current?.contains(e.relatedTarget) && c(!1);
|
|
5528
5606
|
},
|
|
5529
5607
|
children: /* @__PURE__ */ n("fieldset", {
|
|
5530
|
-
className:
|
|
5608
|
+
className: li.options,
|
|
5531
5609
|
children: [/* @__PURE__ */ t("legend", {
|
|
5532
|
-
className:
|
|
5610
|
+
className: li.legend,
|
|
5533
5611
|
children: "Цветовая тема"
|
|
5534
5612
|
}), ["teal", "signal"].map((e) => /* @__PURE__ */ n("label", {
|
|
5535
|
-
className:
|
|
5613
|
+
className: li.option,
|
|
5536
5614
|
children: [
|
|
5537
5615
|
/* @__PURE__ */ t("input", {
|
|
5538
5616
|
type: "radio",
|
|
@@ -5543,7 +5621,7 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5543
5621
|
}),
|
|
5544
5622
|
/* @__PURE__ */ t("span", {
|
|
5545
5623
|
"data-ds-theme": e,
|
|
5546
|
-
className:
|
|
5624
|
+
className: li.sample,
|
|
5547
5625
|
"aria-hidden": "true"
|
|
5548
5626
|
}),
|
|
5549
5627
|
/* @__PURE__ */ t("span", { children: w[e] }),
|
|
@@ -5560,4 +5638,4 @@ var Un = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5560
5638
|
})] });
|
|
5561
5639
|
};
|
|
5562
5640
|
//#endregion
|
|
5563
|
-
export {
|
|
5641
|
+
export { pr as ConfirmModal, O as DEFAULT_DS_FAVICON_THEME, It as DSAccordion, F as DSBadge, $r as DSBottomNavigation, kr as DSBottomSheet, B as DSButton, Ge as DSCheckbox, R as DSCounterBadge, yn as DSDataTable, mt as DSDateRange, dt as DSDateTimePicker, Or as DSDrawer, St as DSDropDown, jt as DSDropDownMultiple, ne as DSFieldLabel, H as DSFieldMessage, Bn as DSFileInput, jn as DSFilters, Hn as DSFloatingMenu, Nn as DSFormGrid, Pn as DSFormGridItem, Ar as DSFullscreenDialog, J as DSIcon, Ue as DSIconNames, kn as DSInfoBlock, Et as DSInput, ee as DSLoader, oi as DSLogo, sr as DSModal, or as DSModalFrame, Zr as DSNavigationSurface, Dr as DSOverlay, Mr as DSPageLoader, Lt as DSPortal, Nt as DSRadioButton, Dn as DSSearchDropDown, ci as DSServiceBrand, gt as DSSkeleton, wt as DSSort, Hr as DSTabs, Kn as DSTextarea, ui as DSThemeSwitcher, Fr as DSToast, zr as DSToastProvider, Xt as DSTooltip, Fn as DSValidationSummary, Jr as DSVideoPlayerFrame, k as DS_FAVICON_THEMES, w as DS_THEME_NAMES, C as DS_THEME_STORAGE_KEY, mr as ErrorModal, cr as ModalSystemProvider, N as applyDSBrandTheme, M as applyDSFavicon, D as applyDSTheme, hr as builtInModalRegistry, lr as defineModalRegistry, L as formatDSCounterValue, Ze as formatDateInputValue, rt as formatDateTimeLocalValue, Ft as getDSAccordionScrollTarget, sn as getDSDataTableColumnStyle, ln as getDSDataTablePaginationItems, cn as getDSDataTableStickyColumnStyle, j as getDSFaviconHref, _r as getErrorMessage, on as getNextDSDataTablePageSelection, bt as getNextEnabledOptionIndex, E as getStoredDSTheme, T as isDSTheme, et as isValidDateInputPrefix, pt as isValidDateRange, Qe as maskDateInputValue, tt as parseDateInputValue, it as parseDateTimeLocalValue, Yn as resetModalStore, Rr as resetToastStore, gr as useConfirmModal, yr as useConfirmModalStore, Er as useDSOverlay, vr as useErrorModal, br as useErrorModalStore, xr as useModals, Jn as useModalsStore, Br as useToast, Lr as useToastStore, un as validateDSDataTableData };
|