@efficiency-point/design-system 0.1.38 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -15,7 +15,7 @@ var C = {
|
|
|
15
15
|
dot: "_dot_1erxk_109",
|
|
16
16
|
icon: "_icon_1erxk_125",
|
|
17
17
|
label: "_label_1erxk_135"
|
|
18
|
-
},
|
|
18
|
+
}, ee = ({ children: e, variant: r = "neutral", size: i = "md", dot: a = !1, icon: o, className: s = "" }) => /* @__PURE__ */ n("span", {
|
|
19
19
|
className: `${C.badge} ${C[r]} ${C[i]} ${s}`,
|
|
20
20
|
children: [
|
|
21
21
|
a && /* @__PURE__ */ t("span", {
|
|
@@ -32,7 +32,7 @@ var C = {
|
|
|
32
32
|
children: e
|
|
33
33
|
})
|
|
34
34
|
]
|
|
35
|
-
}),
|
|
35
|
+
}), w = {
|
|
36
36
|
badge: "_badge_2qg9z_1",
|
|
37
37
|
sm: "_sm_2qg9z_25",
|
|
38
38
|
md: "_md_2qg9z_37",
|
|
@@ -41,18 +41,18 @@ var C = {
|
|
|
41
41
|
success: "_success_2qg9z_75",
|
|
42
42
|
warning: "_warning_2qg9z_87",
|
|
43
43
|
error: "_error_2qg9z_99"
|
|
44
|
-
},
|
|
44
|
+
}, T = (e, t = 99) => {
|
|
45
45
|
let n = Math.max(0, Math.floor(e)), r = Math.max(0, Math.floor(t));
|
|
46
46
|
return n > r ? `${r}+` : String(n);
|
|
47
|
-
},
|
|
47
|
+
}, E = ({ value: e, max: n = 99, label: r = "уведомлений", variant: i = "error", size: a = "sm", className: o = "", "aria-label": s, ...c }) => {
|
|
48
48
|
let l = Math.max(0, Math.floor(e));
|
|
49
49
|
return /* @__PURE__ */ t("span", {
|
|
50
50
|
...c,
|
|
51
|
-
className: `${
|
|
51
|
+
className: `${w.badge} ${w[i]} ${w[a]} ${o}`,
|
|
52
52
|
"aria-label": s ?? `${l} ${r}`,
|
|
53
|
-
children:
|
|
53
|
+
children: T(l, n)
|
|
54
54
|
});
|
|
55
|
-
},
|
|
55
|
+
}, D = {
|
|
56
56
|
container: "_container_1jyk1_1",
|
|
57
57
|
inner: "_inner_1jyk1_21",
|
|
58
58
|
line: "_line_1jyk1_39",
|
|
@@ -64,18 +64,18 @@ var C = {
|
|
|
64
64
|
destructive: "_destructive_1jyk1_97",
|
|
65
65
|
destructiveOutline: "_destructiveOutline_1jyk1_105",
|
|
66
66
|
grow: "_grow_1jyk1_1"
|
|
67
|
-
},
|
|
68
|
-
className: `${
|
|
67
|
+
}, O = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
|
|
68
|
+
className: `${D.container} ${D[e]}`,
|
|
69
69
|
children: /* @__PURE__ */ n("div", {
|
|
70
|
-
className: `${
|
|
70
|
+
className: `${D.inner} ${D[e]}`,
|
|
71
71
|
children: [
|
|
72
|
-
/* @__PURE__ */ t("div", { className: `${
|
|
73
|
-
/* @__PURE__ */ t("div", { className: `${
|
|
74
|
-
/* @__PURE__ */ t("div", { className: `${
|
|
75
|
-
/* @__PURE__ */ t("div", { className: `${
|
|
72
|
+
/* @__PURE__ */ t("div", { className: `${D.line} ${D[e]}` }),
|
|
73
|
+
/* @__PURE__ */ t("div", { className: `${D.line} ${D[e]}` }),
|
|
74
|
+
/* @__PURE__ */ t("div", { className: `${D.line} ${D[e]}` }),
|
|
75
|
+
/* @__PURE__ */ t("div", { className: `${D.line} ${D[e]}` })
|
|
76
76
|
]
|
|
77
77
|
})
|
|
78
|
-
}),
|
|
78
|
+
}), k = {
|
|
79
79
|
button: "_button_8341b_1",
|
|
80
80
|
sm: "_sm_8341b_59",
|
|
81
81
|
md: "_md_8341b_73",
|
|
@@ -87,17 +87,17 @@ var C = {
|
|
|
87
87
|
empty: "_empty_8341b_157",
|
|
88
88
|
destructive: "_destructive_8341b_171",
|
|
89
89
|
destructiveOutline: "_destructiveOutline_8341b_183"
|
|
90
|
-
},
|
|
90
|
+
}, A = s(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1, disabled: a, type: o = "button", className: s = "", ...c }, l) => /* @__PURE__ */ t("button", {
|
|
91
91
|
ref: l,
|
|
92
|
-
className: `${
|
|
92
|
+
className: `${k.button} ${k[n]} ${k[r]} ${s}`,
|
|
93
93
|
disabled: a || i,
|
|
94
94
|
"aria-busy": i || void 0,
|
|
95
95
|
...c,
|
|
96
96
|
type: o,
|
|
97
|
-
children: i ? /* @__PURE__ */ t(
|
|
97
|
+
children: i ? /* @__PURE__ */ t(O, { variant: n }) : e
|
|
98
98
|
}));
|
|
99
|
-
|
|
100
|
-
var
|
|
99
|
+
A.displayName = "DSButton";
|
|
100
|
+
var j = {
|
|
101
101
|
label: "_label_1o819_1",
|
|
102
102
|
required: "_required_1o819_23",
|
|
103
103
|
error: "_error_1o819_25",
|
|
@@ -106,28 +106,28 @@ var M = {
|
|
|
106
106
|
disabled: "_disabled_1o819_47",
|
|
107
107
|
message: "_message_1o819_55",
|
|
108
108
|
success: "_success_1o819_71"
|
|
109
|
-
},
|
|
110
|
-
className: `${
|
|
109
|
+
}, te = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
|
|
110
|
+
className: `${j.label} ${a ? j.disabled : ""} ${o}`,
|
|
111
111
|
...s,
|
|
112
112
|
children: [
|
|
113
113
|
/* @__PURE__ */ t("span", { children: e }),
|
|
114
114
|
r && /* @__PURE__ */ t("span", {
|
|
115
|
-
className:
|
|
115
|
+
className: j.required,
|
|
116
116
|
"aria-hidden": "true",
|
|
117
117
|
children: "*"
|
|
118
118
|
}),
|
|
119
119
|
i && /* @__PURE__ */ t("span", {
|
|
120
|
-
className:
|
|
120
|
+
className: j.optional,
|
|
121
121
|
children: i
|
|
122
122
|
})
|
|
123
123
|
]
|
|
124
|
-
}),
|
|
124
|
+
}), M = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
|
|
125
125
|
id: r,
|
|
126
|
-
className: `${
|
|
126
|
+
className: `${j.message} ${j[n]} ${a}`,
|
|
127
127
|
role: i && n === "error" ? "alert" : void 0,
|
|
128
128
|
"aria-live": i && n !== "error" ? "polite" : void 0,
|
|
129
129
|
children: e
|
|
130
|
-
}),
|
|
130
|
+
}), N = ({ width: e = 24, height: r = 24, color: i, title: a, style: o, children: s, ...c }) => /* @__PURE__ */ n("svg", {
|
|
131
131
|
xmlns: "http://www.w3.org/2000/svg",
|
|
132
132
|
viewBox: "0 0 24 24",
|
|
133
133
|
width: e,
|
|
@@ -146,61 +146,61 @@ var M = {
|
|
|
146
146
|
} : o,
|
|
147
147
|
...c,
|
|
148
148
|
children: [a && /* @__PURE__ */ t("title", { children: a }), s]
|
|
149
|
-
}),
|
|
149
|
+
}), P = (e) => /* @__PURE__ */ t(N, {
|
|
150
150
|
...e,
|
|
151
151
|
children: /* @__PURE__ */ t("path", { d: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3" })
|
|
152
|
-
}),
|
|
152
|
+
}), F = ({ strokeWidth: e = 2, ...r }) => /* @__PURE__ */ n(N, {
|
|
153
153
|
strokeWidth: e,
|
|
154
154
|
...r,
|
|
155
155
|
children: [/* @__PURE__ */ t("path", { d: "M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8" }), /* @__PURE__ */ t("path", { d: "M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4M12 4v6M2 18h20M5 18v2M19 18v2" })]
|
|
156
|
-
}),
|
|
156
|
+
}), I = (e) => /* @__PURE__ */ t(N, {
|
|
157
157
|
...e,
|
|
158
158
|
children: /* @__PURE__ */ t("path", { d: "m5 12 4 4L19 6" })
|
|
159
|
-
}),
|
|
159
|
+
}), L = (e) => /* @__PURE__ */ t(N, {
|
|
160
160
|
viewBox: "0 0 20 20",
|
|
161
161
|
...e,
|
|
162
162
|
children: /* @__PURE__ */ t("path", { d: "M5 7.5L10 12.5L15 7.5" })
|
|
163
|
-
}),
|
|
163
|
+
}), R = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(N, {
|
|
164
164
|
strokeWidth: e,
|
|
165
165
|
...n,
|
|
166
166
|
children: /* @__PURE__ */ t("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
167
|
-
}),
|
|
167
|
+
}), z = (e) => /* @__PURE__ */ t(N, {
|
|
168
168
|
...e,
|
|
169
169
|
children: /* @__PURE__ */ t("path", { d: "M4 20h4L19 9l-4-4L4 16v4z" })
|
|
170
|
-
}),
|
|
170
|
+
}), B = (e) => /* @__PURE__ */ n(N, {
|
|
171
171
|
...e,
|
|
172
172
|
children: [/* @__PURE__ */ t("circle", {
|
|
173
173
|
cx: "12",
|
|
174
174
|
cy: "12",
|
|
175
175
|
r: "10"
|
|
176
176
|
}), /* @__PURE__ */ t("path", { d: "m15 9-6 6M9 9l6 6" })]
|
|
177
|
-
}), V = (e) => /* @__PURE__ */ n(
|
|
177
|
+
}), V = (e) => /* @__PURE__ */ n(N, {
|
|
178
178
|
...e,
|
|
179
179
|
children: [/* @__PURE__ */ t("path", { d: "M3 12s3.5-5 9-5 9 5 9 5-3.5 5-9 5-9-5-9-5Z" }), /* @__PURE__ */ t("circle", {
|
|
180
180
|
cx: "12",
|
|
181
181
|
cy: "12",
|
|
182
182
|
r: "2.5"
|
|
183
183
|
})]
|
|
184
|
-
}), H = (e) => /* @__PURE__ */ t(
|
|
184
|
+
}), H = (e) => /* @__PURE__ */ t(N, {
|
|
185
185
|
...e,
|
|
186
186
|
children: /* @__PURE__ */ t("path", { d: "M3 3l18 18M10.6 10.7a2 2 0 0 0 2.7 2.7M9.9 4.2A10.7 10.7 0 0 1 12 4c5.5 0 9 5.3 9 5.3a14 14 0 0 1-2.3 2.8M6.6 6.6C4.3 8.1 3 10 3 10s3.5 5 9 5c1 0 2-.2 2.8-.5" })
|
|
187
|
-
}), U = (e) => /* @__PURE__ */ t(
|
|
187
|
+
}), U = (e) => /* @__PURE__ */ t(N, {
|
|
188
188
|
...e,
|
|
189
189
|
children: /* @__PURE__ */ t("path", { d: "M12 10v7m0-10v.01" })
|
|
190
|
-
}), ne = (e) => /* @__PURE__ */ n(
|
|
190
|
+
}), ne = (e) => /* @__PURE__ */ n(N, {
|
|
191
191
|
...e,
|
|
192
192
|
children: [/* @__PURE__ */ t("circle", {
|
|
193
193
|
cx: "12",
|
|
194
194
|
cy: "12",
|
|
195
195
|
r: "10"
|
|
196
196
|
}), /* @__PURE__ */ t("path", { d: "M12 16v-4M12 8v.01" })]
|
|
197
|
-
}), re = (e) => /* @__PURE__ */ t(
|
|
197
|
+
}), re = (e) => /* @__PURE__ */ t(N, {
|
|
198
198
|
...e,
|
|
199
199
|
children: /* @__PURE__ */ t("path", { d: "M5 12h14" })
|
|
200
|
-
}),
|
|
200
|
+
}), ie = (e) => /* @__PURE__ */ t(N, {
|
|
201
201
|
...e,
|
|
202
202
|
children: /* @__PURE__ */ t("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" })
|
|
203
|
-
}),
|
|
203
|
+
}), ae = (e) => /* @__PURE__ */ n(N, {
|
|
204
204
|
...e,
|
|
205
205
|
children: [/* @__PURE__ */ t("rect", {
|
|
206
206
|
width: "18",
|
|
@@ -209,135 +209,135 @@ var M = {
|
|
|
209
209
|
y: "3",
|
|
210
210
|
rx: "2"
|
|
211
211
|
}), /* @__PURE__ */ t("path", { d: "M3 9h18M9 21V9" })]
|
|
212
|
-
}),
|
|
212
|
+
}), oe = (e) => /* @__PURE__ */ t(N, {
|
|
213
213
|
...e,
|
|
214
214
|
children: /* @__PURE__ */ t("path", {
|
|
215
215
|
d: "M8 5v14M16 5v14",
|
|
216
216
|
strokeWidth: "3"
|
|
217
217
|
})
|
|
218
|
-
}),
|
|
218
|
+
}), se = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(N, {
|
|
219
219
|
strokeWidth: e,
|
|
220
220
|
...n,
|
|
221
221
|
children: /* @__PURE__ */ t("path", { d: "M12 5v14M5 12h14" })
|
|
222
|
-
}),
|
|
222
|
+
}), ce = (e) => /* @__PURE__ */ t(N, {
|
|
223
223
|
...e,
|
|
224
224
|
children: /* @__PURE__ */ t("path", { d: "M3 5h18v14H3V5Zm10 7h6v5h-6v-5Z" })
|
|
225
|
-
}),
|
|
225
|
+
}), le = (e) => /* @__PURE__ */ t(N, {
|
|
226
226
|
...e,
|
|
227
227
|
children: /* @__PURE__ */ t("path", {
|
|
228
228
|
d: "m8 5 11 7-11 7V5Z",
|
|
229
229
|
fill: "currentColor",
|
|
230
230
|
stroke: "none"
|
|
231
231
|
})
|
|
232
|
-
}),
|
|
232
|
+
}), W = (e) => /* @__PURE__ */ t(N, {
|
|
233
233
|
...e,
|
|
234
234
|
children: /* @__PURE__ */ t("path", { d: "M4 7v5h5M5.5 11a7 7 0 1 1 1.3 6.3" })
|
|
235
|
-
}),
|
|
235
|
+
}), ue = (e) => /* @__PURE__ */ t(N, {
|
|
236
236
|
...e,
|
|
237
237
|
children: /* @__PURE__ */ t("path", { d: "M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm7.4 5.2.1-1.7-.1-1.7 2-1.5-2-3.4-2.4 1a8 8 0 0 0-2.9-1.7L13.8 2h-3.9l-.4 2.7a8 8 0 0 0-2.8 1.7l-2.5-1-2 3.4 2.1 1.5-.1 1.7.1 1.7-2.1 1.5 2 3.4 2.5-1a8 8 0 0 0 2.8 1.7l.4 2.7h3.9l.3-2.7a8 8 0 0 0 2.9-1.7l2.4 1 2-3.4-2-1.5Z" })
|
|
238
|
-
}),
|
|
238
|
+
}), de = (e) => /* @__PURE__ */ t(N, {
|
|
239
239
|
...e,
|
|
240
240
|
children: /* @__PURE__ */ t("path", { d: "M9 4H4v5m11-5h5v5M9 20H4v-5m11 5h5v-5" })
|
|
241
|
-
}),
|
|
241
|
+
}), fe = (e) => /* @__PURE__ */ t(N, {
|
|
242
242
|
...e,
|
|
243
243
|
children: /* @__PURE__ */ t("path", { d: "M4 9h5V4m6 5h5V4M4 15h5v5m6-5h5v5" })
|
|
244
|
-
}),
|
|
244
|
+
}), G = (e) => /* @__PURE__ */ t(N, {
|
|
245
245
|
...e,
|
|
246
246
|
children: /* @__PURE__ */ t("path", { d: "M4 6h16v12H4V6Zm7 4a2 2 0 1 0 0 4m7-4a2 2 0 1 0 0 4" })
|
|
247
|
-
}),
|
|
247
|
+
}), pe = (e) => /* @__PURE__ */ t(N, {
|
|
248
248
|
...e,
|
|
249
249
|
children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12-1c1.3 1.5 1.3 4.5 0 6m2.5-8.5c3 3 3 8 0 11" })
|
|
250
|
-
}),
|
|
250
|
+
}), me = (e) => /* @__PURE__ */ t(N, {
|
|
251
251
|
...e,
|
|
252
252
|
children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12 0 4 4m0-4-4 4" })
|
|
253
|
-
}),
|
|
253
|
+
}), he = (e) => /* @__PURE__ */ t(N, {
|
|
254
254
|
...e,
|
|
255
255
|
children: /* @__PURE__ */ t("path", { d: "M8 17V5m-3 3 3-3 3 3M16 7v12m-3-3 3 3 3-3" })
|
|
256
|
-
}),
|
|
256
|
+
}), ge = (e) => /* @__PURE__ */ t(N, {
|
|
257
257
|
...e,
|
|
258
258
|
children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
|
|
259
|
-
}),
|
|
259
|
+
}), _e = (e) => /* @__PURE__ */ t(N, {
|
|
260
260
|
...e,
|
|
261
261
|
children: /* @__PURE__ */ t("path", { d: "M12 5v14m-5-5 5 5 5-5" })
|
|
262
|
-
}),
|
|
262
|
+
}), ve = (e) => /* @__PURE__ */ n(N, {
|
|
263
263
|
...e,
|
|
264
264
|
children: [/* @__PURE__ */ t("circle", {
|
|
265
265
|
cx: "12",
|
|
266
266
|
cy: "12",
|
|
267
267
|
r: "10"
|
|
268
268
|
}), /* @__PURE__ */ t("path", { d: "m9 12 2 2 4-4" })]
|
|
269
|
-
}),
|
|
269
|
+
}), ye = (e) => /* @__PURE__ */ t(N, {
|
|
270
270
|
...e,
|
|
271
271
|
children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
|
|
272
|
-
}),
|
|
272
|
+
}), be = (e) => /* @__PURE__ */ n(N, {
|
|
273
273
|
...e,
|
|
274
274
|
children: [/* @__PURE__ */ t("path", { d: "M12 3.5L21 19H3L12 3.5Z" }), /* @__PURE__ */ t("path", { d: "M12 9v4.5M12 16.5v.01" })]
|
|
275
|
-
}),
|
|
275
|
+
}), K = (e) => (n) => /* @__PURE__ */ t(N, {
|
|
276
276
|
...n,
|
|
277
277
|
children: e.map(([e, t], n) => o(e, {
|
|
278
278
|
...t,
|
|
279
279
|
key: t.key ?? `${e}-${n}`
|
|
280
280
|
}))
|
|
281
|
-
}),
|
|
282
|
-
IconActivity:
|
|
281
|
+
}), xe = {
|
|
282
|
+
IconActivity: K([["path", {
|
|
283
283
|
d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
|
|
284
284
|
key: "169zse"
|
|
285
285
|
}]]),
|
|
286
|
-
IconAlertTriangle:
|
|
286
|
+
IconAlertTriangle: K([
|
|
287
287
|
["path", { d: "m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }],
|
|
288
288
|
["path", { d: "M12 9v4" }],
|
|
289
289
|
["path", { d: "M12 17h.01" }]
|
|
290
290
|
]),
|
|
291
|
-
IconArrowDown:
|
|
291
|
+
IconArrowDown: K([["path", {
|
|
292
292
|
d: "M12 5v14",
|
|
293
293
|
key: "s699le"
|
|
294
294
|
}], ["path", {
|
|
295
295
|
d: "m19 12-7 7-7-7",
|
|
296
296
|
key: "1idqje"
|
|
297
297
|
}]]),
|
|
298
|
-
IconArrowLeft:
|
|
298
|
+
IconArrowLeft: K([["path", {
|
|
299
299
|
d: "m12 19-7-7 7-7",
|
|
300
300
|
key: "1l729n"
|
|
301
301
|
}], ["path", {
|
|
302
302
|
d: "M19 12H5",
|
|
303
303
|
key: "x3x0zl"
|
|
304
304
|
}]]),
|
|
305
|
-
IconArrowRight:
|
|
305
|
+
IconArrowRight: K([["path", {
|
|
306
306
|
d: "M5 12h14",
|
|
307
307
|
key: "1ays0h"
|
|
308
308
|
}], ["path", {
|
|
309
309
|
d: "m12 5 7 7-7 7",
|
|
310
310
|
key: "xquz4c"
|
|
311
311
|
}]]),
|
|
312
|
-
IconArrowUp:
|
|
312
|
+
IconArrowUp: K([["path", {
|
|
313
313
|
d: "m5 12 7-7 7 7",
|
|
314
314
|
key: "hav0vg"
|
|
315
315
|
}], ["path", {
|
|
316
316
|
d: "M12 19V5",
|
|
317
317
|
key: "x0mq9r"
|
|
318
318
|
}]]),
|
|
319
|
-
IconArrowUpRight:
|
|
319
|
+
IconArrowUpRight: K([["path", {
|
|
320
320
|
d: "M7 7h10v10",
|
|
321
321
|
key: "1tivn9"
|
|
322
322
|
}], ["path", {
|
|
323
323
|
d: "M7 17 17 7",
|
|
324
324
|
key: "1vkiza"
|
|
325
325
|
}]]),
|
|
326
|
-
IconBarChart3:
|
|
326
|
+
IconBarChart3: K([
|
|
327
327
|
["path", { d: "M3 3v18h18" }],
|
|
328
328
|
["path", { d: "M18 17V9" }],
|
|
329
329
|
["path", { d: "M13 17V5" }],
|
|
330
330
|
["path", { d: "M8 17v-3" }]
|
|
331
331
|
]),
|
|
332
|
-
IconBedDouble:
|
|
333
|
-
IconBell:
|
|
332
|
+
IconBedDouble: F,
|
|
333
|
+
IconBell: K([["path", {
|
|
334
334
|
d: "M10.268 21a2 2 0 0 0 3.464 0",
|
|
335
335
|
key: "vwvbt9"
|
|
336
336
|
}], ["path", {
|
|
337
337
|
d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",
|
|
338
338
|
key: "11g9vi"
|
|
339
339
|
}]]),
|
|
340
|
-
IconBoxes:
|
|
340
|
+
IconBoxes: K([
|
|
341
341
|
["path", {
|
|
342
342
|
d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",
|
|
343
343
|
key: "lc1i9w"
|
|
@@ -387,7 +387,7 @@ var M = {
|
|
|
387
387
|
key: "1io7kd"
|
|
388
388
|
}]
|
|
389
389
|
]),
|
|
390
|
-
IconBuilding2:
|
|
390
|
+
IconBuilding2: K([
|
|
391
391
|
["path", {
|
|
392
392
|
d: "M10 12h4",
|
|
393
393
|
key: "a56b0p"
|
|
@@ -409,7 +409,7 @@ var M = {
|
|
|
409
409
|
key: "16ra0t"
|
|
410
410
|
}]
|
|
411
411
|
]),
|
|
412
|
-
IconCamera:
|
|
412
|
+
IconCamera: K([["path", {
|
|
413
413
|
d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",
|
|
414
414
|
key: "18u6gg"
|
|
415
415
|
}], ["circle", {
|
|
@@ -418,7 +418,7 @@ var M = {
|
|
|
418
418
|
r: "3",
|
|
419
419
|
key: "1vg3eu"
|
|
420
420
|
}]]),
|
|
421
|
-
IconChartNoAxesCombined:
|
|
421
|
+
IconChartNoAxesCombined: K([
|
|
422
422
|
["path", {
|
|
423
423
|
d: "M12 16v5",
|
|
424
424
|
key: "zza2cw"
|
|
@@ -444,11 +444,11 @@ var M = {
|
|
|
444
444
|
key: "1t2idw"
|
|
445
445
|
}]
|
|
446
446
|
]),
|
|
447
|
-
IconChevronRight:
|
|
447
|
+
IconChevronRight: K([["path", {
|
|
448
448
|
d: "m9 18 6-6-6-6",
|
|
449
449
|
key: "mthhwq"
|
|
450
450
|
}]]),
|
|
451
|
-
IconCircleAlert:
|
|
451
|
+
IconCircleAlert: K([
|
|
452
452
|
["circle", {
|
|
453
453
|
cx: "12",
|
|
454
454
|
cy: "12",
|
|
@@ -470,7 +470,7 @@ var M = {
|
|
|
470
470
|
key: "4dfq90"
|
|
471
471
|
}]
|
|
472
472
|
]),
|
|
473
|
-
IconClock3:
|
|
473
|
+
IconClock3: K([["circle", {
|
|
474
474
|
cx: "12",
|
|
475
475
|
cy: "12",
|
|
476
476
|
r: "10",
|
|
@@ -479,7 +479,7 @@ var M = {
|
|
|
479
479
|
d: "M12 6v6h4",
|
|
480
480
|
key: "135r8i"
|
|
481
481
|
}]]),
|
|
482
|
-
IconDownload:
|
|
482
|
+
IconDownload: K([
|
|
483
483
|
["path", {
|
|
484
484
|
d: "M12 15V3",
|
|
485
485
|
key: "m9g1x1"
|
|
@@ -493,7 +493,7 @@ var M = {
|
|
|
493
493
|
key: "brsn70"
|
|
494
494
|
}]
|
|
495
495
|
]),
|
|
496
|
-
IconExternalLink:
|
|
496
|
+
IconExternalLink: K([
|
|
497
497
|
["path", {
|
|
498
498
|
d: "M15 3h6v6",
|
|
499
499
|
key: "1q9fwt"
|
|
@@ -507,7 +507,7 @@ var M = {
|
|
|
507
507
|
key: "a6xqqp"
|
|
508
508
|
}]
|
|
509
509
|
]),
|
|
510
|
-
IconFactory:
|
|
510
|
+
IconFactory: K([
|
|
511
511
|
["path", {
|
|
512
512
|
d: "M12 16h.01",
|
|
513
513
|
key: "1drbdi"
|
|
@@ -525,14 +525,14 @@ var M = {
|
|
|
525
525
|
key: "18s6g9"
|
|
526
526
|
}]
|
|
527
527
|
]),
|
|
528
|
-
IconGauge:
|
|
528
|
+
IconGauge: K([["path", {
|
|
529
529
|
d: "m12 14 4-4",
|
|
530
530
|
key: "9kzdfg"
|
|
531
531
|
}], ["path", {
|
|
532
532
|
d: "M3.34 19a10 10 0 1 1 17.32 0",
|
|
533
533
|
key: "19p75a"
|
|
534
534
|
}]]),
|
|
535
|
-
IconGripVertical:
|
|
535
|
+
IconGripVertical: K([
|
|
536
536
|
["circle", {
|
|
537
537
|
cx: "9",
|
|
538
538
|
cy: "12",
|
|
@@ -570,7 +570,7 @@ var M = {
|
|
|
570
570
|
key: "f4zoj3"
|
|
571
571
|
}]
|
|
572
572
|
]),
|
|
573
|
-
IconLayoutDashboard:
|
|
573
|
+
IconLayoutDashboard: K([
|
|
574
574
|
["rect", {
|
|
575
575
|
width: "7",
|
|
576
576
|
height: "9",
|
|
@@ -604,7 +604,7 @@ var M = {
|
|
|
604
604
|
key: "ldoo1y"
|
|
605
605
|
}]
|
|
606
606
|
]),
|
|
607
|
-
IconLockKeyhole:
|
|
607
|
+
IconLockKeyhole: K([
|
|
608
608
|
["circle", {
|
|
609
609
|
cx: "12",
|
|
610
610
|
cy: "16",
|
|
@@ -624,7 +624,7 @@ var M = {
|
|
|
624
624
|
key: "1pqi11"
|
|
625
625
|
}]
|
|
626
626
|
]),
|
|
627
|
-
IconLogOut:
|
|
627
|
+
IconLogOut: K([
|
|
628
628
|
["path", {
|
|
629
629
|
d: "m16 17 5-5-5-5",
|
|
630
630
|
key: "1bji2h"
|
|
@@ -638,7 +638,7 @@ var M = {
|
|
|
638
638
|
key: "1uf3rs"
|
|
639
639
|
}]
|
|
640
640
|
]),
|
|
641
|
-
IconMaximize2:
|
|
641
|
+
IconMaximize2: K([
|
|
642
642
|
["path", {
|
|
643
643
|
d: "M15 3h6v6",
|
|
644
644
|
key: "1q9fwt"
|
|
@@ -656,7 +656,7 @@ var M = {
|
|
|
656
656
|
key: "wtvkvv"
|
|
657
657
|
}]
|
|
658
658
|
]),
|
|
659
|
-
IconMenu:
|
|
659
|
+
IconMenu: K([
|
|
660
660
|
["path", {
|
|
661
661
|
d: "M4 5h16",
|
|
662
662
|
key: "1tepv9"
|
|
@@ -670,7 +670,7 @@ var M = {
|
|
|
670
670
|
key: "1djgab"
|
|
671
671
|
}]
|
|
672
672
|
]),
|
|
673
|
-
IconPackageCheck:
|
|
673
|
+
IconPackageCheck: K([
|
|
674
674
|
["path", {
|
|
675
675
|
d: "M12 22V12",
|
|
676
676
|
key: "d0xqtd"
|
|
@@ -692,7 +692,7 @@ var M = {
|
|
|
692
692
|
key: "9yrvtv"
|
|
693
693
|
}]
|
|
694
694
|
]),
|
|
695
|
-
IconRefreshCw:
|
|
695
|
+
IconRefreshCw: K([
|
|
696
696
|
["path", {
|
|
697
697
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
698
698
|
key: "v9h5vc"
|
|
@@ -710,14 +710,14 @@ var M = {
|
|
|
710
710
|
key: "1cv678"
|
|
711
711
|
}]
|
|
712
712
|
]),
|
|
713
|
-
IconRotateCw:
|
|
713
|
+
IconRotateCw: K([["path", {
|
|
714
714
|
d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",
|
|
715
715
|
key: "1p45f6"
|
|
716
716
|
}], ["path", {
|
|
717
717
|
d: "M21 3v5h-5",
|
|
718
718
|
key: "1q7to0"
|
|
719
719
|
}]]),
|
|
720
|
-
IconSearch:
|
|
720
|
+
IconSearch: K([["path", {
|
|
721
721
|
d: "m21 21-4.34-4.34",
|
|
722
722
|
key: "14j7rj"
|
|
723
723
|
}], ["circle", {
|
|
@@ -726,7 +726,7 @@ var M = {
|
|
|
726
726
|
r: "8",
|
|
727
727
|
key: "4ej97u"
|
|
728
728
|
}]]),
|
|
729
|
-
IconSettings2:
|
|
729
|
+
IconSettings2: K([
|
|
730
730
|
["path", {
|
|
731
731
|
d: "M14 17H5",
|
|
732
732
|
key: "gfn3mx"
|
|
@@ -748,7 +748,7 @@ var M = {
|
|
|
748
748
|
key: "dfmy0x"
|
|
749
749
|
}]
|
|
750
750
|
]),
|
|
751
|
-
IconShieldAlert:
|
|
751
|
+
IconShieldAlert: K([
|
|
752
752
|
["path", {
|
|
753
753
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
754
754
|
key: "oel41y"
|
|
@@ -762,14 +762,14 @@ var M = {
|
|
|
762
762
|
key: "1drbdi"
|
|
763
763
|
}]
|
|
764
764
|
]),
|
|
765
|
-
IconShieldCheck:
|
|
765
|
+
IconShieldCheck: K([["path", {
|
|
766
766
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
767
767
|
key: "oel41y"
|
|
768
768
|
}], ["path", {
|
|
769
769
|
d: "m9 12 2 2 4-4",
|
|
770
770
|
key: "dzmm74"
|
|
771
771
|
}]]),
|
|
772
|
-
IconSmartphone:
|
|
772
|
+
IconSmartphone: K([["rect", {
|
|
773
773
|
width: "14",
|
|
774
774
|
height: "20",
|
|
775
775
|
x: "5",
|
|
@@ -781,7 +781,7 @@ var M = {
|
|
|
781
781
|
d: "M12 18h.01",
|
|
782
782
|
key: "mhygvu"
|
|
783
783
|
}]]),
|
|
784
|
-
IconSparkles:
|
|
784
|
+
IconSparkles: K([
|
|
785
785
|
["path", {
|
|
786
786
|
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
787
787
|
key: "1s2grr"
|
|
@@ -801,22 +801,22 @@ var M = {
|
|
|
801
801
|
key: "6kqj1y"
|
|
802
802
|
}]
|
|
803
803
|
]),
|
|
804
|
-
IconTable2:
|
|
804
|
+
IconTable2: K([["path", {
|
|
805
805
|
d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",
|
|
806
806
|
key: "gugj83"
|
|
807
807
|
}]]),
|
|
808
|
-
IconThermometer:
|
|
808
|
+
IconThermometer: K([["path", {
|
|
809
809
|
d: "M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",
|
|
810
810
|
key: "17jzev"
|
|
811
811
|
}]]),
|
|
812
|
-
IconTrendingUp:
|
|
812
|
+
IconTrendingUp: K([["path", {
|
|
813
813
|
d: "M16 7h6v6",
|
|
814
814
|
key: "box55l"
|
|
815
815
|
}], ["path", {
|
|
816
816
|
d: "m22 7-8.5 8.5-5-5L2 17",
|
|
817
817
|
key: "1t1m79"
|
|
818
818
|
}]]),
|
|
819
|
-
IconUserCheck:
|
|
819
|
+
IconUserCheck: K([
|
|
820
820
|
["path", {
|
|
821
821
|
d: "m16 11 2 2 4-4",
|
|
822
822
|
key: "9rsbq5"
|
|
@@ -832,7 +832,7 @@ var M = {
|
|
|
832
832
|
key: "nufk8"
|
|
833
833
|
}]
|
|
834
834
|
]),
|
|
835
|
-
IconUserRound:
|
|
835
|
+
IconUserRound: K([["circle", {
|
|
836
836
|
cx: "12",
|
|
837
837
|
cy: "8",
|
|
838
838
|
r: "5",
|
|
@@ -841,7 +841,7 @@ var M = {
|
|
|
841
841
|
d: "M20 21a8 8 0 0 0-16 0",
|
|
842
842
|
key: "rfgkzh"
|
|
843
843
|
}]]),
|
|
844
|
-
IconUsers:
|
|
844
|
+
IconUsers: K([
|
|
845
845
|
["path", {
|
|
846
846
|
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
847
847
|
key: "1yyitq"
|
|
@@ -861,7 +861,7 @@ var M = {
|
|
|
861
861
|
key: "nufk8"
|
|
862
862
|
}]
|
|
863
863
|
]),
|
|
864
|
-
IconUserX:
|
|
864
|
+
IconUserX: K([
|
|
865
865
|
["path", {
|
|
866
866
|
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
867
867
|
key: "1yyitq"
|
|
@@ -887,7 +887,7 @@ var M = {
|
|
|
887
887
|
key: "1swrse"
|
|
888
888
|
}]
|
|
889
889
|
]),
|
|
890
|
-
IconVideo:
|
|
890
|
+
IconVideo: K([["path", {
|
|
891
891
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
892
892
|
key: "ftymec"
|
|
893
893
|
}], ["rect", {
|
|
@@ -898,7 +898,7 @@ var M = {
|
|
|
898
898
|
rx: "2",
|
|
899
899
|
key: "158x01"
|
|
900
900
|
}]]),
|
|
901
|
-
IconVideoOff:
|
|
901
|
+
IconVideoOff: K([
|
|
902
902
|
["path", {
|
|
903
903
|
d: "M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196",
|
|
904
904
|
key: "w8jjjt"
|
|
@@ -912,7 +912,7 @@ var M = {
|
|
|
912
912
|
key: "1ooewy"
|
|
913
913
|
}]
|
|
914
914
|
]),
|
|
915
|
-
IconVolume2:
|
|
915
|
+
IconVolume2: K([
|
|
916
916
|
["path", {
|
|
917
917
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
918
918
|
key: "uqj9uw"
|
|
@@ -926,62 +926,62 @@ var M = {
|
|
|
926
926
|
key: "ijwkga"
|
|
927
927
|
}]
|
|
928
928
|
]),
|
|
929
|
-
IconX:
|
|
929
|
+
IconX: K([["path", {
|
|
930
930
|
d: "M18 6 6 18",
|
|
931
931
|
key: "1bl5f8"
|
|
932
932
|
}], ["path", {
|
|
933
933
|
d: "m6 6 12 12",
|
|
934
934
|
key: "d8bk6v"
|
|
935
935
|
}]]),
|
|
936
|
-
IconBasket:
|
|
937
|
-
IconCheck:
|
|
938
|
-
IconChevron:
|
|
939
|
-
IconCross:
|
|
940
|
-
IconEdit:
|
|
941
|
-
IconErrorCircle:
|
|
936
|
+
IconBasket: P,
|
|
937
|
+
IconCheck: I,
|
|
938
|
+
IconChevron: L,
|
|
939
|
+
IconCross: R,
|
|
940
|
+
IconEdit: z,
|
|
941
|
+
IconErrorCircle: B,
|
|
942
942
|
IconEye: V,
|
|
943
943
|
IconEyeOff: H,
|
|
944
944
|
IconInfo: U,
|
|
945
945
|
IconInfoCircle: ne,
|
|
946
946
|
IconMinus: re,
|
|
947
|
-
IconList:
|
|
948
|
-
IconPanelsTopLeft:
|
|
949
|
-
IconPause:
|
|
950
|
-
IconPlus:
|
|
951
|
-
IconPictureInPicture:
|
|
952
|
-
IconPlay:
|
|
953
|
-
IconReplay:
|
|
954
|
-
IconSettings:
|
|
955
|
-
IconFullscreen:
|
|
956
|
-
IconFullscreenExit:
|
|
957
|
-
IconCaptions:
|
|
958
|
-
IconVolume:
|
|
959
|
-
IconVolumeMuted:
|
|
960
|
-
IconSort:
|
|
961
|
-
IconSortAscending:
|
|
962
|
-
IconSortDescending:
|
|
963
|
-
IconSuccessCircle:
|
|
964
|
-
IconUpload:
|
|
965
|
-
IconWarning:
|
|
966
|
-
},
|
|
967
|
-
let r =
|
|
947
|
+
IconList: ie,
|
|
948
|
+
IconPanelsTopLeft: ae,
|
|
949
|
+
IconPause: oe,
|
|
950
|
+
IconPlus: se,
|
|
951
|
+
IconPictureInPicture: ce,
|
|
952
|
+
IconPlay: le,
|
|
953
|
+
IconReplay: W,
|
|
954
|
+
IconSettings: ue,
|
|
955
|
+
IconFullscreen: de,
|
|
956
|
+
IconFullscreenExit: fe,
|
|
957
|
+
IconCaptions: G,
|
|
958
|
+
IconVolume: pe,
|
|
959
|
+
IconVolumeMuted: me,
|
|
960
|
+
IconSort: he,
|
|
961
|
+
IconSortAscending: ge,
|
|
962
|
+
IconSortDescending: _e,
|
|
963
|
+
IconSuccessCircle: ve,
|
|
964
|
+
IconUpload: ye,
|
|
965
|
+
IconWarning: be
|
|
966
|
+
}, q = ({ name: e, ...n }) => {
|
|
967
|
+
let r = xe[e];
|
|
968
968
|
return /* @__PURE__ */ t(r, { ...n });
|
|
969
|
-
},
|
|
969
|
+
}, Se = {
|
|
970
970
|
wrapper: "_wrapper_1seon_1",
|
|
971
971
|
label: "_label_1seon_13",
|
|
972
972
|
input: "_input_1seon_35",
|
|
973
973
|
control: "_control_1seon_49",
|
|
974
974
|
disabled: "_disabled_1seon_95",
|
|
975
975
|
controlError: "_controlError_1seon_121"
|
|
976
|
-
},
|
|
976
|
+
}, Ce = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, readOnly: c = !1, className: l = "", name: u, id: p, indeterminate: m = !1, ariaLabel: g, ..._ }) => {
|
|
977
977
|
let v = f(), y = p ?? `ds-checkbox-${u ?? v}`, b = h(null), x = a ? `${y}-hint` : void 0, S = o ? `${y}-error` : void 0;
|
|
978
978
|
return d(() => {
|
|
979
979
|
b.current && (b.current.indeterminate = m && !e);
|
|
980
980
|
}, [e, m]), /* @__PURE__ */ n("div", {
|
|
981
|
-
className: `${
|
|
981
|
+
className: `${Se.wrapper} ${l}`,
|
|
982
982
|
children: [
|
|
983
983
|
/* @__PURE__ */ n("label", {
|
|
984
|
-
className: `${
|
|
984
|
+
className: `${Se.label} ${s ? Se.disabled : ""}`,
|
|
985
985
|
htmlFor: y,
|
|
986
986
|
children: [
|
|
987
987
|
/* @__PURE__ */ t("input", {
|
|
@@ -995,20 +995,20 @@ var M = {
|
|
|
995
995
|
"aria-invalid": !!o,
|
|
996
996
|
"aria-describedby": [x, S].filter(Boolean).join(" ") || void 0,
|
|
997
997
|
"aria-label": g,
|
|
998
|
-
className:
|
|
998
|
+
className: Se.input,
|
|
999
999
|
onChange: (e) => {
|
|
1000
1000
|
c || r?.(e.target.checked, e);
|
|
1001
1001
|
},
|
|
1002
1002
|
..._
|
|
1003
1003
|
}),
|
|
1004
1004
|
/* @__PURE__ */ n("span", {
|
|
1005
|
-
className: `${
|
|
1005
|
+
className: `${Se.control} ${o ? Se.controlError : ""}`,
|
|
1006
1006
|
"aria-hidden": "true",
|
|
1007
|
-
children: [m && !e && /* @__PURE__ */ t(
|
|
1007
|
+
children: [m && !e && /* @__PURE__ */ t(q, {
|
|
1008
1008
|
name: "IconMinus",
|
|
1009
1009
|
width: 16,
|
|
1010
1010
|
height: 16
|
|
1011
|
-
}), e && /* @__PURE__ */ t(
|
|
1011
|
+
}), e && /* @__PURE__ */ t(q, {
|
|
1012
1012
|
name: "IconCheck",
|
|
1013
1013
|
width: 16,
|
|
1014
1014
|
height: 16
|
|
@@ -1017,18 +1017,18 @@ var M = {
|
|
|
1017
1017
|
i && /* @__PURE__ */ t("span", { children: i })
|
|
1018
1018
|
]
|
|
1019
1019
|
}),
|
|
1020
|
-
a && !o && /* @__PURE__ */ t(
|
|
1020
|
+
a && !o && /* @__PURE__ */ t(M, {
|
|
1021
1021
|
id: x,
|
|
1022
1022
|
children: a
|
|
1023
1023
|
}),
|
|
1024
|
-
o && /* @__PURE__ */ t(
|
|
1024
|
+
o && /* @__PURE__ */ t(M, {
|
|
1025
1025
|
id: S,
|
|
1026
1026
|
variant: "error",
|
|
1027
1027
|
children: o
|
|
1028
1028
|
})
|
|
1029
1029
|
]
|
|
1030
1030
|
});
|
|
1031
|
-
},
|
|
1031
|
+
}, J = {
|
|
1032
1032
|
wrapper: "_wrapper_su17c_1",
|
|
1033
1033
|
trigger: "_trigger_su17c_17",
|
|
1034
1034
|
sm: "_sm_su17c_53",
|
|
@@ -1059,7 +1059,7 @@ var M = {
|
|
|
1059
1059
|
timeLabel: "_timeLabel_su17c_533",
|
|
1060
1060
|
previousMonth: "_previousMonth_su17c_593",
|
|
1061
1061
|
nextMonth: "_nextMonth_su17c_601"
|
|
1062
|
-
},
|
|
1062
|
+
}, we = [
|
|
1063
1063
|
"Пн",
|
|
1064
1064
|
"Вт",
|
|
1065
1065
|
"Ср",
|
|
@@ -1067,7 +1067,7 @@ var M = {
|
|
|
1067
1067
|
"Пт",
|
|
1068
1068
|
"Сб",
|
|
1069
1069
|
"Вс"
|
|
1070
|
-
],
|
|
1070
|
+
], Te = [
|
|
1071
1071
|
"Январь",
|
|
1072
1072
|
"Февраль",
|
|
1073
1073
|
"Март",
|
|
@@ -1080,8 +1080,8 @@ var M = {
|
|
|
1080
1080
|
"Октябрь",
|
|
1081
1081
|
"Ноябрь",
|
|
1082
1082
|
"Декабрь"
|
|
1083
|
-
],
|
|
1084
|
-
let t = e.replace(/\D/g, "").slice(0,
|
|
1083
|
+
], Y = (e) => String(e).padStart(2, "0"), X = 8, Ee = "Некорректная дата", De = (e) => e ? `${Y(e.getDate())}.${Y(e.getMonth() + 1)}.${e.getFullYear()}` : "", Oe = (e) => {
|
|
1084
|
+
let t = e.replace(/\D/g, "").slice(0, X);
|
|
1085
1085
|
return [
|
|
1086
1086
|
t.slice(0, 2),
|
|
1087
1087
|
t.slice(2, 4),
|
|
@@ -1104,7 +1104,7 @@ var M = {
|
|
|
1104
1104
|
return a.getFullYear() !== i || a.getMonth() !== r || a.getDate() !== n ? null : a;
|
|
1105
1105
|
}, Me = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Ne = (e, t) => {
|
|
1106
1106
|
if (!e) return "";
|
|
1107
|
-
let n = `${e.getFullYear()}-${
|
|
1107
|
+
let n = `${e.getFullYear()}-${Y(e.getMonth() + 1)}-${Y(e.getDate())}`, r = `${Y(e.getHours())}:${Y(e.getMinutes())}`;
|
|
1108
1108
|
return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
|
|
1109
1109
|
}, Pe = (e, t) => {
|
|
1110
1110
|
if (!e) return null;
|
|
@@ -1126,7 +1126,7 @@ var M = {
|
|
|
1126
1126
|
return Number.isNaN(n.getTime()) ? null : n;
|
|
1127
1127
|
}, Fe = (e, t) => {
|
|
1128
1128
|
if (!e) return "";
|
|
1129
|
-
let n = `${
|
|
1129
|
+
let n = `${Y(e.getDate())}.${Y(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${Y(e.getHours())}:${Y(e.getMinutes())}`;
|
|
1130
1130
|
return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
|
|
1131
1131
|
}, Ie = (e) => {
|
|
1132
1132
|
let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
|
|
@@ -1137,60 +1137,60 @@ var M = {
|
|
|
1137
1137
|
}, Le = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), Re = (e, t, n) => {
|
|
1138
1138
|
let r = Me(e).getTime();
|
|
1139
1139
|
return !!(t && r < Me(t).getTime() || n && r > Me(n).getTime());
|
|
1140
|
-
}, ze = 8, Be = 6, Ve = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: s, hint: c, error: u, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id:
|
|
1141
|
-
let
|
|
1140
|
+
}, ze = 8, Be = 6, Ve = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: s, hint: c, error: u, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: ee, name: w, className: T = "" }) => {
|
|
1141
|
+
let E = f(), D = ee ?? `ds-date-time-${w ?? E}`, O = c ? `${D}-hint` : void 0, k = u ? `${D}-error` : void 0, A = h(null), j = h(null), N = h(null), P = h(null), [F, I] = g(!1), [L, R] = g(r ?? /* @__PURE__ */ new Date()), [z, B] = g(Ne(r, "time")), [V, H] = g(De(r)), [U, ne] = g(""), [re, ie] = g(0), [ae, oe] = g(null), se = m(() => Ie(L), [L]), ce = a !== "time", le = a !== "date";
|
|
1142
1142
|
d(() => {
|
|
1143
|
-
r &&
|
|
1143
|
+
r && R(r), B(Ne(r, "time")), H(De(r));
|
|
1144
1144
|
}, [r]), d(() => () => {
|
|
1145
|
-
|
|
1145
|
+
P.current && clearTimeout(P.current);
|
|
1146
1146
|
}, []);
|
|
1147
|
-
let
|
|
1148
|
-
let e =
|
|
1147
|
+
let W = l(() => {
|
|
1148
|
+
let e = j.current, t = N.current;
|
|
1149
1149
|
if (!e || !t) return;
|
|
1150
1150
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - ze, o = n.top - ze, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(ze, n.top - r.height - Be) : n.bottom + Be, u = n.left, d = i - r.width - ze;
|
|
1151
|
-
|
|
1151
|
+
oe({
|
|
1152
1152
|
top: l,
|
|
1153
1153
|
left: Math.max(ze, Math.min(u, d)),
|
|
1154
1154
|
maxHeight: c
|
|
1155
1155
|
});
|
|
1156
1156
|
}, []);
|
|
1157
1157
|
p(() => {
|
|
1158
|
-
if (!
|
|
1159
|
-
|
|
1158
|
+
if (!F) {
|
|
1159
|
+
oe(null);
|
|
1160
1160
|
return;
|
|
1161
1161
|
}
|
|
1162
|
-
return
|
|
1163
|
-
window.removeEventListener("resize",
|
|
1162
|
+
return W(), window.addEventListener("resize", W), window.addEventListener("scroll", W, !0), () => {
|
|
1163
|
+
window.removeEventListener("resize", W), window.removeEventListener("scroll", W, !0);
|
|
1164
1164
|
};
|
|
1165
1165
|
}, [
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1166
|
+
F,
|
|
1167
|
+
W,
|
|
1168
|
+
L,
|
|
1169
|
+
z
|
|
1170
1170
|
]), d(() => {
|
|
1171
|
-
if (!
|
|
1171
|
+
if (!F) return;
|
|
1172
1172
|
let e = (e) => {
|
|
1173
|
-
let t = e.target, n =
|
|
1174
|
-
!n && !r &&
|
|
1173
|
+
let t = e.target, n = A.current?.contains(t), r = N.current?.contains(t);
|
|
1174
|
+
!n && !r && I(!1);
|
|
1175
1175
|
}, t = (e) => {
|
|
1176
|
-
e.key === "Escape" && (
|
|
1176
|
+
e.key === "Escape" && (I(!1), j.current?.focus());
|
|
1177
1177
|
};
|
|
1178
1178
|
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
1179
1179
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1180
1180
|
};
|
|
1181
|
-
}, [
|
|
1182
|
-
let
|
|
1181
|
+
}, [F]);
|
|
1182
|
+
let ue = (e) => {
|
|
1183
1183
|
if (Re(e, x, S)) return;
|
|
1184
1184
|
let t = a === "date" ? Pe(Ne(e, "date"), "date") : new Date(e);
|
|
1185
|
-
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), H(De(t)), a === "date" &&
|
|
1186
|
-
},
|
|
1187
|
-
ne(Ee),
|
|
1188
|
-
ne(""),
|
|
1185
|
+
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), H(De(t)), a === "date" && I(!1));
|
|
1186
|
+
}, de = () => {
|
|
1187
|
+
ne(Ee), ie((e) => e + 1), P.current && clearTimeout(P.current), P.current = setTimeout(() => {
|
|
1188
|
+
ne(""), P.current = null;
|
|
1189
1189
|
}, 3e3);
|
|
1190
|
-
},
|
|
1191
|
-
let t = e.replace(/\D/g, "").slice(0,
|
|
1190
|
+
}, fe = (e) => {
|
|
1191
|
+
let t = e.replace(/\D/g, "").slice(0, X);
|
|
1192
1192
|
if (!Ae(t)) {
|
|
1193
|
-
|
|
1193
|
+
de();
|
|
1194
1194
|
return;
|
|
1195
1195
|
}
|
|
1196
1196
|
let n = Oe(t);
|
|
@@ -1198,170 +1198,170 @@ var M = {
|
|
|
1198
1198
|
i?.(null);
|
|
1199
1199
|
return;
|
|
1200
1200
|
}
|
|
1201
|
-
if (t.length <
|
|
1201
|
+
if (t.length < X) return;
|
|
1202
1202
|
let o = je(n);
|
|
1203
1203
|
if (!o || Re(o, x, S)) {
|
|
1204
|
-
|
|
1204
|
+
de();
|
|
1205
1205
|
return;
|
|
1206
1206
|
}
|
|
1207
|
-
a === "datetime" && o.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(o),
|
|
1208
|
-
},
|
|
1209
|
-
if (
|
|
1207
|
+
a === "datetime" && o.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(o), R(o), I(!1), requestAnimationFrame(() => j.current?.blur());
|
|
1208
|
+
}, G = (e) => {
|
|
1209
|
+
if (B(e), !e) {
|
|
1210
1210
|
i?.(null);
|
|
1211
1211
|
return;
|
|
1212
1212
|
}
|
|
1213
1213
|
let t = Pe(e, "time");
|
|
1214
1214
|
if (!t) return;
|
|
1215
|
-
let n = new Date(a === "datetime" ? r ??
|
|
1215
|
+
let n = new Date(a === "datetime" ? r ?? L : /* @__PURE__ */ new Date());
|
|
1216
1216
|
n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
|
|
1217
|
-
},
|
|
1217
|
+
}, pe = s ?? (a === "date" ? "ДД.ММ.ГГГГ" : a === "time" ? "ЧЧ:ММ" : "ДД.ММ.ГГГГ ЧЧ:ММ"), me = U ? `${D}-validation` : void 0, he = [
|
|
1218
|
+
O,
|
|
1218
1219
|
k,
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
className: X.panel,
|
|
1220
|
+
me
|
|
1221
|
+
].filter(Boolean).join(" ") || void 0, ge = F && !y ? /* @__PURE__ */ n("div", {
|
|
1222
|
+
ref: N,
|
|
1223
|
+
className: J.panel,
|
|
1224
1224
|
role: "dialog",
|
|
1225
|
-
"aria-label": o ??
|
|
1226
|
-
style:
|
|
1227
|
-
top:
|
|
1228
|
-
left:
|
|
1229
|
-
maxHeight:
|
|
1225
|
+
"aria-label": o ?? pe,
|
|
1226
|
+
style: ae ? {
|
|
1227
|
+
top: ae.top,
|
|
1228
|
+
left: ae.left,
|
|
1229
|
+
maxHeight: ae.maxHeight
|
|
1230
1230
|
} : {
|
|
1231
1231
|
visibility: "hidden",
|
|
1232
1232
|
top: 0,
|
|
1233
1233
|
left: 0
|
|
1234
1234
|
},
|
|
1235
|
-
children: [
|
|
1235
|
+
children: [ce && /* @__PURE__ */ n(e, { children: [
|
|
1236
1236
|
/* @__PURE__ */ n("div", {
|
|
1237
|
-
className:
|
|
1237
|
+
className: J.calendarHeader,
|
|
1238
1238
|
children: [
|
|
1239
1239
|
/* @__PURE__ */ t("button", {
|
|
1240
1240
|
type: "button",
|
|
1241
|
-
className:
|
|
1241
|
+
className: J.nav,
|
|
1242
1242
|
"aria-label": "Предыдущий месяц",
|
|
1243
|
-
onClick: () =>
|
|
1244
|
-
children: /* @__PURE__ */ t(
|
|
1243
|
+
onClick: () => R(new Date(L.getFullYear(), L.getMonth() - 1, 1)),
|
|
1244
|
+
children: /* @__PURE__ */ t(q, {
|
|
1245
1245
|
name: "IconChevron",
|
|
1246
1246
|
width: 20,
|
|
1247
1247
|
height: 20,
|
|
1248
|
-
className:
|
|
1248
|
+
className: J.previousMonth
|
|
1249
1249
|
})
|
|
1250
1250
|
}),
|
|
1251
1251
|
/* @__PURE__ */ t("select", {
|
|
1252
|
-
className:
|
|
1252
|
+
className: J.monthSelect,
|
|
1253
1253
|
"aria-label": "Месяц",
|
|
1254
|
-
value:
|
|
1255
|
-
onChange: (e) =>
|
|
1256
|
-
children:
|
|
1254
|
+
value: L.getMonth(),
|
|
1255
|
+
onChange: (e) => R(new Date(L.getFullYear(), Number(e.target.value), 1)),
|
|
1256
|
+
children: Te.map((e, n) => /* @__PURE__ */ t("option", {
|
|
1257
1257
|
value: n,
|
|
1258
1258
|
children: e
|
|
1259
1259
|
}, e))
|
|
1260
1260
|
}),
|
|
1261
1261
|
/* @__PURE__ */ t("input", {
|
|
1262
|
-
className:
|
|
1262
|
+
className: J.yearInput,
|
|
1263
1263
|
type: "number",
|
|
1264
1264
|
"aria-label": "Год",
|
|
1265
|
-
value:
|
|
1266
|
-
onChange: (e) =>
|
|
1265
|
+
value: L.getFullYear(),
|
|
1266
|
+
onChange: (e) => R(new Date(Number(e.target.value), L.getMonth(), 1))
|
|
1267
1267
|
}),
|
|
1268
1268
|
/* @__PURE__ */ t("button", {
|
|
1269
1269
|
type: "button",
|
|
1270
|
-
className:
|
|
1270
|
+
className: J.nav,
|
|
1271
1271
|
"aria-label": "Следующий месяц",
|
|
1272
|
-
onClick: () =>
|
|
1273
|
-
children: /* @__PURE__ */ t(
|
|
1272
|
+
onClick: () => R(new Date(L.getFullYear(), L.getMonth() + 1, 1)),
|
|
1273
|
+
children: /* @__PURE__ */ t(q, {
|
|
1274
1274
|
name: "IconChevron",
|
|
1275
1275
|
width: 20,
|
|
1276
1276
|
height: 20,
|
|
1277
|
-
className:
|
|
1277
|
+
className: J.nextMonth
|
|
1278
1278
|
})
|
|
1279
1279
|
})
|
|
1280
1280
|
]
|
|
1281
1281
|
}),
|
|
1282
1282
|
/* @__PURE__ */ t("div", {
|
|
1283
|
-
className:
|
|
1284
|
-
children:
|
|
1283
|
+
className: J.weekdays,
|
|
1284
|
+
children: we.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
|
|
1285
1285
|
}),
|
|
1286
1286
|
/* @__PURE__ */ t("div", {
|
|
1287
|
-
className:
|
|
1288
|
-
children:
|
|
1287
|
+
className: J.days,
|
|
1288
|
+
children: se.map((e) => {
|
|
1289
1289
|
let n = Le(r, e);
|
|
1290
1290
|
return /* @__PURE__ */ t("button", {
|
|
1291
1291
|
type: "button",
|
|
1292
|
-
className: `${
|
|
1292
|
+
className: `${J.day} ${e.getMonth() === L.getMonth() ? "" : J.outside} ${n ? J.selected : ""}`,
|
|
1293
1293
|
disabled: Re(e, x, S),
|
|
1294
1294
|
"aria-pressed": n,
|
|
1295
|
-
onClick: () =>
|
|
1295
|
+
onClick: () => ue(e),
|
|
1296
1296
|
children: e.getDate()
|
|
1297
1297
|
}, e.toISOString());
|
|
1298
1298
|
})
|
|
1299
1299
|
})
|
|
1300
|
-
] }),
|
|
1301
|
-
className:
|
|
1300
|
+
] }), le && /* @__PURE__ */ n("label", {
|
|
1301
|
+
className: J.timeLabel,
|
|
1302
1302
|
children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
|
|
1303
|
-
className:
|
|
1303
|
+
className: J.timeInput,
|
|
1304
1304
|
type: "time",
|
|
1305
|
-
value:
|
|
1306
|
-
onChange: (e) =>
|
|
1305
|
+
value: z,
|
|
1306
|
+
onChange: (e) => G(e.target.value)
|
|
1307
1307
|
})]
|
|
1308
1308
|
})]
|
|
1309
1309
|
}) : null;
|
|
1310
1310
|
return /* @__PURE__ */ n("div", {
|
|
1311
|
-
ref:
|
|
1312
|
-
className: `${
|
|
1311
|
+
ref: A,
|
|
1312
|
+
className: `${J.wrapper} ${T}`,
|
|
1313
1313
|
children: [
|
|
1314
|
-
o && /* @__PURE__ */ t(
|
|
1315
|
-
htmlFor:
|
|
1314
|
+
o && /* @__PURE__ */ t(te, {
|
|
1315
|
+
htmlFor: D,
|
|
1316
1316
|
required: b,
|
|
1317
1317
|
disabled: v,
|
|
1318
1318
|
children: o
|
|
1319
1319
|
}),
|
|
1320
|
-
|
|
1321
|
-
className: `${
|
|
1320
|
+
ce ? /* @__PURE__ */ n("div", {
|
|
1321
|
+
className: `${J.trigger} ${J[C]} ${u ? J.error : ""} ${v ? J.disabled : ""}`,
|
|
1322
1322
|
children: [
|
|
1323
1323
|
/* @__PURE__ */ t("input", {
|
|
1324
|
-
ref:
|
|
1325
|
-
id:
|
|
1326
|
-
name:
|
|
1327
|
-
className:
|
|
1324
|
+
ref: j,
|
|
1325
|
+
id: D,
|
|
1326
|
+
name: w,
|
|
1327
|
+
className: J.dateInput,
|
|
1328
1328
|
value: V,
|
|
1329
|
-
placeholder:
|
|
1329
|
+
placeholder: pe.split(" ")[0],
|
|
1330
1330
|
inputMode: "numeric",
|
|
1331
1331
|
autoComplete: "off",
|
|
1332
1332
|
maxLength: 10,
|
|
1333
1333
|
disabled: v,
|
|
1334
1334
|
readOnly: y,
|
|
1335
|
-
"aria-expanded":
|
|
1335
|
+
"aria-expanded": F,
|
|
1336
1336
|
"aria-haspopup": "dialog",
|
|
1337
|
-
"aria-describedby":
|
|
1337
|
+
"aria-describedby": he,
|
|
1338
1338
|
"aria-invalid": !!(u || U) || void 0,
|
|
1339
1339
|
onFocus: () => {
|
|
1340
|
-
y ||
|
|
1340
|
+
y || I(!0);
|
|
1341
1341
|
},
|
|
1342
1342
|
onClick: () => {
|
|
1343
|
-
y ||
|
|
1343
|
+
y || I(!0);
|
|
1344
1344
|
},
|
|
1345
|
-
onChange: (e) =>
|
|
1345
|
+
onChange: (e) => fe(e.target.value)
|
|
1346
1346
|
}),
|
|
1347
|
-
a === "datetime" &&
|
|
1348
|
-
className:
|
|
1349
|
-
children:
|
|
1347
|
+
a === "datetime" && z && /* @__PURE__ */ t("span", {
|
|
1348
|
+
className: J.timeValue,
|
|
1349
|
+
children: z
|
|
1350
1350
|
}),
|
|
1351
1351
|
/* @__PURE__ */ t("button", {
|
|
1352
1352
|
type: "button",
|
|
1353
|
-
className:
|
|
1353
|
+
className: J.chevronButton,
|
|
1354
1354
|
disabled: v || y,
|
|
1355
|
-
"aria-label":
|
|
1355
|
+
"aria-label": F ? "Закрыть календарь" : "Открыть календарь",
|
|
1356
1356
|
tabIndex: -1,
|
|
1357
1357
|
onMouseDown: (e) => e.preventDefault(),
|
|
1358
1358
|
onClick: () => {
|
|
1359
|
-
|
|
1359
|
+
I((e) => !e), j.current?.focus();
|
|
1360
1360
|
},
|
|
1361
1361
|
children: /* @__PURE__ */ t("span", {
|
|
1362
|
-
className: `${
|
|
1362
|
+
className: `${J.chevron} ${ge ? J.chevronOpen : ""}`,
|
|
1363
1363
|
"aria-hidden": "true",
|
|
1364
|
-
children: /* @__PURE__ */ t(
|
|
1364
|
+
children: /* @__PURE__ */ t(q, {
|
|
1365
1365
|
name: "IconChevron",
|
|
1366
1366
|
width: 20,
|
|
1367
1367
|
height: 20
|
|
@@ -1370,26 +1370,26 @@ var M = {
|
|
|
1370
1370
|
})
|
|
1371
1371
|
]
|
|
1372
1372
|
}) : /* @__PURE__ */ n("button", {
|
|
1373
|
-
ref:
|
|
1374
|
-
id:
|
|
1375
|
-
name:
|
|
1373
|
+
ref: j,
|
|
1374
|
+
id: D,
|
|
1375
|
+
name: w,
|
|
1376
1376
|
type: "button",
|
|
1377
|
-
className: `${
|
|
1377
|
+
className: `${J.trigger} ${J[C]} ${u ? J.error : ""}`,
|
|
1378
1378
|
disabled: v,
|
|
1379
1379
|
"aria-readonly": y || void 0,
|
|
1380
|
-
"aria-expanded":
|
|
1380
|
+
"aria-expanded": F,
|
|
1381
1381
|
"aria-haspopup": "dialog",
|
|
1382
|
-
"aria-describedby":
|
|
1382
|
+
"aria-describedby": he,
|
|
1383
1383
|
onClick: () => {
|
|
1384
|
-
y ||
|
|
1384
|
+
y || I((e) => !e);
|
|
1385
1385
|
},
|
|
1386
1386
|
children: [/* @__PURE__ */ t("span", {
|
|
1387
|
-
className: r ?
|
|
1388
|
-
children: Fe(r, a) ||
|
|
1387
|
+
className: r ? J.value : J.placeholder,
|
|
1388
|
+
children: Fe(r, a) || pe
|
|
1389
1389
|
}), /* @__PURE__ */ t("span", {
|
|
1390
|
-
className: `${
|
|
1390
|
+
className: `${J.chevron} ${ge ? J.chevronOpen : ""}`,
|
|
1391
1391
|
"aria-hidden": "true",
|
|
1392
|
-
children: /* @__PURE__ */ t(
|
|
1392
|
+
children: /* @__PURE__ */ t(q, {
|
|
1393
1393
|
name: "IconChevron",
|
|
1394
1394
|
width: 20,
|
|
1395
1395
|
height: 20
|
|
@@ -1397,19 +1397,19 @@ var M = {
|
|
|
1397
1397
|
})]
|
|
1398
1398
|
}),
|
|
1399
1399
|
U && /* @__PURE__ */ t("span", {
|
|
1400
|
-
id:
|
|
1401
|
-
className:
|
|
1400
|
+
id: me,
|
|
1401
|
+
className: J.validationTooltip,
|
|
1402
1402
|
role: "status",
|
|
1403
1403
|
"aria-live": "polite",
|
|
1404
1404
|
children: U
|
|
1405
1405
|
}, re),
|
|
1406
|
-
|
|
1407
|
-
c && !u && /* @__PURE__ */ t(
|
|
1408
|
-
id:
|
|
1406
|
+
ge && _(ge, document.body),
|
|
1407
|
+
c && !u && /* @__PURE__ */ t(M, {
|
|
1408
|
+
id: O,
|
|
1409
1409
|
children: c
|
|
1410
1410
|
}),
|
|
1411
|
-
u && /* @__PURE__ */ t(
|
|
1412
|
-
id:
|
|
1411
|
+
u && /* @__PURE__ */ t(M, {
|
|
1412
|
+
id: k,
|
|
1413
1413
|
variant: "error",
|
|
1414
1414
|
children: u
|
|
1415
1415
|
})
|
|
@@ -1456,7 +1456,7 @@ var M = {
|
|
|
1456
1456
|
to: t
|
|
1457
1457
|
})
|
|
1458
1458
|
})]
|
|
1459
|
-
}), c && !g && /* @__PURE__ */ t(
|
|
1459
|
+
}), c && !g && /* @__PURE__ */ t(M, { children: c })]
|
|
1460
1460
|
});
|
|
1461
1461
|
}, Ge = {
|
|
1462
1462
|
group: "_group_ey6uk_1",
|
|
@@ -1508,61 +1508,61 @@ var M = {
|
|
|
1508
1508
|
if (Number.isFinite(t)) return t;
|
|
1509
1509
|
}
|
|
1510
1510
|
return Infinity;
|
|
1511
|
-
}, Qe = ({ 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:
|
|
1512
|
-
let
|
|
1513
|
-
let e =
|
|
1511
|
+
}, Qe = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: ee = !0, maxMenuHeight: w }) => {
|
|
1512
|
+
let T = f(), E = C ?? `ds-dropdown-${S ?? T}`, D = `${E}-listbox`, [O, k] = g(!1), [A, j] = g(null), M = h(null), N = h(null), P = h(null), F = h([]), I = m(() => e.find((e) => e.value === r), [e, r]), L = y ? `${E}-hint` : void 0, R = u ? `${E}-error` : void 0, z = [L, R].filter(Boolean).join(" ") || void 0, B = o && s, V = l(() => {
|
|
1513
|
+
let e = N.current, t = P.current;
|
|
1514
1514
|
if (!e || !t) return;
|
|
1515
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - qe, o = n.top - qe, s = a < r.height && o > a, c = Math.max(Ye, s ? o : a), l = Ze(
|
|
1516
|
-
|
|
1515
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - qe, o = n.top - qe, s = a < r.height && o > a, c = Math.max(Ye, s ? o : a), l = Ze(w), u = Math.min(c, l), d = n.left, f = i - n.width - qe, p = Math.max(qe, Math.min(d, f)), m = s ? Math.max(qe, n.top - r.height - Je) : n.bottom + Je;
|
|
1516
|
+
j({
|
|
1517
1517
|
top: m,
|
|
1518
1518
|
left: p,
|
|
1519
1519
|
width: n.width,
|
|
1520
1520
|
maxHeight: u
|
|
1521
1521
|
});
|
|
1522
|
-
}, [
|
|
1522
|
+
}, [w]);
|
|
1523
1523
|
p(() => {
|
|
1524
|
-
if (!
|
|
1525
|
-
|
|
1524
|
+
if (!O) {
|
|
1525
|
+
j(null);
|
|
1526
1526
|
return;
|
|
1527
1527
|
}
|
|
1528
1528
|
return V(), window.addEventListener("resize", V), window.addEventListener("scroll", V, !0), () => {
|
|
1529
1529
|
window.removeEventListener("resize", V), window.removeEventListener("scroll", V, !0);
|
|
1530
1530
|
};
|
|
1531
1531
|
}, [
|
|
1532
|
-
|
|
1532
|
+
O,
|
|
1533
1533
|
V,
|
|
1534
1534
|
e.length
|
|
1535
1535
|
]), d(() => {
|
|
1536
|
-
if (!
|
|
1536
|
+
if (!O) return;
|
|
1537
1537
|
let e = (e) => {
|
|
1538
|
-
let t = e.target, n =
|
|
1539
|
-
!n && !r &&
|
|
1538
|
+
let t = e.target, n = M.current?.contains(t), r = P.current?.contains(t);
|
|
1539
|
+
!n && !r && k(!1);
|
|
1540
1540
|
}, t = (e) => {
|
|
1541
|
-
e.key === "Escape" && (
|
|
1541
|
+
e.key === "Escape" && (k(!1), N.current?.focus());
|
|
1542
1542
|
};
|
|
1543
1543
|
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
1544
1544
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1545
1545
|
};
|
|
1546
|
-
}, [
|
|
1546
|
+
}, [O]);
|
|
1547
1547
|
let H = (t, n) => {
|
|
1548
1548
|
let r = Xe(e, t, n);
|
|
1549
1549
|
if (r === -1) return;
|
|
1550
|
-
let i =
|
|
1550
|
+
let i = F.current[r];
|
|
1551
1551
|
i?.focus(), i?.scrollIntoView({ block: "nearest" });
|
|
1552
1552
|
}, U = (e) => {
|
|
1553
|
-
e.disabled || (i?.(e.value, e),
|
|
1554
|
-
}, ne =
|
|
1555
|
-
ref:
|
|
1556
|
-
id:
|
|
1553
|
+
e.disabled || (i?.(e.value, e), k(!1), N.current?.focus());
|
|
1554
|
+
}, ne = O ? /* @__PURE__ */ t("ul", {
|
|
1555
|
+
ref: P,
|
|
1556
|
+
id: D,
|
|
1557
1557
|
className: Z.menu,
|
|
1558
1558
|
role: "listbox",
|
|
1559
1559
|
"aria-label": c,
|
|
1560
|
-
style:
|
|
1560
|
+
style: A ? {
|
|
1561
1561
|
position: "fixed",
|
|
1562
|
-
top:
|
|
1563
|
-
left:
|
|
1564
|
-
width:
|
|
1565
|
-
maxHeight:
|
|
1562
|
+
top: A.top,
|
|
1563
|
+
left: A.left,
|
|
1564
|
+
width: A.width,
|
|
1565
|
+
maxHeight: A.maxHeight
|
|
1566
1566
|
} : {
|
|
1567
1567
|
position: "fixed",
|
|
1568
1568
|
top: 0,
|
|
@@ -1576,7 +1576,7 @@ var M = {
|
|
|
1576
1576
|
role: "presentation",
|
|
1577
1577
|
children: /* @__PURE__ */ n("button", {
|
|
1578
1578
|
ref: (e) => {
|
|
1579
|
-
|
|
1579
|
+
F.current[a] = e;
|
|
1580
1580
|
},
|
|
1581
1581
|
type: "button",
|
|
1582
1582
|
role: "option",
|
|
@@ -1594,14 +1594,14 @@ var M = {
|
|
|
1594
1594
|
let e = t.key === "ArrowDown" ? 1 : -1;
|
|
1595
1595
|
H(a + e, e);
|
|
1596
1596
|
}
|
|
1597
|
-
if (t.key === "Tab" &&
|
|
1597
|
+
if (t.key === "Tab" && k(!1), t.key === "Home" || t.key === "End") {
|
|
1598
1598
|
t.preventDefault();
|
|
1599
1599
|
let n = t.key === "Home" ? 1 : -1;
|
|
1600
1600
|
H(t.key === "Home" ? 0 : e.length - 1, n);
|
|
1601
1601
|
}
|
|
1602
1602
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), U(i));
|
|
1603
1603
|
},
|
|
1604
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), o &&
|
|
1604
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && ee && /* @__PURE__ */ t(q, {
|
|
1605
1605
|
name: "IconCheck",
|
|
1606
1606
|
width: 16,
|
|
1607
1607
|
height: 16
|
|
@@ -1611,61 +1611,61 @@ var M = {
|
|
|
1611
1611
|
})
|
|
1612
1612
|
}) : null;
|
|
1613
1613
|
return /* @__PURE__ */ n("div", {
|
|
1614
|
-
ref:
|
|
1614
|
+
ref: M,
|
|
1615
1615
|
className: [
|
|
1616
1616
|
Z.wrapper,
|
|
1617
1617
|
u ? Z.errorState : "",
|
|
1618
1618
|
b
|
|
1619
1619
|
].filter(Boolean).join(" "),
|
|
1620
1620
|
children: [
|
|
1621
|
-
c && /* @__PURE__ */ t(
|
|
1621
|
+
c && /* @__PURE__ */ t(te, {
|
|
1622
1622
|
required: x,
|
|
1623
1623
|
disabled: o,
|
|
1624
|
-
htmlFor:
|
|
1624
|
+
htmlFor: B ? void 0 : E,
|
|
1625
1625
|
children: c
|
|
1626
1626
|
}),
|
|
1627
1627
|
/* @__PURE__ */ t("div", {
|
|
1628
1628
|
className: Z.container,
|
|
1629
|
-
children:
|
|
1630
|
-
id:
|
|
1629
|
+
children: B ? /* @__PURE__ */ t("div", {
|
|
1630
|
+
id: E,
|
|
1631
1631
|
className: Z.disabledText,
|
|
1632
|
-
"aria-describedby":
|
|
1633
|
-
children:
|
|
1632
|
+
"aria-describedby": z,
|
|
1633
|
+
children: I?.label ?? a
|
|
1634
1634
|
}) : /* @__PURE__ */ n("button", {
|
|
1635
|
-
ref:
|
|
1636
|
-
id:
|
|
1635
|
+
ref: N,
|
|
1636
|
+
id: E,
|
|
1637
1637
|
type: "button",
|
|
1638
1638
|
name: S,
|
|
1639
1639
|
className: `${Z.trigger} ${Z[v]}`,
|
|
1640
1640
|
disabled: o,
|
|
1641
1641
|
"aria-haspopup": "listbox",
|
|
1642
|
-
"aria-expanded":
|
|
1643
|
-
"aria-controls":
|
|
1644
|
-
"aria-describedby":
|
|
1642
|
+
"aria-expanded": O,
|
|
1643
|
+
"aria-controls": D,
|
|
1644
|
+
"aria-describedby": z,
|
|
1645
1645
|
"aria-invalid": !!u,
|
|
1646
|
-
onClick: () =>
|
|
1646
|
+
onClick: () => k((e) => !e),
|
|
1647
1647
|
onKeyDown: (t) => {
|
|
1648
1648
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
1649
|
-
t.preventDefault(),
|
|
1649
|
+
t.preventDefault(), k(!0);
|
|
1650
1650
|
let n = t.key === "ArrowDown" ? 1 : -1;
|
|
1651
1651
|
requestAnimationFrame(() => {
|
|
1652
1652
|
H(t.key === "ArrowDown" ? 0 : e.length - 1, n);
|
|
1653
1653
|
});
|
|
1654
1654
|
}
|
|
1655
|
-
if (t.key === "Enter" &&
|
|
1655
|
+
if (t.key === "Enter" && O) {
|
|
1656
1656
|
t.preventDefault();
|
|
1657
1657
|
let n = e.findIndex((e) => e.value === r);
|
|
1658
1658
|
H(n >= 0 ? n : 0, 1);
|
|
1659
1659
|
}
|
|
1660
1660
|
},
|
|
1661
1661
|
children: [/* @__PURE__ */ t("span", {
|
|
1662
|
-
className: `${
|
|
1662
|
+
className: `${I ? Z.value : Z.placeholder}
|
|
1663
1663
|
${Z[v]}`,
|
|
1664
|
-
children:
|
|
1664
|
+
children: I?.label ?? a
|
|
1665
1665
|
}), /* @__PURE__ */ t("span", {
|
|
1666
|
-
className: [Z.chevron,
|
|
1666
|
+
className: [Z.chevron, O ? Z.chevronOpen : ""].filter(Boolean).join(" "),
|
|
1667
1667
|
"aria-hidden": "true",
|
|
1668
|
-
children: /* @__PURE__ */ t(
|
|
1668
|
+
children: /* @__PURE__ */ t(q, {
|
|
1669
1669
|
name: "IconChevron",
|
|
1670
1670
|
width: 20,
|
|
1671
1671
|
height: 20
|
|
@@ -1673,14 +1673,14 @@ var M = {
|
|
|
1673
1673
|
})]
|
|
1674
1674
|
})
|
|
1675
1675
|
}),
|
|
1676
|
-
|
|
1676
|
+
O && _(ne, document.body),
|
|
1677
1677
|
y && !u && /* @__PURE__ */ t("span", {
|
|
1678
|
-
id:
|
|
1678
|
+
id: L,
|
|
1679
1679
|
className: Z.message,
|
|
1680
1680
|
children: y
|
|
1681
1681
|
}),
|
|
1682
1682
|
u && /* @__PURE__ */ t("span", {
|
|
1683
|
-
id:
|
|
1683
|
+
id: R,
|
|
1684
1684
|
className: Z.error,
|
|
1685
1685
|
children: u
|
|
1686
1686
|
})
|
|
@@ -1727,39 +1727,39 @@ var M = {
|
|
|
1727
1727
|
lg: "_lg_1khfq_139",
|
|
1728
1728
|
inputError: "_inputError_1khfq_155",
|
|
1729
1729
|
trailingAction: "_trailingAction_1khfq_163"
|
|
1730
|
-
}, nt = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: s = !1, stringWhileDisabled: c = !1, label: l, error: u, hint: p, className: m = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel:
|
|
1731
|
-
let
|
|
1730
|
+
}, nt = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: s = !1, stringWhileDisabled: c = !1, label: l, error: u, hint: p, className: m = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: ee = "Скрыть пароль", passwordHiddenLabel: w = "Показать пароль", onFocus: T, ...E }) => {
|
|
1731
|
+
let D = f(), O = v ?? `ds-input-${_ ?? D}`, k = h(null), [A, j] = g(!1), N = p ? `${O}-hint` : void 0, P = u ? `${O}-error` : void 0, F = String(e ?? ""), I = [N, P].filter(Boolean).join(" ") || void 0, L = C ? A ? "text" : "password" : i;
|
|
1732
1732
|
return d(() => {
|
|
1733
|
-
C ||
|
|
1733
|
+
C || j(!1);
|
|
1734
1734
|
}, [C]), /* @__PURE__ */ n("div", {
|
|
1735
1735
|
className: `${tt.wrapper} ${m}`,
|
|
1736
1736
|
children: [
|
|
1737
|
-
l && /* @__PURE__ */ t(
|
|
1738
|
-
htmlFor:
|
|
1737
|
+
l && /* @__PURE__ */ t(te, {
|
|
1738
|
+
htmlFor: O,
|
|
1739
1739
|
required: x,
|
|
1740
1740
|
disabled: o,
|
|
1741
1741
|
children: l
|
|
1742
1742
|
}),
|
|
1743
1743
|
o && c ? /* @__PURE__ */ t("div", {
|
|
1744
|
-
id:
|
|
1744
|
+
id: O,
|
|
1745
1745
|
className: tt.disabledText,
|
|
1746
|
-
"aria-describedby":
|
|
1747
|
-
children:
|
|
1746
|
+
"aria-describedby": I,
|
|
1747
|
+
children: F || a
|
|
1748
1748
|
}) : /* @__PURE__ */ n("div", {
|
|
1749
1749
|
className: tt.control,
|
|
1750
1750
|
children: [
|
|
1751
1751
|
/* @__PURE__ */ t("input", {
|
|
1752
|
-
ref:
|
|
1753
|
-
id:
|
|
1752
|
+
ref: k,
|
|
1753
|
+
id: O,
|
|
1754
1754
|
name: _,
|
|
1755
|
-
type:
|
|
1756
|
-
value:
|
|
1755
|
+
type: L,
|
|
1756
|
+
value: F,
|
|
1757
1757
|
placeholder: a,
|
|
1758
1758
|
disabled: o,
|
|
1759
1759
|
readOnly: s,
|
|
1760
1760
|
required: x,
|
|
1761
1761
|
"aria-invalid": !!u,
|
|
1762
|
-
"aria-describedby":
|
|
1762
|
+
"aria-describedby": I,
|
|
1763
1763
|
className: `${tt.input} ${tt[y]} ${u ? tt.inputError : ""}`,
|
|
1764
1764
|
onChange: (e) => {
|
|
1765
1765
|
if (i === "number" && !C) {
|
|
@@ -1770,32 +1770,32 @@ var M = {
|
|
|
1770
1770
|
r?.(e.target.value, e);
|
|
1771
1771
|
},
|
|
1772
1772
|
onFocus: (e) => {
|
|
1773
|
-
S && e.currentTarget.value && e.currentTarget.select(),
|
|
1773
|
+
S && e.currentTarget.value && e.currentTarget.select(), T?.(e);
|
|
1774
1774
|
},
|
|
1775
|
-
...
|
|
1775
|
+
...E
|
|
1776
1776
|
}),
|
|
1777
1777
|
C && /* @__PURE__ */ t("button", {
|
|
1778
1778
|
type: "button",
|
|
1779
1779
|
className: tt.trailingAction,
|
|
1780
1780
|
disabled: o,
|
|
1781
|
-
"aria-label":
|
|
1782
|
-
"aria-pressed":
|
|
1783
|
-
onClick: () =>
|
|
1784
|
-
children: /* @__PURE__ */ t(
|
|
1785
|
-
name:
|
|
1781
|
+
"aria-label": A ? ee : w,
|
|
1782
|
+
"aria-pressed": A,
|
|
1783
|
+
onClick: () => j((e) => !e),
|
|
1784
|
+
children: /* @__PURE__ */ t(q, {
|
|
1785
|
+
name: A ? "IconEyeOff" : "IconEye",
|
|
1786
1786
|
width: 20,
|
|
1787
1787
|
height: 20
|
|
1788
1788
|
})
|
|
1789
1789
|
}),
|
|
1790
|
-
!C && b &&
|
|
1790
|
+
!C && b && F && !o && !s && /* @__PURE__ */ t("button", {
|
|
1791
1791
|
type: "button",
|
|
1792
1792
|
className: tt.trailingAction,
|
|
1793
1793
|
"aria-label": "Очистить поле",
|
|
1794
1794
|
onClick: () => {
|
|
1795
|
-
let e =
|
|
1795
|
+
let e = k.current;
|
|
1796
1796
|
e && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
|
|
1797
1797
|
},
|
|
1798
|
-
children: /* @__PURE__ */ t(
|
|
1798
|
+
children: /* @__PURE__ */ t(q, {
|
|
1799
1799
|
name: "IconCross",
|
|
1800
1800
|
width: 20,
|
|
1801
1801
|
height: 20
|
|
@@ -1803,12 +1803,12 @@ var M = {
|
|
|
1803
1803
|
})
|
|
1804
1804
|
]
|
|
1805
1805
|
}),
|
|
1806
|
-
p && !u && /* @__PURE__ */ t(
|
|
1807
|
-
id:
|
|
1806
|
+
p && !u && /* @__PURE__ */ t(M, {
|
|
1807
|
+
id: N,
|
|
1808
1808
|
children: p
|
|
1809
1809
|
}),
|
|
1810
|
-
u && /* @__PURE__ */ t(
|
|
1811
|
-
id:
|
|
1810
|
+
u && /* @__PURE__ */ t(M, {
|
|
1811
|
+
id: P,
|
|
1812
1812
|
variant: "error",
|
|
1813
1813
|
children: u
|
|
1814
1814
|
})
|
|
@@ -1821,62 +1821,62 @@ var M = {
|
|
|
1821
1821
|
if (Number.isFinite(t)) return t;
|
|
1822
1822
|
}
|
|
1823
1823
|
return Infinity;
|
|
1824
|
-
}, st = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect:
|
|
1825
|
-
let
|
|
1826
|
-
let e =
|
|
1824
|
+
}, st = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: ee = !1, needMark: w = !0, maxMenuHeight: T }) => {
|
|
1825
|
+
let E = f(), D = C ?? `ds-dropdown-multiple-${S ?? E}`, O = `${D}-listbox`, [k, A] = g(!1), [j, M] = g(null), N = h(null), P = h(null), F = h(null), I = h([]), L = m(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), R = b ? `${D}-hint` : void 0, z = u ? `${D}-error` : void 0, B = [R, z].filter(Boolean).join(" ") || void 0, V = o && s, H = l(() => {
|
|
1826
|
+
let e = P.current, t = F.current;
|
|
1827
1827
|
if (!e || !t) return;
|
|
1828
1828
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - rt, a = n.top - rt, o = i < r.height && a > i, s = Math.max(at, o ? a : i), c = window.innerWidth - n.width - rt;
|
|
1829
|
-
|
|
1829
|
+
M({
|
|
1830
1830
|
top: o ? Math.max(rt, n.top - r.height - it) : n.bottom + it,
|
|
1831
1831
|
left: Math.max(rt, Math.min(n.left, c)),
|
|
1832
1832
|
width: n.width,
|
|
1833
|
-
maxHeight: Math.min(s, ot(
|
|
1833
|
+
maxHeight: Math.min(s, ot(T))
|
|
1834
1834
|
});
|
|
1835
|
-
}, [
|
|
1835
|
+
}, [T]);
|
|
1836
1836
|
p(() => {
|
|
1837
|
-
if (!
|
|
1838
|
-
|
|
1837
|
+
if (!k) {
|
|
1838
|
+
M(null);
|
|
1839
1839
|
return;
|
|
1840
1840
|
}
|
|
1841
1841
|
return H(), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
|
|
1842
1842
|
window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
|
|
1843
1843
|
};
|
|
1844
1844
|
}, [
|
|
1845
|
-
|
|
1845
|
+
k,
|
|
1846
1846
|
e.length,
|
|
1847
1847
|
H
|
|
1848
1848
|
]), d(() => {
|
|
1849
|
-
if (!
|
|
1849
|
+
if (!k) return;
|
|
1850
1850
|
let e = (e) => {
|
|
1851
1851
|
let t = e.target;
|
|
1852
|
-
!
|
|
1852
|
+
!N.current?.contains(t) && !F.current?.contains(t) && A(!1);
|
|
1853
1853
|
}, t = (e) => {
|
|
1854
|
-
e.key === "Escape" && (
|
|
1854
|
+
e.key === "Escape" && (A(!1), P.current?.focus());
|
|
1855
1855
|
};
|
|
1856
1856
|
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
1857
1857
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1858
1858
|
};
|
|
1859
|
-
}, [
|
|
1859
|
+
}, [k]);
|
|
1860
1860
|
let U = (t, n) => {
|
|
1861
1861
|
let r = Xe(e, t, n);
|
|
1862
|
-
r !== -1 && (
|
|
1862
|
+
r !== -1 && (I.current[r]?.focus(), I.current[r]?.scrollIntoView({ block: "nearest" }));
|
|
1863
1863
|
}, ne = (t) => {
|
|
1864
1864
|
if (t.disabled) return;
|
|
1865
1865
|
let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
|
|
1866
|
-
i?.(n, e.filter((e) => n.includes(e.value))),
|
|
1867
|
-
}, re =
|
|
1868
|
-
ref:
|
|
1869
|
-
id:
|
|
1866
|
+
i?.(n, e.filter((e) => n.includes(e.value))), ee && (A(!1), P.current?.focus());
|
|
1867
|
+
}, re = k ? /* @__PURE__ */ t("ul", {
|
|
1868
|
+
ref: F,
|
|
1869
|
+
id: O,
|
|
1870
1870
|
className: Z.menu,
|
|
1871
1871
|
role: "listbox",
|
|
1872
1872
|
"aria-label": c,
|
|
1873
1873
|
"aria-multiselectable": "true",
|
|
1874
|
-
style:
|
|
1874
|
+
style: j ? {
|
|
1875
1875
|
position: "fixed",
|
|
1876
|
-
top:
|
|
1877
|
-
left:
|
|
1878
|
-
width:
|
|
1879
|
-
maxHeight:
|
|
1876
|
+
top: j.top,
|
|
1877
|
+
left: j.left,
|
|
1878
|
+
width: j.width,
|
|
1879
|
+
maxHeight: j.maxHeight
|
|
1880
1880
|
} : {
|
|
1881
1881
|
position: "fixed",
|
|
1882
1882
|
top: 0,
|
|
@@ -1890,7 +1890,7 @@ var M = {
|
|
|
1890
1890
|
role: "presentation",
|
|
1891
1891
|
children: /* @__PURE__ */ n("button", {
|
|
1892
1892
|
ref: (e) => {
|
|
1893
|
-
|
|
1893
|
+
I.current[a] = e;
|
|
1894
1894
|
},
|
|
1895
1895
|
type: "button",
|
|
1896
1896
|
role: "option",
|
|
@@ -1913,9 +1913,9 @@ var M = {
|
|
|
1913
1913
|
let n = t.key === "Home" ? 1 : -1;
|
|
1914
1914
|
U(t.key === "Home" ? 0 : e.length - 1, n);
|
|
1915
1915
|
}
|
|
1916
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), ne(i)), t.key === "Tab" &&
|
|
1916
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), ne(i)), t.key === "Tab" && A(!1);
|
|
1917
1917
|
},
|
|
1918
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), o &&
|
|
1918
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(q, {
|
|
1919
1919
|
name: "IconCheck",
|
|
1920
1920
|
width: 16,
|
|
1921
1921
|
height: 16
|
|
@@ -1925,15 +1925,15 @@ var M = {
|
|
|
1925
1925
|
})
|
|
1926
1926
|
}) : null;
|
|
1927
1927
|
return /* @__PURE__ */ n("div", {
|
|
1928
|
-
ref:
|
|
1928
|
+
ref: N,
|
|
1929
1929
|
className: [
|
|
1930
1930
|
Z.wrapper,
|
|
1931
1931
|
u ? Z.errorState : "",
|
|
1932
1932
|
x
|
|
1933
1933
|
].filter(Boolean).join(" "),
|
|
1934
1934
|
children: [
|
|
1935
|
-
c && /* @__PURE__ */ t(
|
|
1936
|
-
htmlFor: V ? void 0 :
|
|
1935
|
+
c && /* @__PURE__ */ t(te, {
|
|
1936
|
+
htmlFor: V ? void 0 : D,
|
|
1937
1937
|
required: y,
|
|
1938
1938
|
disabled: o,
|
|
1939
1939
|
children: c
|
|
@@ -1941,37 +1941,37 @@ var M = {
|
|
|
1941
1941
|
/* @__PURE__ */ t("div", {
|
|
1942
1942
|
className: Z.container,
|
|
1943
1943
|
children: V ? /* @__PURE__ */ t("div", {
|
|
1944
|
-
id:
|
|
1944
|
+
id: D,
|
|
1945
1945
|
className: `${Z.disabledText} ${Z[v]}`,
|
|
1946
|
-
"aria-describedby":
|
|
1947
|
-
children:
|
|
1946
|
+
"aria-describedby": B,
|
|
1947
|
+
children: L || a
|
|
1948
1948
|
}) : /* @__PURE__ */ n("button", {
|
|
1949
|
-
ref:
|
|
1950
|
-
id:
|
|
1949
|
+
ref: P,
|
|
1950
|
+
id: D,
|
|
1951
1951
|
type: "button",
|
|
1952
1952
|
name: S,
|
|
1953
1953
|
className: `${Z.trigger} ${Z[v]}`,
|
|
1954
1954
|
disabled: o,
|
|
1955
1955
|
"aria-haspopup": "listbox",
|
|
1956
|
-
"aria-expanded":
|
|
1957
|
-
"aria-controls":
|
|
1958
|
-
"aria-describedby":
|
|
1956
|
+
"aria-expanded": k,
|
|
1957
|
+
"aria-controls": O,
|
|
1958
|
+
"aria-describedby": B,
|
|
1959
1959
|
"aria-invalid": !!u,
|
|
1960
|
-
onClick: () =>
|
|
1960
|
+
onClick: () => A((e) => !e),
|
|
1961
1961
|
onKeyDown: (t) => {
|
|
1962
1962
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
1963
|
-
t.preventDefault(),
|
|
1963
|
+
t.preventDefault(), A(!0);
|
|
1964
1964
|
let n = t.key === "ArrowDown" ? 1 : -1;
|
|
1965
1965
|
requestAnimationFrame(() => U(t.key === "ArrowDown" ? 0 : e.length - 1, n));
|
|
1966
1966
|
}
|
|
1967
1967
|
},
|
|
1968
1968
|
children: [/* @__PURE__ */ t("span", {
|
|
1969
|
-
className: `${
|
|
1970
|
-
children:
|
|
1969
|
+
className: `${L ? Z.value : Z.placeholder} ${Z[v]}`,
|
|
1970
|
+
children: L || a
|
|
1971
1971
|
}), /* @__PURE__ */ t("span", {
|
|
1972
|
-
className: [Z.chevron,
|
|
1972
|
+
className: [Z.chevron, k ? Z.chevronOpen : ""].filter(Boolean).join(" "),
|
|
1973
1973
|
"aria-hidden": "true",
|
|
1974
|
-
children: /* @__PURE__ */ t(
|
|
1974
|
+
children: /* @__PURE__ */ t(q, {
|
|
1975
1975
|
name: "IconChevron",
|
|
1976
1976
|
width: 20,
|
|
1977
1977
|
height: 20
|
|
@@ -1979,14 +1979,14 @@ var M = {
|
|
|
1979
1979
|
})]
|
|
1980
1980
|
})
|
|
1981
1981
|
}),
|
|
1982
|
-
|
|
1982
|
+
k && _(re, document.body),
|
|
1983
1983
|
b && !u && /* @__PURE__ */ t("span", {
|
|
1984
|
-
id:
|
|
1984
|
+
id: R,
|
|
1985
1985
|
className: Z.message,
|
|
1986
1986
|
children: b
|
|
1987
1987
|
}),
|
|
1988
1988
|
u && /* @__PURE__ */ t("span", {
|
|
1989
|
-
id:
|
|
1989
|
+
id: z,
|
|
1990
1990
|
className: Z.error,
|
|
1991
1991
|
children: u
|
|
1992
1992
|
})
|
|
@@ -2031,60 +2031,64 @@ var M = {
|
|
|
2031
2031
|
]
|
|
2032
2032
|
});
|
|
2033
2033
|
}, Q = {
|
|
2034
|
-
root: "
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2034
|
+
root: "_root_y4bhr_1",
|
|
2035
|
+
toolbar: "_toolbar_y4bhr_15",
|
|
2036
|
+
totalWidget: "_totalWidget_y4bhr_31",
|
|
2037
|
+
totalLabel: "_totalLabel_y4bhr_53",
|
|
2038
|
+
totalValue: "_totalValue_y4bhr_63",
|
|
2039
|
+
srOnly: "_srOnly_y4bhr_77",
|
|
2040
|
+
bulkActions: "_bulkActions_y4bhr_101",
|
|
2041
|
+
filterBar: "_filterBar_y4bhr_123",
|
|
2042
|
+
filterFields: "_filterFields_y4bhr_141",
|
|
2043
|
+
filterActions: "_filterActions_y4bhr_155",
|
|
2044
|
+
pageSizePanel: "_pageSizePanel_y4bhr_167",
|
|
2045
|
+
embedded: "_embedded_y4bhr_167",
|
|
2046
|
+
pendingChanges: "_pendingChanges_y4bhr_179",
|
|
2047
|
+
tableWrap: "_tableWrap_y4bhr_191",
|
|
2048
|
+
table: "_table_y4bhr_191",
|
|
2049
|
+
compact: "_compact_y4bhr_241",
|
|
2050
|
+
selectionColumn: "_selectionColumn_y4bhr_279",
|
|
2051
|
+
expansionColumn: "_expansionColumn_y4bhr_287",
|
|
2052
|
+
expansionCell: "_expansionCell_y4bhr_289",
|
|
2053
|
+
expansionIcon: "_expansionIcon_y4bhr_301",
|
|
2054
|
+
expansionIconOpen: "_expansionIconOpen_y4bhr_311",
|
|
2055
|
+
detailRow: "_detailRow_y4bhr_321",
|
|
2056
|
+
stickyColumn: "_stickyColumn_y4bhr_331",
|
|
2057
|
+
selectionHeaderCell: "_selectionHeaderCell_y4bhr_367",
|
|
2058
|
+
selectionCell: "_selectionCell_y4bhr_369",
|
|
2059
|
+
selectionHeaderControls: "_selectionHeaderControls_y4bhr_381",
|
|
2060
|
+
mobileSelectionControls: "_mobileSelectionControls_y4bhr_383",
|
|
2061
|
+
cardSelectionControls: "_cardSelectionControls_y4bhr_385",
|
|
2062
|
+
selectedRow: "_selectedRow_y4bhr_399",
|
|
2063
|
+
sticky: "_sticky_y4bhr_331",
|
|
2064
|
+
sortButton: "_sortButton_y4bhr_437",
|
|
2065
|
+
state: "_state_y4bhr_475",
|
|
2066
|
+
cards: "_cards_y4bhr_487",
|
|
2067
|
+
mobileSort: "_mobileSort_y4bhr_487",
|
|
2068
|
+
card: "_card_y4bhr_385",
|
|
2069
|
+
spanTwo: "_spanTwo_y4bhr_575",
|
|
2070
|
+
selectedCard: "_selectedCard_y4bhr_583",
|
|
2071
|
+
customCardShell: "_customCardShell_y4bhr_617",
|
|
2072
|
+
clickableRow: "_clickableRow_y4bhr_631",
|
|
2073
|
+
cardDetail: "_cardDetail_y4bhr_649",
|
|
2074
|
+
pagination: "_pagination_y4bhr_675",
|
|
2075
|
+
bottom: "_bottom_y4bhr_723",
|
|
2076
|
+
pageSizeMain: "_pageSizeMain_y4bhr_737",
|
|
2077
|
+
pageSizeOptions: "_pageSizeOptions_y4bhr_739",
|
|
2078
|
+
pageSizeFieldset: "_pageSizeFieldset_y4bhr_751",
|
|
2079
|
+
pageSizeOption: "_pageSizeOption_y4bhr_739",
|
|
2080
|
+
pageSizeOptionActive: "_pageSizeOptionActive_y4bhr_829",
|
|
2081
|
+
pageSizeWarning: "_pageSizeWarning_y4bhr_843",
|
|
2082
|
+
paginationRange: "_paginationRange_y4bhr_855",
|
|
2083
|
+
paginationControls: "_paginationControls_y4bhr_867",
|
|
2084
|
+
pageNumbers: "_pageNumbers_y4bhr_869",
|
|
2085
|
+
pageButton: "_pageButton_y4bhr_881",
|
|
2086
|
+
ellipsis: "_ellipsis_y4bhr_891",
|
|
2087
|
+
previousIcon: "_previousIcon_y4bhr_903",
|
|
2088
|
+
nextIcon: "_nextIcon_y4bhr_911",
|
|
2089
|
+
default: "_default_y4bhr_1011",
|
|
2090
|
+
tableOnMobile: "_tableOnMobile_y4bhr_1011",
|
|
2091
|
+
wide: "_wide_y4bhr_1041"
|
|
2088
2092
|
}, ut = b({
|
|
2089
2093
|
rowSortingFeature: y,
|
|
2090
2094
|
sortedRowModel: v()
|
|
@@ -2221,49 +2225,49 @@ var M = {
|
|
|
2221
2225
|
sortDescFirst: e.sortDescFirst
|
|
2222
2226
|
};
|
|
2223
2227
|
return n !== void 0 && (i.sortFn = n), i;
|
|
2224
|
-
}, Tt = ({ columns: e, data: i, tableOnMobile: a = !1, mobileView: o, breakpoint: s = "default", sorting: c, onSortingChange: l, renderMobileCard: u, getRowId: f,
|
|
2228
|
+
}, Tt = ({ columns: e, data: i, tableOnMobile: a = !1, mobileView: o, breakpoint: s = "default", sorting: c, onSortingChange: l, renderMobileCard: u, getRowId: f, getRowClassName: p, getRowStyle: h, toolbarContent: _, totalCountVariant: v = "default", totalCountLabel: y = "Всего", caption: b, ariaLabel: S, loading: C = !1, error: ee, emptyState: w = "Нет данных", stickyHeader: T = !1, maxHeight: E, className: D = "", onRowClick: O, selectable: k = !1, selectedRowIds: j, onSelectedRowIdsChange: te, onRowDoubleClick: M, getRowSelectionLabel: N, selectAllRowsLabel: P = "Выбрать все строки на этой странице", resetSelectionLabel: F = "Сбросить выбор", openRowLabel: I = "Открыть строку", pagination: L = !1, paginationMode: R = "client", page: z = 1, pageSize: B = 30, onPageSizeChange: V, pageSizeOptions: H = [
|
|
2225
2229
|
10,
|
|
2226
2230
|
30,
|
|
2227
2231
|
50,
|
|
2228
2232
|
-1
|
|
2229
|
-
], pageSizeDraft:
|
|
2230
|
-
let [
|
|
2233
|
+
], pageSizeDraft: U, onPageSizeDraftChange: ne, pageSizeApplyMode: re = "table", totalCount: ie, onPageChange: ae, visibleColumnIds: oe, density: se = "comfortable", renderBulkActions: ce, renderExpandedRow: le, expandedRowIds: W, onExpandedRowIdsChange: ue, getRowExpansionLabel: de, resultsAnnouncement: fe, filterBar: G }) => {
|
|
2234
|
+
let [pe, me] = g([]), [he, ge] = g([]), [_e, ve] = g([]), [ye, be] = g(0), [K, xe] = g(B === -1 ? -1 : [
|
|
2231
2235
|
10,
|
|
2232
2236
|
30,
|
|
2233
2237
|
50
|
|
2234
|
-
].includes(
|
|
2235
|
-
if (
|
|
2236
|
-
let t = new Set(
|
|
2238
|
+
].includes(B) ? B : 30), Se = c ?? pe, J = Se.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), we = B === -1, Te = we ? Math.max(1, (R === "server" ? Number(ie) : i.length) || i.length || 1) : Number.isFinite(B) && B > 0 ? Math.floor(B) : 30, Y = L && R === "server", X = m(() => {
|
|
2239
|
+
if (oe === void 0) return e;
|
|
2240
|
+
let t = new Set(oe);
|
|
2237
2241
|
return e.filter((e) => t.has(e.id));
|
|
2238
|
-
}, [e,
|
|
2242
|
+
}, [e, oe]), Ee = m(() => X.length === 0 ? "Должна быть видима хотя бы одна колонка" : gt(X, i), [i, X]), De = m(() => X.map(wt), [X]), Oe = X.some((e) => pt(e) !== void 0), ke = x({
|
|
2239
2243
|
features: ut,
|
|
2240
|
-
columns:
|
|
2244
|
+
columns: De,
|
|
2241
2245
|
data: i,
|
|
2242
|
-
state: { sorting:
|
|
2246
|
+
state: { sorting: Se },
|
|
2243
2247
|
onSortingChange: (e) => {
|
|
2244
|
-
let t = typeof e == "function" ? e(
|
|
2245
|
-
c === void 0 &&
|
|
2248
|
+
let t = typeof e == "function" ? e(Se) : e;
|
|
2249
|
+
c === void 0 && me(t), be(0), l?.(t);
|
|
2246
2250
|
},
|
|
2247
2251
|
getRowId: f
|
|
2248
|
-
}),
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
]),
|
|
2252
|
+
}), Ae = ke.getRowModel().rows, je = Y && Number.isFinite(ie) && Number(ie) >= 0 ? Math.floor(Number(ie)) : Ae.length, Me = L ? Math.max(1, Math.ceil(je / Te)) : 1, Ne = Number.isFinite(z) && z > 0 ? Math.floor(z) - 1 : 0, Pe = Math.min(Y ? Ne : ye, Me - 1), Fe = m(() => L && !Y ? Ae.slice(Pe * Te, (Pe + 1) * Te) : Ae, [
|
|
2253
|
+
Y,
|
|
2254
|
+
Te,
|
|
2255
|
+
L,
|
|
2256
|
+
Pe,
|
|
2257
|
+
Ae
|
|
2258
|
+
]), Ie = j ?? he, Le = m(() => new Set(Ie), [Ie]), Re = W ?? _e, ze = m(() => new Set(Re), [Re]), Be = m(() => Fe.map((e) => e.id), [Fe]), Ve = Be.filter((e) => Le.has(e)).length, He = Be.length > 0 && Ve === Be.length, Ue = Ve > 0 && !He, We = m(() => X.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
2255
2259
|
id: e.id,
|
|
2256
2260
|
label: typeof e.header == "string" ? e.header : e.id
|
|
2257
|
-
})), [
|
|
2261
|
+
})), [X]), Ge = m(() => ht(Pe, Me), [Me, Pe]), Z = o === void 0 ? a : o === "table", qe = [
|
|
2258
2262
|
Q.root,
|
|
2259
2263
|
s === "wide" ? Q.wide : Q.default,
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
].filter(Boolean).join(" "),
|
|
2264
|
-
|
|
2265
|
-
},
|
|
2266
|
-
let i =
|
|
2264
|
+
Z ? Q.tableOnMobile : "",
|
|
2265
|
+
se === "compact" ? Q.compact : "",
|
|
2266
|
+
D
|
|
2267
|
+
].filter(Boolean).join(" "), Je = Ee ?? ee, Ye = L && !we && !Je && je > Te && (!C || Y), Xe = L && !!(V || ne || G), Ze = U ?? K, Qe = G ? (typeof G.validation == "function" ? G.validation(G.draftValues) : G.validation) ?? {} : {}, $e = G ? JSON.stringify(G.draftValues) !== JSON.stringify(G.appliedValues) || Ze !== B : !1, tt = Object.values(Qe).some(Boolean), nt = je === 0 ? 0 : Pe * Te + 1, rt = Math.min((Pe + 1) * Te, je), it = () => {
|
|
2268
|
+
Ze !== B && (be(0), ae?.(1), V?.(Ze));
|
|
2269
|
+
}, at = (e, r = !1) => {
|
|
2270
|
+
let i = Ze !== B, a = `ds-data-table-page-size-warning-${e}`;
|
|
2267
2271
|
return /* @__PURE__ */ n("div", {
|
|
2268
2272
|
className: `${Q.pageSizePanel} ${Q[e]} ${r ? Q.embedded : ""}`,
|
|
2269
2273
|
children: [
|
|
@@ -2271,24 +2275,24 @@ var M = {
|
|
|
2271
2275
|
className: Q.pageSizeMain,
|
|
2272
2276
|
children: [/* @__PURE__ */ n("fieldset", {
|
|
2273
2277
|
className: Q.pageSizeFieldset,
|
|
2274
|
-
disabled:
|
|
2278
|
+
disabled: C || G?.applying,
|
|
2275
2279
|
children: [/* @__PURE__ */ t("legend", { children: "На странице" }), /* @__PURE__ */ t("div", {
|
|
2276
2280
|
className: Q.pageSizeOptions,
|
|
2277
|
-
children:
|
|
2281
|
+
children: H.map((e) => /* @__PURE__ */ t("button", {
|
|
2278
2282
|
type: "button",
|
|
2279
|
-
className: `${Q.pageSizeOption} ${
|
|
2280
|
-
"aria-pressed":
|
|
2283
|
+
className: `${Q.pageSizeOption} ${Ze === e ? Q.pageSizeOptionActive : ""}`,
|
|
2284
|
+
"aria-pressed": Ze === e,
|
|
2281
2285
|
onClick: () => {
|
|
2282
|
-
|
|
2286
|
+
U === void 0 && xe(e), ne?.(e);
|
|
2283
2287
|
},
|
|
2284
2288
|
children: e === -1 ? "Все" : e
|
|
2285
2289
|
}, e))
|
|
2286
2290
|
})]
|
|
2287
|
-
}),
|
|
2291
|
+
}), re === "table" && !G && /* @__PURE__ */ t(A, {
|
|
2288
2292
|
size: "sm",
|
|
2289
|
-
disabled:
|
|
2290
|
-
"aria-describedby":
|
|
2291
|
-
onClick:
|
|
2293
|
+
disabled: C || !i,
|
|
2294
|
+
"aria-describedby": Ze === -1 && i && e === "top" ? a : void 0,
|
|
2295
|
+
onClick: it,
|
|
2292
2296
|
children: "Применить"
|
|
2293
2297
|
})]
|
|
2294
2298
|
}),
|
|
@@ -2296,94 +2300,94 @@ var M = {
|
|
|
2296
2300
|
className: Q.paginationRange,
|
|
2297
2301
|
children: [
|
|
2298
2302
|
"Показано ",
|
|
2299
|
-
|
|
2303
|
+
nt,
|
|
2300
2304
|
"–",
|
|
2301
|
-
|
|
2305
|
+
rt,
|
|
2302
2306
|
" из ",
|
|
2303
|
-
|
|
2307
|
+
je
|
|
2304
2308
|
]
|
|
2305
2309
|
}),
|
|
2306
|
-
|
|
2310
|
+
$e && e === "top" && /* @__PURE__ */ t("span", {
|
|
2307
2311
|
className: Q.pendingChanges,
|
|
2308
2312
|
role: "status",
|
|
2309
2313
|
children: "Есть неприменённые изменения"
|
|
2310
2314
|
}),
|
|
2311
|
-
|
|
2315
|
+
Y && Ze === -1 && i && /* @__PURE__ */ n("span", {
|
|
2312
2316
|
id: a,
|
|
2313
2317
|
className: Q.pageSizeWarning,
|
|
2314
2318
|
"aria-hidden": e === "bottom" || void 0,
|
|
2315
2319
|
children: [
|
|
2316
2320
|
"Будут загружены все ",
|
|
2317
|
-
|
|
2321
|
+
je,
|
|
2318
2322
|
" записей"
|
|
2319
2323
|
]
|
|
2320
2324
|
})
|
|
2321
2325
|
]
|
|
2322
2326
|
});
|
|
2323
|
-
},
|
|
2324
|
-
let t = Math.max(0, Math.min(
|
|
2325
|
-
if (
|
|
2326
|
-
t !==
|
|
2327
|
+
}, ot = (e) => {
|
|
2328
|
+
let t = Math.max(0, Math.min(Me - 1, e));
|
|
2329
|
+
if (Y) {
|
|
2330
|
+
t !== Pe && ae?.(t + 1);
|
|
2327
2331
|
return;
|
|
2328
2332
|
}
|
|
2329
|
-
|
|
2330
|
-
},
|
|
2333
|
+
be(t);
|
|
2334
|
+
}, st = (e) => {
|
|
2331
2335
|
let t = Array.from(e);
|
|
2332
|
-
|
|
2333
|
-
},
|
|
2334
|
-
let t = new Set(
|
|
2335
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
2336
|
-
},
|
|
2337
|
-
let e = ft(
|
|
2338
|
-
|
|
2339
|
-
},
|
|
2340
|
-
let t = new Set(
|
|
2336
|
+
j === void 0 && ge(t), te?.(t);
|
|
2337
|
+
}, ct = (e) => {
|
|
2338
|
+
let t = new Set(Le);
|
|
2339
|
+
t.has(e) ? t.delete(e) : t.add(e), st(t);
|
|
2340
|
+
}, lt = () => {
|
|
2341
|
+
let e = ft(Le, Be, !He);
|
|
2342
|
+
j === void 0 && ge(e), te?.(e);
|
|
2343
|
+
}, vt = () => st(/* @__PURE__ */ new Set()), yt = (e) => {
|
|
2344
|
+
let t = new Set(ze);
|
|
2341
2345
|
t.has(e) ? t.delete(e) : t.add(e);
|
|
2342
2346
|
let n = Array.from(t);
|
|
2343
|
-
|
|
2344
|
-
},
|
|
2345
|
-
visibleCount:
|
|
2346
|
-
totalCount:
|
|
2347
|
-
selectedCount:
|
|
2348
|
-
}) ?? `Показано строк: ${
|
|
2347
|
+
W === void 0 && ve(n), ue?.(n);
|
|
2348
|
+
}, bt = i.filter((e, t) => Le.has(f?.(e, t) ?? String(t))), xt = fe?.({
|
|
2349
|
+
visibleCount: Fe.length,
|
|
2350
|
+
totalCount: je,
|
|
2351
|
+
selectedCount: Le.size
|
|
2352
|
+
}) ?? `Показано строк: ${Fe.length} из ${je}. Выбрано: ${Le.size}.`;
|
|
2349
2353
|
return d(() => {
|
|
2350
|
-
|
|
2354
|
+
Y || be(0);
|
|
2351
2355
|
}, [
|
|
2352
2356
|
i,
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
+
Y,
|
|
2358
|
+
Te,
|
|
2359
|
+
L,
|
|
2360
|
+
J
|
|
2357
2361
|
]), d(() => {
|
|
2358
|
-
!
|
|
2362
|
+
!Y && ye >= Me && be(Me - 1);
|
|
2359
2363
|
}, [
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2364
|
+
Y,
|
|
2365
|
+
Me,
|
|
2366
|
+
ye
|
|
2363
2367
|
]), d(() => {
|
|
2364
|
-
|
|
2368
|
+
xe(B === -1 ? -1 : [
|
|
2365
2369
|
10,
|
|
2366
2370
|
30,
|
|
2367
2371
|
50
|
|
2368
|
-
].includes(
|
|
2369
|
-
}, [
|
|
2370
|
-
className:
|
|
2371
|
-
"aria-busy":
|
|
2372
|
+
].includes(B) ? B : 30);
|
|
2373
|
+
}, [B]), /* @__PURE__ */ n("section", {
|
|
2374
|
+
className: qe,
|
|
2375
|
+
"aria-busy": C,
|
|
2372
2376
|
children: [
|
|
2373
2377
|
/* @__PURE__ */ t("div", {
|
|
2374
2378
|
className: Q.srOnly,
|
|
2375
2379
|
"aria-live": "polite",
|
|
2376
2380
|
"aria-atomic": "true",
|
|
2377
|
-
children:
|
|
2381
|
+
children: xt
|
|
2378
2382
|
}),
|
|
2379
|
-
|
|
2383
|
+
ce && Le.size > 0 && /* @__PURE__ */ t("div", {
|
|
2380
2384
|
className: Q.bulkActions,
|
|
2381
2385
|
role: "region",
|
|
2382
2386
|
"aria-label": "Действия с выбранными строками",
|
|
2383
|
-
children:
|
|
2384
|
-
selectedRowIds: Array.from(
|
|
2385
|
-
selectedRows:
|
|
2386
|
-
clearSelection:
|
|
2387
|
+
children: ce({
|
|
2388
|
+
selectedRowIds: Array.from(Le),
|
|
2389
|
+
selectedRows: bt,
|
|
2390
|
+
clearSelection: vt
|
|
2387
2391
|
})
|
|
2388
2392
|
}),
|
|
2389
2393
|
G && /* @__PURE__ */ n("form", {
|
|
@@ -2391,9 +2395,9 @@ var M = {
|
|
|
2391
2395
|
role: "search",
|
|
2392
2396
|
"aria-label": "Фильтры таблицы",
|
|
2393
2397
|
onSubmit: (e) => {
|
|
2394
|
-
e.preventDefault(), !(
|
|
2398
|
+
e.preventDefault(), !(!$e || tt || G.applying || C) && (be(0), ae?.(1), G.onApply({
|
|
2395
2399
|
filters: G.draftValues,
|
|
2396
|
-
pageSize:
|
|
2400
|
+
pageSize: Ze
|
|
2397
2401
|
}));
|
|
2398
2402
|
},
|
|
2399
2403
|
children: [
|
|
@@ -2402,69 +2406,83 @@ var M = {
|
|
|
2402
2406
|
children: G.fields.map((e) => /* @__PURE__ */ t(dt, {
|
|
2403
2407
|
field: e,
|
|
2404
2408
|
value: G.draftValues[e.key],
|
|
2405
|
-
disabled: !!(e.disabled || G.applying ||
|
|
2406
|
-
error:
|
|
2409
|
+
disabled: !!(e.disabled || G.applying || C),
|
|
2410
|
+
error: Qe[e.key],
|
|
2407
2411
|
setValue: (t) => G.onDraftValuesChange({
|
|
2408
2412
|
...G.draftValues,
|
|
2409
2413
|
[e.key]: t
|
|
2410
2414
|
})
|
|
2411
2415
|
}, e.key))
|
|
2412
2416
|
}),
|
|
2413
|
-
|
|
2417
|
+
Xe && at("top", !0),
|
|
2414
2418
|
/* @__PURE__ */ n("div", {
|
|
2415
2419
|
className: Q.filterActions,
|
|
2416
|
-
children: [/* @__PURE__ */ t(
|
|
2420
|
+
children: [/* @__PURE__ */ t(A, {
|
|
2417
2421
|
variant: "empty",
|
|
2418
|
-
disabled: G.applying ||
|
|
2422
|
+
disabled: G.applying || C,
|
|
2419
2423
|
onClick: () => {
|
|
2420
2424
|
let e = G.resetValues ?? G.appliedValues;
|
|
2421
2425
|
G.onDraftValuesChange(e);
|
|
2422
|
-
let t = G.resetPageSize ??
|
|
2423
|
-
|
|
2426
|
+
let t = G.resetPageSize ?? H[0] ?? 30;
|
|
2427
|
+
U === void 0 && xe(t), ne?.(t), G.onReset?.({
|
|
2424
2428
|
filters: e,
|
|
2425
2429
|
pageSize: t
|
|
2426
2430
|
});
|
|
2427
2431
|
},
|
|
2428
2432
|
children: G.resetLabel ?? "Сбросить"
|
|
2429
|
-
}), /* @__PURE__ */ t(
|
|
2433
|
+
}), /* @__PURE__ */ t(A, {
|
|
2430
2434
|
type: "submit",
|
|
2431
2435
|
isLoading: G.applying,
|
|
2432
|
-
disabled:
|
|
2436
|
+
disabled: !$e || tt || C,
|
|
2433
2437
|
children: G.applyLabel ?? "Применить"
|
|
2434
2438
|
})]
|
|
2435
2439
|
})
|
|
2436
2440
|
]
|
|
2437
2441
|
}),
|
|
2438
|
-
|
|
2439
|
-
|
|
2442
|
+
Xe && !G && at("top"),
|
|
2443
|
+
(v === "highlighted" || _ != null) && /* @__PURE__ */ n("div", {
|
|
2444
|
+
className: Q.toolbar,
|
|
2445
|
+
children: [v === "highlighted" && /* @__PURE__ */ n("div", {
|
|
2446
|
+
className: Q.totalWidget,
|
|
2447
|
+
"aria-label": `${y}: ${je}`,
|
|
2448
|
+
children: [/* @__PURE__ */ t("span", {
|
|
2449
|
+
className: Q.totalLabel,
|
|
2450
|
+
children: y
|
|
2451
|
+
}), /* @__PURE__ */ t("strong", {
|
|
2452
|
+
className: Q.totalValue,
|
|
2453
|
+
children: je
|
|
2454
|
+
})]
|
|
2455
|
+
}), _]
|
|
2456
|
+
}),
|
|
2457
|
+
!Z && !C && !Je && Fe.length > 0 && We.length > 0 && /* @__PURE__ */ t(et, {
|
|
2440
2458
|
className: Q.mobileSort,
|
|
2441
|
-
options:
|
|
2442
|
-
value:
|
|
2443
|
-
id:
|
|
2444
|
-
direction:
|
|
2459
|
+
options: We,
|
|
2460
|
+
value: Se[0] ? {
|
|
2461
|
+
id: Se[0].id,
|
|
2462
|
+
direction: Se[0].desc ? "desc" : "asc"
|
|
2445
2463
|
} : null,
|
|
2446
|
-
onChange: (e) =>
|
|
2464
|
+
onChange: (e) => ke.setSorting([{
|
|
2447
2465
|
id: e.id,
|
|
2448
2466
|
desc: e.direction === "desc"
|
|
2449
2467
|
}])
|
|
2450
2468
|
}),
|
|
2451
2469
|
/* @__PURE__ */ t("div", {
|
|
2452
2470
|
className: Q.tableWrap,
|
|
2453
|
-
style: { maxHeight:
|
|
2471
|
+
style: { maxHeight: E },
|
|
2454
2472
|
children: /* @__PURE__ */ n("table", {
|
|
2455
2473
|
className: Q.table,
|
|
2456
|
-
"aria-label":
|
|
2474
|
+
"aria-label": S,
|
|
2457
2475
|
children: [
|
|
2458
|
-
|
|
2459
|
-
(
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2476
|
+
b && /* @__PURE__ */ t("caption", { children: b }),
|
|
2477
|
+
(Oe || k || !!le) && /* @__PURE__ */ n("colgroup", { children: [
|
|
2478
|
+
le && /* @__PURE__ */ t("col", { className: Q.expansionColumn }),
|
|
2479
|
+
k && /* @__PURE__ */ t("col", { className: Q.selectionColumn }),
|
|
2480
|
+
X.map((e) => /* @__PURE__ */ t("col", { style: pt(e) }, e.id))
|
|
2463
2481
|
] }),
|
|
2464
2482
|
/* @__PURE__ */ t("thead", {
|
|
2465
|
-
className:
|
|
2466
|
-
children:
|
|
2467
|
-
|
|
2483
|
+
className: T ? Q.sticky : "",
|
|
2484
|
+
children: ke.getHeaderGroups().map((e) => /* @__PURE__ */ n("tr", { children: [
|
|
2485
|
+
le && /* @__PURE__ */ t("th", {
|
|
2468
2486
|
className: Q.expansionCell,
|
|
2469
2487
|
scope: "col",
|
|
2470
2488
|
children: /* @__PURE__ */ t("span", {
|
|
@@ -2472,25 +2490,25 @@ var M = {
|
|
|
2472
2490
|
children: "Подробности"
|
|
2473
2491
|
})
|
|
2474
2492
|
}),
|
|
2475
|
-
|
|
2493
|
+
k && /* @__PURE__ */ t("th", {
|
|
2476
2494
|
className: Q.selectionHeaderCell,
|
|
2477
2495
|
scope: "col",
|
|
2478
2496
|
children: /* @__PURE__ */ n("div", {
|
|
2479
2497
|
className: Q.selectionHeaderControls,
|
|
2480
|
-
children: [/* @__PURE__ */ t(
|
|
2481
|
-
checked:
|
|
2482
|
-
indeterminate:
|
|
2483
|
-
disabled:
|
|
2484
|
-
ariaLabel:
|
|
2485
|
-
onChange:
|
|
2486
|
-
}), /* @__PURE__ */ t(
|
|
2498
|
+
children: [/* @__PURE__ */ t(Ce, {
|
|
2499
|
+
checked: He,
|
|
2500
|
+
indeterminate: Ue,
|
|
2501
|
+
disabled: C || Be.length === 0,
|
|
2502
|
+
ariaLabel: P,
|
|
2503
|
+
onChange: lt
|
|
2504
|
+
}), /* @__PURE__ */ t(A, {
|
|
2487
2505
|
size: "sm",
|
|
2488
2506
|
variant: "empty",
|
|
2489
|
-
disabled:
|
|
2490
|
-
"aria-label":
|
|
2491
|
-
title:
|
|
2492
|
-
onClick:
|
|
2493
|
-
children: /* @__PURE__ */ t(
|
|
2507
|
+
disabled: Le.size === 0,
|
|
2508
|
+
"aria-label": F,
|
|
2509
|
+
title: F,
|
|
2510
|
+
onClick: vt,
|
|
2511
|
+
children: /* @__PURE__ */ t(q, {
|
|
2494
2512
|
name: "IconX",
|
|
2495
2513
|
width: 16,
|
|
2496
2514
|
height: 16
|
|
@@ -2503,17 +2521,17 @@ var M = {
|
|
|
2503
2521
|
return /* @__PURE__ */ t("th", {
|
|
2504
2522
|
scope: "col",
|
|
2505
2523
|
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
2506
|
-
className:
|
|
2524
|
+
className: X.find((t) => t.id === e.column.id)?.sticky ? Q.stickyColumn : void 0,
|
|
2507
2525
|
style: {
|
|
2508
|
-
...pt(
|
|
2509
|
-
...mt(
|
|
2526
|
+
...pt(X.find((t) => t.id === e.column.id)),
|
|
2527
|
+
...mt(X.find((t) => t.id === e.column.id))
|
|
2510
2528
|
},
|
|
2511
2529
|
children: /* @__PURE__ */ n("button", {
|
|
2512
2530
|
type: "button",
|
|
2513
2531
|
className: Q.sortButton,
|
|
2514
2532
|
disabled: !i,
|
|
2515
2533
|
onClick: a,
|
|
2516
|
-
children: [/* @__PURE__ */ t(
|
|
2534
|
+
children: [/* @__PURE__ */ t(ke.FlexRender, { header: e }), /* @__PURE__ */ t(q, {
|
|
2517
2535
|
name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
|
|
2518
2536
|
width: 16,
|
|
2519
2537
|
height: 16
|
|
@@ -2523,47 +2541,52 @@ var M = {
|
|
|
2523
2541
|
})
|
|
2524
2542
|
] }, e.id))
|
|
2525
2543
|
}),
|
|
2526
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2527
|
-
colSpan:
|
|
2544
|
+
/* @__PURE__ */ t("tbody", { children: C ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2545
|
+
colSpan: X.length + +!!k + +!!le,
|
|
2528
2546
|
children: /* @__PURE__ */ t(Ke, {
|
|
2529
2547
|
lines: 3,
|
|
2530
2548
|
height: 65
|
|
2531
2549
|
})
|
|
2532
|
-
}) }) :
|
|
2550
|
+
}) }) : Je ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2533
2551
|
className: Q.state,
|
|
2534
|
-
colSpan:
|
|
2535
|
-
children:
|
|
2536
|
-
}) }) :
|
|
2552
|
+
colSpan: X.length + +!!k + +!!le,
|
|
2553
|
+
children: Je
|
|
2554
|
+
}) }) : Fe.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2537
2555
|
className: Q.state,
|
|
2538
|
-
colSpan:
|
|
2539
|
-
children:
|
|
2540
|
-
}) }) :
|
|
2541
|
-
let i =
|
|
2556
|
+
colSpan: X.length + +!!k + +!!le,
|
|
2557
|
+
children: w
|
|
2558
|
+
}) }) : Fe.map((e) => {
|
|
2559
|
+
let i = Le.has(e.id), a = N?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = ze.has(e.id);
|
|
2542
2560
|
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ n("tr", {
|
|
2543
|
-
className: [
|
|
2544
|
-
|
|
2561
|
+
className: [
|
|
2562
|
+
O || k ? Q.clickableRow : "",
|
|
2563
|
+
i ? Q.selectedRow : "",
|
|
2564
|
+
p?.(e.original)
|
|
2565
|
+
].filter(Boolean).join(" "),
|
|
2566
|
+
style: h?.(e.original),
|
|
2567
|
+
"aria-selected": k ? i : void 0,
|
|
2545
2568
|
onClick: () => {
|
|
2546
|
-
|
|
2569
|
+
k ? ct(e.id) : O?.(e.original);
|
|
2547
2570
|
},
|
|
2548
2571
|
onDoubleClick: () => {
|
|
2549
|
-
|
|
2572
|
+
k && M?.(e.original);
|
|
2550
2573
|
},
|
|
2551
2574
|
onKeyDown: (t) => {
|
|
2552
|
-
t.key === "Enter" ? (t.preventDefault(),
|
|
2575
|
+
t.key === "Enter" ? (t.preventDefault(), k ? M?.(e.original) : O?.(e.original)) : t.key === " " && k && (t.preventDefault(), ct(e.id));
|
|
2553
2576
|
},
|
|
2554
|
-
tabIndex:
|
|
2555
|
-
role: !
|
|
2577
|
+
tabIndex: O || k || M ? 0 : void 0,
|
|
2578
|
+
role: !k && O ? "button" : void 0,
|
|
2556
2579
|
children: [
|
|
2557
|
-
|
|
2580
|
+
le && /* @__PURE__ */ t("td", {
|
|
2558
2581
|
className: Q.expansionCell,
|
|
2559
2582
|
onClick: (e) => e.stopPropagation(),
|
|
2560
|
-
children: /* @__PURE__ */ t(
|
|
2583
|
+
children: /* @__PURE__ */ t(A, {
|
|
2561
2584
|
size: "sm",
|
|
2562
2585
|
variant: "empty",
|
|
2563
2586
|
"aria-expanded": o,
|
|
2564
|
-
"aria-label":
|
|
2565
|
-
onClick: () =>
|
|
2566
|
-
children: /* @__PURE__ */ t(
|
|
2587
|
+
"aria-label": de?.(e.original, o) ?? (o ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2588
|
+
onClick: () => yt(e.id),
|
|
2589
|
+
children: /* @__PURE__ */ t(q, {
|
|
2567
2590
|
name: "IconChevron",
|
|
2568
2591
|
width: 16,
|
|
2569
2592
|
height: 16,
|
|
@@ -2571,34 +2594,34 @@ var M = {
|
|
|
2571
2594
|
})
|
|
2572
2595
|
})
|
|
2573
2596
|
}),
|
|
2574
|
-
|
|
2597
|
+
k && /* @__PURE__ */ t("td", {
|
|
2575
2598
|
className: Q.selectionCell,
|
|
2576
2599
|
children: /* @__PURE__ */ t("div", {
|
|
2577
2600
|
onClick: (e) => e.stopPropagation(),
|
|
2578
|
-
children: /* @__PURE__ */ t(
|
|
2601
|
+
children: /* @__PURE__ */ t(Ce, {
|
|
2579
2602
|
checked: i,
|
|
2580
2603
|
ariaLabel: a,
|
|
2581
|
-
onChange: () =>
|
|
2604
|
+
onChange: () => ct(e.id)
|
|
2582
2605
|
})
|
|
2583
2606
|
})
|
|
2584
2607
|
}),
|
|
2585
2608
|
e.getAllCells().map((e) => /* @__PURE__ */ t("td", {
|
|
2586
|
-
className:
|
|
2609
|
+
className: X.find((t) => t.id === e.column.id)?.sticky ? Q.stickyColumn : void 0,
|
|
2587
2610
|
style: {
|
|
2588
|
-
...pt(
|
|
2589
|
-
...mt(
|
|
2611
|
+
...pt(X.find((t) => t.id === e.column.id)),
|
|
2612
|
+
...mt(X.find((t) => t.id === e.column.id))
|
|
2590
2613
|
},
|
|
2591
|
-
children: /* @__PURE__ */ t(
|
|
2614
|
+
children: /* @__PURE__ */ t(ke.FlexRender, { cell: e })
|
|
2592
2615
|
}, e.id))
|
|
2593
2616
|
]
|
|
2594
|
-
}), o &&
|
|
2617
|
+
}), o && le && /* @__PURE__ */ t("tr", {
|
|
2595
2618
|
className: Q.detailRow,
|
|
2596
2619
|
children: /* @__PURE__ */ t("td", {
|
|
2597
|
-
colSpan:
|
|
2598
|
-
children:
|
|
2620
|
+
colSpan: X.length + +!!k + 1,
|
|
2621
|
+
children: le({
|
|
2599
2622
|
row: e.original,
|
|
2600
2623
|
rowId: e.id,
|
|
2601
|
-
collapse: () =>
|
|
2624
|
+
collapse: () => yt(e.id)
|
|
2602
2625
|
})
|
|
2603
2626
|
})
|
|
2604
2627
|
})] }, e.id);
|
|
@@ -2606,57 +2629,57 @@ var M = {
|
|
|
2606
2629
|
]
|
|
2607
2630
|
})
|
|
2608
2631
|
}),
|
|
2609
|
-
!
|
|
2632
|
+
!Z && /* @__PURE__ */ n("div", {
|
|
2610
2633
|
className: Q.cards,
|
|
2611
2634
|
role: "list",
|
|
2612
|
-
"aria-label":
|
|
2613
|
-
children: [
|
|
2635
|
+
"aria-label": S ?? b,
|
|
2636
|
+
children: [k && !C && !Je && Fe.length > 0 && /* @__PURE__ */ n("div", {
|
|
2614
2637
|
className: Q.mobileSelectionControls,
|
|
2615
|
-
children: [/* @__PURE__ */ t(
|
|
2616
|
-
checked:
|
|
2617
|
-
indeterminate:
|
|
2618
|
-
ariaLabel:
|
|
2619
|
-
label:
|
|
2620
|
-
onChange:
|
|
2621
|
-
}), /* @__PURE__ */ t(
|
|
2638
|
+
children: [/* @__PURE__ */ t(Ce, {
|
|
2639
|
+
checked: He,
|
|
2640
|
+
indeterminate: Ue,
|
|
2641
|
+
ariaLabel: P,
|
|
2642
|
+
label: P,
|
|
2643
|
+
onChange: lt
|
|
2644
|
+
}), /* @__PURE__ */ t(A, {
|
|
2622
2645
|
size: "sm",
|
|
2623
2646
|
variant: "empty",
|
|
2624
|
-
disabled:
|
|
2625
|
-
onClick:
|
|
2626
|
-
children:
|
|
2647
|
+
disabled: Le.size === 0,
|
|
2648
|
+
onClick: vt,
|
|
2649
|
+
children: F
|
|
2627
2650
|
})]
|
|
2628
|
-
}),
|
|
2651
|
+
}), C ? /* @__PURE__ */ t(Ke, {
|
|
2629
2652
|
lines: 4,
|
|
2630
2653
|
height: 65
|
|
2631
|
-
}) :
|
|
2654
|
+
}) : Je ? /* @__PURE__ */ t("div", {
|
|
2632
2655
|
className: Q.state,
|
|
2633
|
-
children:
|
|
2634
|
-
}) :
|
|
2656
|
+
children: Je
|
|
2657
|
+
}) : Fe.length === 0 ? /* @__PURE__ */ t("div", {
|
|
2635
2658
|
className: Q.state,
|
|
2636
|
-
children:
|
|
2637
|
-
}) :
|
|
2638
|
-
let r =
|
|
2659
|
+
children: w
|
|
2660
|
+
}) : Fe.map((e) => {
|
|
2661
|
+
let r = Le.has(e.id), i = ze.has(e.id), a = N?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = k && /* @__PURE__ */ n("div", {
|
|
2639
2662
|
className: Q.cardSelectionControls,
|
|
2640
2663
|
onClick: (e) => e.stopPropagation(),
|
|
2641
|
-
children: [/* @__PURE__ */ t(
|
|
2664
|
+
children: [/* @__PURE__ */ t(Ce, {
|
|
2642
2665
|
checked: r,
|
|
2643
2666
|
ariaLabel: a,
|
|
2644
|
-
onChange: () =>
|
|
2645
|
-
}),
|
|
2667
|
+
onChange: () => ct(e.id)
|
|
2668
|
+
}), M && /* @__PURE__ */ t(A, {
|
|
2646
2669
|
size: "sm",
|
|
2647
2670
|
variant: "empty",
|
|
2648
|
-
onClick: () =>
|
|
2649
|
-
children:
|
|
2671
|
+
onClick: () => M(e.original),
|
|
2672
|
+
children: I
|
|
2650
2673
|
})]
|
|
2651
|
-
}), s =
|
|
2674
|
+
}), s = le && /* @__PURE__ */ t(A, {
|
|
2652
2675
|
size: "sm",
|
|
2653
2676
|
variant: "empty",
|
|
2654
2677
|
"aria-expanded": i,
|
|
2655
|
-
"aria-label":
|
|
2678
|
+
"aria-label": de?.(e.original, i) ?? (i ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2656
2679
|
onClick: (t) => {
|
|
2657
|
-
t.stopPropagation(),
|
|
2680
|
+
t.stopPropagation(), yt(e.id);
|
|
2658
2681
|
},
|
|
2659
|
-
children: /* @__PURE__ */ t(
|
|
2682
|
+
children: /* @__PURE__ */ t(q, {
|
|
2660
2683
|
name: "IconChevron",
|
|
2661
2684
|
width: 16,
|
|
2662
2685
|
height: 16,
|
|
@@ -2665,35 +2688,45 @@ var M = {
|
|
|
2665
2688
|
});
|
|
2666
2689
|
if (u) return /* @__PURE__ */ n("div", {
|
|
2667
2690
|
role: "listitem",
|
|
2668
|
-
className:
|
|
2669
|
-
|
|
2691
|
+
className: [
|
|
2692
|
+
Q.customCardShell,
|
|
2693
|
+
r ? Q.selectedCard : "",
|
|
2694
|
+
p?.(e.original)
|
|
2695
|
+
].filter(Boolean).join(" "),
|
|
2696
|
+
style: h?.(e.original),
|
|
2697
|
+
"aria-selected": k ? r : void 0,
|
|
2670
2698
|
onClick: () => {
|
|
2671
|
-
|
|
2699
|
+
k && ct(e.id);
|
|
2672
2700
|
},
|
|
2673
2701
|
children: [
|
|
2674
2702
|
o,
|
|
2675
2703
|
u({
|
|
2676
2704
|
row: e.original,
|
|
2677
|
-
columns:
|
|
2705
|
+
columns: X
|
|
2678
2706
|
}),
|
|
2679
2707
|
s,
|
|
2680
2708
|
i && /* @__PURE__ */ t("div", {
|
|
2681
2709
|
className: Q.cardDetail,
|
|
2682
|
-
children:
|
|
2710
|
+
children: le?.({
|
|
2683
2711
|
row: e.original,
|
|
2684
2712
|
rowId: e.id,
|
|
2685
|
-
collapse: () =>
|
|
2713
|
+
collapse: () => yt(e.id)
|
|
2686
2714
|
})
|
|
2687
2715
|
})
|
|
2688
2716
|
]
|
|
2689
2717
|
}, e.id);
|
|
2690
|
-
let c =
|
|
2718
|
+
let c = X.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), l = c.find((e) => e.mobile?.primary) ?? c.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => _t(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
|
|
2691
2719
|
return /* @__PURE__ */ n("article", {
|
|
2692
2720
|
role: "listitem",
|
|
2693
|
-
className:
|
|
2694
|
-
|
|
2721
|
+
className: [
|
|
2722
|
+
Q.card,
|
|
2723
|
+
r ? Q.selectedCard : "",
|
|
2724
|
+
p?.(e.original)
|
|
2725
|
+
].filter(Boolean).join(" "),
|
|
2726
|
+
style: h?.(e.original),
|
|
2727
|
+
"aria-selected": k ? r : void 0,
|
|
2695
2728
|
onClick: () => {
|
|
2696
|
-
|
|
2729
|
+
k && ct(e.id);
|
|
2697
2730
|
},
|
|
2698
2731
|
children: [
|
|
2699
2732
|
o,
|
|
@@ -2706,41 +2739,41 @@ var M = {
|
|
|
2706
2739
|
c.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: f(e) }, e.id)),
|
|
2707
2740
|
i && /* @__PURE__ */ t("div", {
|
|
2708
2741
|
className: Q.cardDetail,
|
|
2709
|
-
children:
|
|
2742
|
+
children: le?.({
|
|
2710
2743
|
row: e.original,
|
|
2711
2744
|
rowId: e.id,
|
|
2712
|
-
collapse: () =>
|
|
2745
|
+
collapse: () => yt(e.id)
|
|
2713
2746
|
})
|
|
2714
2747
|
})
|
|
2715
2748
|
]
|
|
2716
2749
|
}, e.id);
|
|
2717
2750
|
})]
|
|
2718
2751
|
}),
|
|
2719
|
-
(
|
|
2752
|
+
(Ye || Xe && !C && !Je && Fe.length > 0) && /* @__PURE__ */ n("nav", {
|
|
2720
2753
|
className: Q.pagination,
|
|
2721
2754
|
"aria-label": "Пагинация таблицы",
|
|
2722
|
-
children: [
|
|
2755
|
+
children: [Xe ? at("bottom") : /* @__PURE__ */ n("span", {
|
|
2723
2756
|
className: Q.paginationRange,
|
|
2724
2757
|
"aria-live": "polite",
|
|
2725
2758
|
children: [
|
|
2726
|
-
|
|
2759
|
+
nt,
|
|
2727
2760
|
"–",
|
|
2728
|
-
|
|
2761
|
+
rt,
|
|
2729
2762
|
" из ",
|
|
2730
|
-
|
|
2763
|
+
je
|
|
2731
2764
|
]
|
|
2732
|
-
}),
|
|
2765
|
+
}), Ye && /* @__PURE__ */ n("div", {
|
|
2733
2766
|
className: Q.paginationControls,
|
|
2734
2767
|
children: [
|
|
2735
|
-
/* @__PURE__ */ n(
|
|
2768
|
+
/* @__PURE__ */ n(A, {
|
|
2736
2769
|
variant: "empty",
|
|
2737
2770
|
size: "md",
|
|
2738
|
-
disabled:
|
|
2771
|
+
disabled: C || Pe === 0,
|
|
2739
2772
|
"aria-label": "Предыдущая страница",
|
|
2740
2773
|
onClick: () => {
|
|
2741
|
-
|
|
2774
|
+
ot(Pe - 1);
|
|
2742
2775
|
},
|
|
2743
|
-
children: [/* @__PURE__ */ t(
|
|
2776
|
+
children: [/* @__PURE__ */ t(q, {
|
|
2744
2777
|
name: "IconChevron",
|
|
2745
2778
|
width: 18,
|
|
2746
2779
|
height: 18,
|
|
@@ -2752,15 +2785,15 @@ var M = {
|
|
|
2752
2785
|
}),
|
|
2753
2786
|
/* @__PURE__ */ t("div", {
|
|
2754
2787
|
className: Q.pageNumbers,
|
|
2755
|
-
children:
|
|
2756
|
-
variant: e ===
|
|
2788
|
+
children: Ge.map((e) => typeof e == "number" ? /* @__PURE__ */ t(A, {
|
|
2789
|
+
variant: e === Pe ? "secondary" : "empty",
|
|
2757
2790
|
size: "md",
|
|
2758
2791
|
className: Q.pageButton,
|
|
2759
2792
|
"aria-label": `Перейти на страницу ${e + 1}`,
|
|
2760
|
-
"aria-current": e ===
|
|
2761
|
-
disabled:
|
|
2793
|
+
"aria-current": e === Pe ? "page" : void 0,
|
|
2794
|
+
disabled: C,
|
|
2762
2795
|
onClick: () => {
|
|
2763
|
-
|
|
2796
|
+
ot(e);
|
|
2764
2797
|
},
|
|
2765
2798
|
children: e + 1
|
|
2766
2799
|
}, e) : /* @__PURE__ */ t("span", {
|
|
@@ -2769,18 +2802,18 @@ var M = {
|
|
|
2769
2802
|
children: "…"
|
|
2770
2803
|
}, e))
|
|
2771
2804
|
}),
|
|
2772
|
-
/* @__PURE__ */ n(
|
|
2805
|
+
/* @__PURE__ */ n(A, {
|
|
2773
2806
|
variant: "empty",
|
|
2774
2807
|
size: "md",
|
|
2775
|
-
disabled:
|
|
2808
|
+
disabled: C || Pe === Me - 1,
|
|
2776
2809
|
"aria-label": "Следующая страница",
|
|
2777
2810
|
onClick: () => {
|
|
2778
|
-
|
|
2811
|
+
ot(Pe + 1);
|
|
2779
2812
|
},
|
|
2780
2813
|
children: [/* @__PURE__ */ t("span", {
|
|
2781
2814
|
className: Q.paginationButtonLabel,
|
|
2782
2815
|
children: "Вперёд"
|
|
2783
|
-
}), /* @__PURE__ */ t(
|
|
2816
|
+
}), /* @__PURE__ */ t(q, {
|
|
2784
2817
|
name: "IconChevron",
|
|
2785
2818
|
width: 18,
|
|
2786
2819
|
height: 18,
|
|
@@ -2824,19 +2857,19 @@ var M = {
|
|
|
2824
2857
|
sm: 30,
|
|
2825
2858
|
md: 40,
|
|
2826
2859
|
lg: 50
|
|
2827
|
-
}, Pt = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: o = "Ничего не найдено", disabled: s = !1, readOnly: c = !1, stringWhileDisabled: u = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name:
|
|
2828
|
-
let
|
|
2860
|
+
}, Pt = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: o = "Ничего не найдено", disabled: s = !1, readOnly: c = !1, stringWhileDisabled: u = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: ee, id: w, needMark: T = !0 }) => {
|
|
2861
|
+
let E = f(), D = w ?? `ds-search-dropdown-${ee ?? E}`, O = `${D}-listbox`, k = `${D}-status`, A = b ? `${D}-hint` : void 0, j = y ? `${D}-error` : void 0, N = [
|
|
2862
|
+
k,
|
|
2829
2863
|
A,
|
|
2830
|
-
j
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
let e = oe();
|
|
2864
|
+
j
|
|
2865
|
+
].filter(Boolean).join(" "), P = h(null), F = h(null), I = h([]), [L, R] = g(!1), [z, B] = g(""), [V, H] = g(-1), [U, ne] = g(null), re = m(() => e.find((e) => e.value === r), [e, r]), ie = m(() => Et(e, z), [e, z]), ae = s && u, oe = V >= 0 ? ie[V] : void 0;
|
|
2866
|
+
d(() => B(re?.label ?? ""), [re?.label, r]);
|
|
2867
|
+
let se = l(() => P.current?.querySelector("input") ?? null, []), ce = l((e, t) => Dt(ie, e, t), [ie]), le = l((e) => {
|
|
2868
|
+
H(e), !(e < 0) && requestAnimationFrame(() => I.current[e]?.scrollIntoView({ block: "nearest" }));
|
|
2869
|
+
}, []), W = l(() => {
|
|
2870
|
+
let e = se();
|
|
2838
2871
|
if (!e) return;
|
|
2839
|
-
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(
|
|
2872
|
+
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(ie.length, jt)) * Nt[x] + Mt, r = window.innerHeight - t.bottom - kt, i = t.top - kt, a = r < n && i > r, o = a ? i : r, s = Math.max(Nt[x] + Mt, Math.min(n, o)), c = window.innerWidth - t.width - kt, l = Math.max(kt, Math.min(t.left, c)), u = a ? Math.max(kt, t.top - s - At) : t.bottom + At;
|
|
2840
2873
|
ne({
|
|
2841
2874
|
top: u,
|
|
2842
2875
|
left: l,
|
|
@@ -2844,34 +2877,34 @@ var M = {
|
|
|
2844
2877
|
maxHeight: s
|
|
2845
2878
|
});
|
|
2846
2879
|
}, [
|
|
2847
|
-
|
|
2848
|
-
|
|
2880
|
+
ie.length,
|
|
2881
|
+
se,
|
|
2849
2882
|
x
|
|
2850
2883
|
]);
|
|
2851
2884
|
p(() => {
|
|
2852
|
-
if (!
|
|
2885
|
+
if (!L) {
|
|
2853
2886
|
ne(null);
|
|
2854
2887
|
return;
|
|
2855
2888
|
}
|
|
2856
|
-
return
|
|
2857
|
-
window.removeEventListener("resize",
|
|
2889
|
+
return W(), window.addEventListener("resize", W), window.addEventListener("scroll", W, !0), () => {
|
|
2890
|
+
window.removeEventListener("resize", W), window.removeEventListener("scroll", W, !0);
|
|
2858
2891
|
};
|
|
2859
|
-
}, [
|
|
2860
|
-
if (!
|
|
2892
|
+
}, [L, W]), d(() => {
|
|
2893
|
+
if (!L) return;
|
|
2861
2894
|
let e = (e) => {
|
|
2862
2895
|
let t = e.target;
|
|
2863
|
-
!
|
|
2896
|
+
!P.current?.contains(t) && !F.current?.contains(t) && (R(!1), H(-1));
|
|
2864
2897
|
};
|
|
2865
2898
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
2866
|
-
}, [
|
|
2867
|
-
let
|
|
2868
|
-
s || c || (
|
|
2869
|
-
},
|
|
2870
|
-
e.disabled || (
|
|
2871
|
-
},
|
|
2872
|
-
ref:
|
|
2873
|
-
id:
|
|
2874
|
-
className: `${Ot.menu} ${
|
|
2899
|
+
}, [L]);
|
|
2900
|
+
let ue = () => {
|
|
2901
|
+
s || c || (R(!0), H(ce(0, 1)));
|
|
2902
|
+
}, de = (e) => {
|
|
2903
|
+
e.disabled || (B(e.label), R(!1), H(-1), i?.(e.value, e), se()?.focus());
|
|
2904
|
+
}, fe = L ? /* @__PURE__ */ t("ul", {
|
|
2905
|
+
ref: F,
|
|
2906
|
+
id: O,
|
|
2907
|
+
className: `${Ot.menu} ${ie.length === 0 ? Ot.menuEmpty : ""}`,
|
|
2875
2908
|
role: "listbox",
|
|
2876
2909
|
"aria-label": v,
|
|
2877
2910
|
style: U ? {
|
|
@@ -2885,18 +2918,18 @@ var M = {
|
|
|
2885
2918
|
visibility: "hidden",
|
|
2886
2919
|
maxHeight: 0
|
|
2887
2920
|
},
|
|
2888
|
-
children:
|
|
2921
|
+
children: ie.length === 0 ? /* @__PURE__ */ t("li", {
|
|
2889
2922
|
className: `${Ot.empty} ${Ot[x]}`,
|
|
2890
2923
|
children: o
|
|
2891
|
-
}) :
|
|
2924
|
+
}) : ie.map((e, i) => {
|
|
2892
2925
|
let a = e.value === r, o = i === V;
|
|
2893
2926
|
return /* @__PURE__ */ t("li", {
|
|
2894
2927
|
role: "presentation",
|
|
2895
2928
|
children: /* @__PURE__ */ n("button", {
|
|
2896
2929
|
ref: (e) => {
|
|
2897
|
-
|
|
2930
|
+
I.current[i] = e;
|
|
2898
2931
|
},
|
|
2899
|
-
id: `${
|
|
2932
|
+
id: `${D}-option-${i}`,
|
|
2900
2933
|
type: "button",
|
|
2901
2934
|
role: "option",
|
|
2902
2935
|
tabIndex: -1,
|
|
@@ -2912,8 +2945,8 @@ var M = {
|
|
|
2912
2945
|
onPointerMove: () => {
|
|
2913
2946
|
e.disabled || H(i);
|
|
2914
2947
|
},
|
|
2915
|
-
onClick: () =>
|
|
2916
|
-
children: [/* @__PURE__ */ t("span", { children: e.label }), a &&
|
|
2948
|
+
onClick: () => de(e),
|
|
2949
|
+
children: [/* @__PURE__ */ t("span", { children: e.label }), a && T && /* @__PURE__ */ t(q, {
|
|
2917
2950
|
name: "IconCheck",
|
|
2918
2951
|
width: 16,
|
|
2919
2952
|
height: 16
|
|
@@ -2923,28 +2956,28 @@ var M = {
|
|
|
2923
2956
|
})
|
|
2924
2957
|
}) : null;
|
|
2925
2958
|
return /* @__PURE__ */ n("div", {
|
|
2926
|
-
ref:
|
|
2959
|
+
ref: P,
|
|
2927
2960
|
className: [
|
|
2928
2961
|
Ot.wrapper,
|
|
2929
2962
|
y ? Ot.errorState : "",
|
|
2930
2963
|
C
|
|
2931
2964
|
].filter(Boolean).join(" "),
|
|
2932
2965
|
children: [
|
|
2933
|
-
v && /* @__PURE__ */ t(
|
|
2934
|
-
htmlFor:
|
|
2966
|
+
v && /* @__PURE__ */ t(te, {
|
|
2967
|
+
htmlFor: ae ? void 0 : D,
|
|
2935
2968
|
required: S,
|
|
2936
2969
|
disabled: s,
|
|
2937
2970
|
children: v
|
|
2938
2971
|
}),
|
|
2939
|
-
|
|
2972
|
+
ae ? /* @__PURE__ */ t("div", {
|
|
2940
2973
|
className: `${Ot.disabledText} ${Ot[x]}`,
|
|
2941
2974
|
children: re?.label ?? a
|
|
2942
2975
|
}) : /* @__PURE__ */ n("div", {
|
|
2943
2976
|
className: Ot.control,
|
|
2944
2977
|
children: [/* @__PURE__ */ t(nt, {
|
|
2945
|
-
id:
|
|
2946
|
-
name:
|
|
2947
|
-
value:
|
|
2978
|
+
id: D,
|
|
2979
|
+
name: ee,
|
|
2980
|
+
value: z,
|
|
2948
2981
|
placeholder: a,
|
|
2949
2982
|
disabled: s,
|
|
2950
2983
|
readOnly: c,
|
|
@@ -2953,56 +2986,56 @@ var M = {
|
|
|
2953
2986
|
clearable: !1,
|
|
2954
2987
|
autoComplete: "off",
|
|
2955
2988
|
className: `${Ot.inputHost} ${Ot[x]}`,
|
|
2956
|
-
onFocus:
|
|
2989
|
+
onFocus: ue,
|
|
2957
2990
|
onChange: (t) => {
|
|
2958
2991
|
let n = String(t), r = Et(e, n);
|
|
2959
|
-
|
|
2992
|
+
B(n), R(!0), H(Dt(r, 0, 1));
|
|
2960
2993
|
},
|
|
2961
2994
|
role: "combobox",
|
|
2962
2995
|
"aria-autocomplete": "list",
|
|
2963
|
-
"aria-expanded":
|
|
2964
|
-
"aria-controls":
|
|
2965
|
-
"aria-activedescendant":
|
|
2996
|
+
"aria-expanded": L,
|
|
2997
|
+
"aria-controls": O,
|
|
2998
|
+
"aria-activedescendant": oe ? `${D}-option-${V}` : void 0,
|
|
2966
2999
|
"aria-invalid": !!y,
|
|
2967
|
-
"aria-describedby":
|
|
2968
|
-
onClick:
|
|
3000
|
+
"aria-describedby": N,
|
|
3001
|
+
onClick: ue,
|
|
2969
3002
|
onKeyDown: (e) => {
|
|
2970
3003
|
if (!(s || c)) {
|
|
2971
3004
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
2972
3005
|
e.preventDefault();
|
|
2973
|
-
let t = e.key === "ArrowDown" ? 1 : -1, n = V >= 0 ? V + t : t === 1 ? 0 :
|
|
2974
|
-
|
|
3006
|
+
let t = e.key === "ArrowDown" ? 1 : -1, n = V >= 0 ? V + t : t === 1 ? 0 : ie.length - 1;
|
|
3007
|
+
R(!0), le(ce(n, t));
|
|
2975
3008
|
} else if (e.key === "Home" || e.key === "End") {
|
|
2976
|
-
if (!
|
|
3009
|
+
if (!L) return;
|
|
2977
3010
|
e.preventDefault();
|
|
2978
3011
|
let t = e.key === "Home" ? 1 : -1;
|
|
2979
|
-
|
|
2980
|
-
} else e.key === "Enter" &&
|
|
3012
|
+
le(ce(e.key === "Home" ? 0 : ie.length - 1, t));
|
|
3013
|
+
} else e.key === "Enter" && L && oe ? (e.preventDefault(), de(oe)) : e.key === "Escape" && L ? (e.preventDefault(), R(!1), H(-1)) : e.key === "Tab" && (R(!1), H(-1));
|
|
2981
3014
|
}
|
|
2982
3015
|
}
|
|
2983
3016
|
}), /* @__PURE__ */ t("span", {
|
|
2984
|
-
className: `${Ot.chevron} ${
|
|
3017
|
+
className: `${Ot.chevron} ${L ? Ot.chevronOpen : ""}`,
|
|
2985
3018
|
"aria-hidden": "true",
|
|
2986
|
-
children: /* @__PURE__ */ t(
|
|
3019
|
+
children: /* @__PURE__ */ t(q, {
|
|
2987
3020
|
name: "IconChevron",
|
|
2988
3021
|
width: 20,
|
|
2989
3022
|
height: 20
|
|
2990
3023
|
})
|
|
2991
3024
|
})]
|
|
2992
3025
|
}),
|
|
2993
|
-
|
|
3026
|
+
L && typeof document < "u" && _(fe, document.body),
|
|
2994
3027
|
/* @__PURE__ */ n("span", {
|
|
2995
|
-
id:
|
|
3028
|
+
id: k,
|
|
2996
3029
|
className: Ot.visuallyHidden,
|
|
2997
3030
|
"aria-live": "polite",
|
|
2998
|
-
children: ["Найдено вариантов: ",
|
|
3031
|
+
children: ["Найдено вариантов: ", ie.length]
|
|
2999
3032
|
}),
|
|
3000
|
-
b && !y && /* @__PURE__ */ t(
|
|
3001
|
-
id:
|
|
3033
|
+
b && !y && /* @__PURE__ */ t(M, {
|
|
3034
|
+
id: A,
|
|
3002
3035
|
children: b
|
|
3003
3036
|
}),
|
|
3004
|
-
y && /* @__PURE__ */ t(
|
|
3005
|
-
id:
|
|
3037
|
+
y && /* @__PURE__ */ t(M, {
|
|
3038
|
+
id: j,
|
|
3006
3039
|
variant: "error",
|
|
3007
3040
|
children: y
|
|
3008
3041
|
})
|
|
@@ -3025,12 +3058,12 @@ var M = {
|
|
|
3025
3058
|
id: l,
|
|
3026
3059
|
className: Ft.title,
|
|
3027
3060
|
children: e
|
|
3028
|
-
}), i && /* @__PURE__ */ t(
|
|
3061
|
+
}), i && /* @__PURE__ */ t(A, {
|
|
3029
3062
|
className: Ft.dismiss,
|
|
3030
3063
|
variant: "empty",
|
|
3031
3064
|
onClick: a,
|
|
3032
3065
|
"aria-label": o,
|
|
3033
|
-
children: /* @__PURE__ */ t(
|
|
3066
|
+
children: /* @__PURE__ */ t(q, {
|
|
3034
3067
|
name: "IconCross",
|
|
3035
3068
|
width: 20,
|
|
3036
3069
|
height: 20
|
|
@@ -3098,7 +3131,7 @@ var M = {
|
|
|
3098
3131
|
disabled: n,
|
|
3099
3132
|
onChange: (t) => d(e.id, t)
|
|
3100
3133
|
}, e.id);
|
|
3101
|
-
if (e.type === "checkbox") return /* @__PURE__ */ t(
|
|
3134
|
+
if (e.type === "checkbox") return /* @__PURE__ */ t(Ce, {
|
|
3102
3135
|
label: e.label,
|
|
3103
3136
|
hint: e.hint,
|
|
3104
3137
|
checked: !!i,
|
|
@@ -3127,12 +3160,12 @@ var M = {
|
|
|
3127
3160
|
})
|
|
3128
3161
|
}), (o || s === "manual") && /* @__PURE__ */ n("div", {
|
|
3129
3162
|
className: Lt.actions,
|
|
3130
|
-
children: [o && /* @__PURE__ */ t(
|
|
3163
|
+
children: [o && /* @__PURE__ */ t(A, {
|
|
3131
3164
|
variant: "destructiveOutline",
|
|
3132
3165
|
disabled: l || c,
|
|
3133
3166
|
onClick: o,
|
|
3134
3167
|
children: "Сбросить"
|
|
3135
|
-
}), s === "manual" && /* @__PURE__ */ t(
|
|
3168
|
+
}), s === "manual" && /* @__PURE__ */ t(A, {
|
|
3136
3169
|
isLoading: c,
|
|
3137
3170
|
disabled: l,
|
|
3138
3171
|
onClick: () => a?.(r),
|
|
@@ -3195,8 +3228,8 @@ var M = {
|
|
|
3195
3228
|
file: "_file_i20hz_133",
|
|
3196
3229
|
fileName: "_fileName_i20hz_175",
|
|
3197
3230
|
fileSize: "_fileSize_i20hz_187"
|
|
3198
|
-
}, Wt = (e) => `${e.name}:${e.size}:${e.lastModified}`, Gt = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Kt = (e, t) => !t || t.split(",").map((e) => e.trim().toLowerCase()).some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t), qt = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: c, label: l, hint: u, error: d, required: p = !1, disabled: m = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject:
|
|
3199
|
-
let
|
|
3231
|
+
}, Wt = (e) => `${e.name}:${e.size}:${e.lastModified}`, Gt = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Kt = (e, t) => !t || t.split(",").map((e) => e.trim().toLowerCase()).some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t), qt = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: c, label: l, hint: u, error: d, required: p = !1, disabled: m = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: ee }) => {
|
|
3232
|
+
let w = f(), T = y ?? `ds-file-input-${v ?? w}`, E = h(null), D = h(0), [O, k] = g(!1), j = u ? `${T}-hint` : void 0, N = d ? `${T}-error` : void 0, P = [j, N].filter(Boolean).join(" ") || void 0, F = !m && !_, I = (e) => {
|
|
3200
3233
|
let t = [], n = new Set(r.map(Wt)), l = e.filter((e) => Kt(e, o) ? s !== void 0 && e.size > s ? (t.push({
|
|
3201
3234
|
file: e,
|
|
3202
3235
|
reason: "maxSize"
|
|
@@ -3207,42 +3240,42 @@ var M = {
|
|
|
3207
3240
|
u !== void 0 && d.length > u && (d.slice(u).forEach((e) => t.push({
|
|
3208
3241
|
file: e,
|
|
3209
3242
|
reason: "maxFiles"
|
|
3210
|
-
})), d = d.slice(0, u)), t.length &&
|
|
3243
|
+
})), d = d.slice(0, u)), t.length && ee?.(t), l.length && i?.(d), E.current && (E.current.value = "");
|
|
3211
3244
|
};
|
|
3212
3245
|
return /* @__PURE__ */ n("div", {
|
|
3213
3246
|
className: `${Ut.wrapper} ${b}`,
|
|
3214
3247
|
children: [
|
|
3215
|
-
l && /* @__PURE__ */ t(
|
|
3216
|
-
htmlFor:
|
|
3248
|
+
l && /* @__PURE__ */ t(te, {
|
|
3249
|
+
htmlFor: T,
|
|
3217
3250
|
required: p,
|
|
3218
3251
|
disabled: m,
|
|
3219
3252
|
children: l
|
|
3220
3253
|
}),
|
|
3221
3254
|
/* @__PURE__ */ n("div", {
|
|
3222
|
-
className: `${Ut.dropzone} ${
|
|
3255
|
+
className: `${Ut.dropzone} ${O ? Ut.dragActive : ""} ${m ? Ut.disabled : ""} ${d ? Ut.error : ""}`,
|
|
3223
3256
|
onDragEnter: (e) => {
|
|
3224
|
-
e.preventDefault(),
|
|
3257
|
+
e.preventDefault(), F && ++D.current === 1 && k(!0);
|
|
3225
3258
|
},
|
|
3226
3259
|
onDragOver: (e) => e.preventDefault(),
|
|
3227
3260
|
onDragLeave: (e) => {
|
|
3228
|
-
e.preventDefault(), --
|
|
3261
|
+
e.preventDefault(), --D.current <= 0 && (D.current = 0, k(!1));
|
|
3229
3262
|
},
|
|
3230
3263
|
onDrop: (e) => {
|
|
3231
|
-
e.preventDefault(),
|
|
3264
|
+
e.preventDefault(), D.current = 0, k(!1), F && I(Array.from(e.dataTransfer.files));
|
|
3232
3265
|
},
|
|
3233
3266
|
children: [/* @__PURE__ */ t("input", {
|
|
3234
|
-
ref:
|
|
3235
|
-
id:
|
|
3267
|
+
ref: E,
|
|
3268
|
+
id: T,
|
|
3236
3269
|
name: v,
|
|
3237
3270
|
className: Ut.nativeInput,
|
|
3238
3271
|
type: "file",
|
|
3239
3272
|
multiple: a,
|
|
3240
3273
|
accept: o,
|
|
3241
3274
|
required: p && r.length === 0,
|
|
3242
|
-
disabled: !
|
|
3243
|
-
"aria-describedby":
|
|
3275
|
+
disabled: !F,
|
|
3276
|
+
"aria-describedby": P,
|
|
3244
3277
|
"aria-invalid": !!d,
|
|
3245
|
-
onChange: (e) =>
|
|
3278
|
+
onChange: (e) => I(Array.from(e.target.files ?? []))
|
|
3246
3279
|
}), r.length ? /* @__PURE__ */ n(e, { children: [
|
|
3247
3280
|
/* @__PURE__ */ t("ul", {
|
|
3248
3281
|
className: Ut.files,
|
|
@@ -3259,12 +3292,12 @@ var M = {
|
|
|
3259
3292
|
className: Ut.fileSize,
|
|
3260
3293
|
children: Gt(e.size)
|
|
3261
3294
|
}),
|
|
3262
|
-
|
|
3295
|
+
F && /* @__PURE__ */ t(A, {
|
|
3263
3296
|
variant: "empty",
|
|
3264
3297
|
size: "sm",
|
|
3265
3298
|
"aria-label": `Удалить файл ${e.name}`,
|
|
3266
3299
|
onClick: () => i?.(r.filter((e, t) => t !== a)),
|
|
3267
|
-
children: /* @__PURE__ */ t(
|
|
3300
|
+
children: /* @__PURE__ */ t(q, {
|
|
3268
3301
|
name: "IconCross",
|
|
3269
3302
|
width: 16,
|
|
3270
3303
|
height: 16
|
|
@@ -3273,16 +3306,16 @@ var M = {
|
|
|
3273
3306
|
]
|
|
3274
3307
|
}, Wt(e)))
|
|
3275
3308
|
}),
|
|
3276
|
-
|
|
3309
|
+
F && (a || r.length === 0) && /* @__PURE__ */ t(A, {
|
|
3277
3310
|
className: Ut.browseButton,
|
|
3278
3311
|
size: "sm",
|
|
3279
|
-
onClick: () =>
|
|
3312
|
+
onClick: () => E.current?.click(),
|
|
3280
3313
|
children: C
|
|
3281
3314
|
}),
|
|
3282
|
-
|
|
3315
|
+
F && !a && /* @__PURE__ */ t(A, {
|
|
3283
3316
|
className: Ut.browseButton,
|
|
3284
3317
|
size: "sm",
|
|
3285
|
-
onClick: () =>
|
|
3318
|
+
onClick: () => E.current?.click(),
|
|
3286
3319
|
children: S
|
|
3287
3320
|
})
|
|
3288
3321
|
] }) : /* @__PURE__ */ n("div", {
|
|
@@ -3291,26 +3324,26 @@ var M = {
|
|
|
3291
3324
|
/* @__PURE__ */ t("span", {
|
|
3292
3325
|
className: Ut.uploadIcon,
|
|
3293
3326
|
"aria-hidden": "true",
|
|
3294
|
-
children: /* @__PURE__ */ t(
|
|
3327
|
+
children: /* @__PURE__ */ t(q, {
|
|
3295
3328
|
name: "IconUpload",
|
|
3296
3329
|
width: 24,
|
|
3297
3330
|
height: 24
|
|
3298
3331
|
})
|
|
3299
3332
|
}),
|
|
3300
|
-
/* @__PURE__ */ t("strong", { children:
|
|
3301
|
-
!
|
|
3302
|
-
onClick: () =>
|
|
3333
|
+
/* @__PURE__ */ t("strong", { children: O ? "Отпустите файлы здесь" : x }),
|
|
3334
|
+
!O && F && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(A, {
|
|
3335
|
+
onClick: () => E.current?.click(),
|
|
3303
3336
|
children: S
|
|
3304
3337
|
})] })
|
|
3305
3338
|
]
|
|
3306
3339
|
})]
|
|
3307
3340
|
}),
|
|
3308
|
-
u && !d && /* @__PURE__ */ t(
|
|
3309
|
-
id:
|
|
3341
|
+
u && !d && /* @__PURE__ */ t(M, {
|
|
3342
|
+
id: j,
|
|
3310
3343
|
children: u
|
|
3311
3344
|
}),
|
|
3312
|
-
d && /* @__PURE__ */ t(
|
|
3313
|
-
id:
|
|
3345
|
+
d && /* @__PURE__ */ t(M, {
|
|
3346
|
+
id: N,
|
|
3314
3347
|
variant: "error",
|
|
3315
3348
|
live: !0,
|
|
3316
3349
|
children: d
|
|
@@ -3379,65 +3412,65 @@ function Qt(e) {
|
|
|
3379
3412
|
let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
|
|
3380
3413
|
return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
|
|
3381
3414
|
}
|
|
3382
|
-
function $t({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: s = !1, label: c, error: u, hint: p, className: m = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = Zt, maxRows:
|
|
3383
|
-
let
|
|
3415
|
+
function $t({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: s = !1, label: c, error: u, hint: p, className: m = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = Zt, maxRows: ee, autoResize: w = !0, ...T }) {
|
|
3416
|
+
let E = f(), D = _ ?? `ds-textarea-${g ?? E}`, O = h(null), k = p ? `${D}-hint` : void 0, A = u ? `${D}-error` : void 0, j = S && x ? `${D}-count` : void 0, N = [
|
|
3417
|
+
k,
|
|
3384
3418
|
A,
|
|
3385
|
-
j
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
let t = window.getComputedStyle(e), n = Qt(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * F + r, a = I === void 0 ? Infinity : n * I + r;
|
|
3419
|
+
j
|
|
3420
|
+
].filter(Boolean).join(" ") || void 0, P = Math.max(1, C), F = ee === void 0 ? void 0 : Math.max(P, ee), I = l(() => {
|
|
3421
|
+
let e = O.current;
|
|
3422
|
+
if (!e || !w) return;
|
|
3423
|
+
let t = window.getComputedStyle(e), n = Qt(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * P + r, a = F === void 0 ? Infinity : n * F + r;
|
|
3391
3424
|
e.style.height = "auto";
|
|
3392
3425
|
let o = Math.min(Math.max(e.scrollHeight, i), a);
|
|
3393
3426
|
e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
|
|
3394
3427
|
}, [
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3428
|
+
w,
|
|
3429
|
+
F,
|
|
3430
|
+
P
|
|
3398
3431
|
]);
|
|
3399
3432
|
d(() => {
|
|
3400
|
-
|
|
3401
|
-
}, [
|
|
3402
|
-
if (!
|
|
3403
|
-
window.addEventListener("resize",
|
|
3404
|
-
let e =
|
|
3433
|
+
I();
|
|
3434
|
+
}, [I, e]), d(() => {
|
|
3435
|
+
if (!w) return;
|
|
3436
|
+
window.addEventListener("resize", I);
|
|
3437
|
+
let e = O.current?.parentElement, t;
|
|
3405
3438
|
if (e && typeof ResizeObserver < "u") {
|
|
3406
3439
|
let n = e.getBoundingClientRect().width;
|
|
3407
3440
|
t = new ResizeObserver(([e]) => {
|
|
3408
|
-
!e || e.contentRect.width === n || (n = e.contentRect.width,
|
|
3441
|
+
!e || e.contentRect.width === n || (n = e.contentRect.width, I());
|
|
3409
3442
|
}), t.observe(e);
|
|
3410
3443
|
}
|
|
3411
3444
|
return () => {
|
|
3412
|
-
window.removeEventListener("resize",
|
|
3445
|
+
window.removeEventListener("resize", I), t?.disconnect();
|
|
3413
3446
|
};
|
|
3414
|
-
}, [
|
|
3415
|
-
let
|
|
3416
|
-
r?.(e.target.value, e),
|
|
3417
|
-
},
|
|
3418
|
-
let e =
|
|
3419
|
-
e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(),
|
|
3420
|
-
},
|
|
3447
|
+
}, [w, I]);
|
|
3448
|
+
let L = (e) => {
|
|
3449
|
+
r?.(e.target.value, e), I();
|
|
3450
|
+
}, R = () => {
|
|
3451
|
+
let e = O.current;
|
|
3452
|
+
e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), I());
|
|
3453
|
+
}, z = { "--ds-textarea-min-rows": P };
|
|
3421
3454
|
return /* @__PURE__ */ n("div", {
|
|
3422
3455
|
className: `${Xt.wrapper} ${m}`,
|
|
3423
3456
|
children: [
|
|
3424
|
-
c && /* @__PURE__ */ t(
|
|
3425
|
-
htmlFor:
|
|
3457
|
+
c && /* @__PURE__ */ t(te, {
|
|
3458
|
+
htmlFor: D,
|
|
3426
3459
|
required: b,
|
|
3427
3460
|
disabled: a,
|
|
3428
3461
|
children: c
|
|
3429
3462
|
}),
|
|
3430
3463
|
a && s ? /* @__PURE__ */ t("div", {
|
|
3431
|
-
id:
|
|
3464
|
+
id: D,
|
|
3432
3465
|
className: `${Xt.disabledText} ${Xt[v]}`,
|
|
3433
|
-
style:
|
|
3434
|
-
"aria-describedby":
|
|
3466
|
+
style: z,
|
|
3467
|
+
"aria-describedby": N,
|
|
3435
3468
|
children: e || i
|
|
3436
3469
|
}) : /* @__PURE__ */ n("div", {
|
|
3437
3470
|
className: Xt.control,
|
|
3438
3471
|
children: [/* @__PURE__ */ t("textarea", {
|
|
3439
|
-
ref:
|
|
3440
|
-
id:
|
|
3472
|
+
ref: O,
|
|
3473
|
+
id: D,
|
|
3441
3474
|
name: g,
|
|
3442
3475
|
value: e,
|
|
3443
3476
|
placeholder: i,
|
|
@@ -3445,39 +3478,39 @@ function $t({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3445
3478
|
readOnly: o,
|
|
3446
3479
|
required: b,
|
|
3447
3480
|
maxLength: x,
|
|
3448
|
-
rows:
|
|
3449
|
-
style:
|
|
3481
|
+
rows: P,
|
|
3482
|
+
style: z,
|
|
3450
3483
|
"aria-invalid": !!u,
|
|
3451
|
-
"aria-describedby":
|
|
3452
|
-
className: `${Xt.textarea} ${Xt[v]} ${
|
|
3453
|
-
onChange:
|
|
3454
|
-
...
|
|
3484
|
+
"aria-describedby": N,
|
|
3485
|
+
className: `${Xt.textarea} ${Xt[v]} ${w ? Xt.autoResize : Xt.manualResize} ${u ? Xt.textareaError : ""}`,
|
|
3486
|
+
onChange: L,
|
|
3487
|
+
...T
|
|
3455
3488
|
}), y && e && !a && !o && /* @__PURE__ */ t("button", {
|
|
3456
3489
|
type: "button",
|
|
3457
3490
|
className: Xt.clearAction,
|
|
3458
3491
|
"aria-label": "Очистить поле",
|
|
3459
|
-
onClick:
|
|
3460
|
-
children: /* @__PURE__ */ t(
|
|
3492
|
+
onClick: R,
|
|
3493
|
+
children: /* @__PURE__ */ t(q, {
|
|
3461
3494
|
name: "IconCross",
|
|
3462
3495
|
width: 20,
|
|
3463
3496
|
height: 20
|
|
3464
3497
|
})
|
|
3465
3498
|
})]
|
|
3466
3499
|
}),
|
|
3467
|
-
(p || u ||
|
|
3500
|
+
(p || u || j) && /* @__PURE__ */ n("div", {
|
|
3468
3501
|
className: Xt.messages,
|
|
3469
3502
|
children: [
|
|
3470
|
-
p && !u && /* @__PURE__ */ t(
|
|
3471
|
-
id:
|
|
3503
|
+
p && !u && /* @__PURE__ */ t(M, {
|
|
3504
|
+
id: k,
|
|
3472
3505
|
children: p
|
|
3473
3506
|
}),
|
|
3474
|
-
u && /* @__PURE__ */ t(
|
|
3475
|
-
id:
|
|
3507
|
+
u && /* @__PURE__ */ t(M, {
|
|
3508
|
+
id: A,
|
|
3476
3509
|
variant: "error",
|
|
3477
3510
|
children: u
|
|
3478
3511
|
}),
|
|
3479
|
-
|
|
3480
|
-
id:
|
|
3512
|
+
j && /* @__PURE__ */ n("span", {
|
|
3513
|
+
id: j,
|
|
3481
3514
|
className: Xt.counter,
|
|
3482
3515
|
children: [
|
|
3483
3516
|
e.length,
|
|
@@ -3565,24 +3598,24 @@ function pn(e) {
|
|
|
3565
3598
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
|
|
3566
3599
|
}
|
|
3567
3600
|
var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
|
|
3568
|
-
let l = u(fn), p = r ?? l.title, m = i ?? l.description, _ = f(), v = f(), y = h(null), b = h(null), x = h(null), [S, C] = g(0), [
|
|
3601
|
+
let l = u(fn), p = r ?? l.title, m = i ?? l.description, _ = f(), v = f(), y = h(null), b = h(null), x = h(null), [S, C] = g(0), [ee, w] = g(!1), T = tn((e) => e.closeModal), E = l.requestClose ?? (() => T(a)), D = p != null, O = m != null;
|
|
3569
3602
|
d(() => {
|
|
3570
3603
|
let e = document.activeElement, t = y.current;
|
|
3571
3604
|
return (t?.querySelector(dn) ?? t)?.focus(), () => e?.focus();
|
|
3572
3605
|
}, []);
|
|
3573
|
-
let
|
|
3574
|
-
e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null,
|
|
3606
|
+
let k = (e) => {
|
|
3607
|
+
e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, w(!1), C(0);
|
|
3575
3608
|
};
|
|
3576
3609
|
return /* @__PURE__ */ n("div", {
|
|
3577
3610
|
ref: y,
|
|
3578
3611
|
className: `${un.panel} ${s}`,
|
|
3579
3612
|
"data-closing": l.closing || void 0,
|
|
3580
|
-
"data-dragging":
|
|
3613
|
+
"data-dragging": ee || void 0,
|
|
3581
3614
|
style: { "--ds-modal-drag-offset": `${S}px` },
|
|
3582
3615
|
role: c,
|
|
3583
3616
|
"aria-modal": "true",
|
|
3584
|
-
"aria-labelledby":
|
|
3585
|
-
"aria-describedby":
|
|
3617
|
+
"aria-labelledby": D ? _ : void 0,
|
|
3618
|
+
"aria-describedby": O ? v : void 0,
|
|
3586
3619
|
tabIndex: -1,
|
|
3587
3620
|
onKeyDown: pn,
|
|
3588
3621
|
children: [
|
|
@@ -3596,36 +3629,36 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3596
3629
|
onPointerMove: (e) => {
|
|
3597
3630
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3598
3631
|
let t = cn(b.current, e.clientX, e.clientY);
|
|
3599
|
-
b.current.intent === "vertical" && (e.preventDefault(),
|
|
3632
|
+
b.current.intent === "vertical" && (e.preventDefault(), w(!0), C(t));
|
|
3600
3633
|
},
|
|
3601
3634
|
onPointerUp: (e) => {
|
|
3602
3635
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3603
3636
|
let t = ln(b.current, e.clientY, e.timeStamp);
|
|
3604
|
-
|
|
3637
|
+
k(e.currentTarget), t && E();
|
|
3605
3638
|
},
|
|
3606
|
-
onPointerCancel: (e) =>
|
|
3639
|
+
onPointerCancel: (e) => k(e.currentTarget),
|
|
3607
3640
|
children: /* @__PURE__ */ t("span", {})
|
|
3608
3641
|
}),
|
|
3609
|
-
(
|
|
3642
|
+
(D || o) && /* @__PURE__ */ n("header", {
|
|
3610
3643
|
className: un.header,
|
|
3611
|
-
children: [
|
|
3644
|
+
children: [D && /* @__PURE__ */ t("h2", {
|
|
3612
3645
|
id: _,
|
|
3613
3646
|
className: un.title,
|
|
3614
3647
|
children: p
|
|
3615
|
-
}), /* @__PURE__ */ t(
|
|
3648
|
+
}), /* @__PURE__ */ t(A, {
|
|
3616
3649
|
className: un.close,
|
|
3617
3650
|
variant: "empty",
|
|
3618
3651
|
size: "sm",
|
|
3619
3652
|
"aria-label": o,
|
|
3620
|
-
onClick:
|
|
3621
|
-
children: /* @__PURE__ */ t(
|
|
3653
|
+
onClick: E,
|
|
3654
|
+
children: /* @__PURE__ */ t(q, {
|
|
3622
3655
|
name: "IconCross",
|
|
3623
3656
|
width: 24,
|
|
3624
3657
|
height: 24
|
|
3625
3658
|
})
|
|
3626
3659
|
})]
|
|
3627
3660
|
}),
|
|
3628
|
-
|
|
3661
|
+
O && /* @__PURE__ */ t("p", {
|
|
3629
3662
|
id: v,
|
|
3630
3663
|
className: un.description,
|
|
3631
3664
|
children: m
|
|
@@ -3722,11 +3755,11 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3722
3755
|
children: a
|
|
3723
3756
|
}), /* @__PURE__ */ n("div", {
|
|
3724
3757
|
className: vn.actions,
|
|
3725
|
-
children: [/* @__PURE__ */ t(
|
|
3758
|
+
children: [/* @__PURE__ */ t(A, {
|
|
3726
3759
|
variant: "outline",
|
|
3727
3760
|
onClick: () => u(!1),
|
|
3728
3761
|
children: s
|
|
3729
|
-
}), /* @__PURE__ */ t(
|
|
3762
|
+
}), /* @__PURE__ */ t(A, {
|
|
3730
3763
|
variant: c === "danger" ? "destructive" : "primary",
|
|
3731
3764
|
onClick: () => u(!0),
|
|
3732
3765
|
children: o
|
|
@@ -3742,7 +3775,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3742
3775
|
children: a
|
|
3743
3776
|
}), /* @__PURE__ */ t("div", {
|
|
3744
3777
|
className: vn.actions,
|
|
3745
|
-
children: /* @__PURE__ */ t(
|
|
3778
|
+
children: /* @__PURE__ */ t(A, {
|
|
3746
3779
|
onClick: r,
|
|
3747
3780
|
children: o
|
|
3748
3781
|
})
|
|
@@ -3818,7 +3851,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3818
3851
|
let n = t[0], r = t.at(-1);
|
|
3819
3852
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
3820
3853
|
}, Pn = () => u(Mn), Fn = ({ open: e, onCloseRequest: r, children: i, title: a, description: o, headerActions: s, footer: c, placement: l = "right", size: u = "md", closeOnEscape: p = !0, closeOnBackdrop: m = !0, preventClose: g = !1, closeLabel: v = "Закрыть", initialFocusRef: y, returnFocusRef: b, className: x = "" }) => {
|
|
3821
|
-
let S = h(null), C = f(),
|
|
3854
|
+
let S = h(null), C = f(), ee = f(), w = (e) => {
|
|
3822
3855
|
g || r(e);
|
|
3823
3856
|
};
|
|
3824
3857
|
return d(() => {
|
|
@@ -3845,17 +3878,17 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3845
3878
|
children: /* @__PURE__ */ t("div", {
|
|
3846
3879
|
className: An.backdrop,
|
|
3847
3880
|
onMouseDown: (e) => {
|
|
3848
|
-
e.target === e.currentTarget && m &&
|
|
3881
|
+
e.target === e.currentTarget && m && w("backdrop");
|
|
3849
3882
|
},
|
|
3850
3883
|
children: /* @__PURE__ */ t(Mn.Provider, {
|
|
3851
|
-
value: { requestClose:
|
|
3884
|
+
value: { requestClose: w },
|
|
3852
3885
|
children: /* @__PURE__ */ n("section", {
|
|
3853
3886
|
ref: S,
|
|
3854
3887
|
className: `${An.panel} ${An[l]} ${An[u]} ${x}`,
|
|
3855
3888
|
role: "dialog",
|
|
3856
3889
|
"aria-modal": "true",
|
|
3857
3890
|
"aria-labelledby": a ? C : void 0,
|
|
3858
|
-
"aria-describedby": o ?
|
|
3891
|
+
"aria-describedby": o ? ee : void 0,
|
|
3859
3892
|
tabIndex: -1,
|
|
3860
3893
|
onKeyDown: Nn,
|
|
3861
3894
|
children: [
|
|
@@ -3868,7 +3901,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3868
3901
|
id: C,
|
|
3869
3902
|
children: a
|
|
3870
3903
|
}), o && /* @__PURE__ */ t("p", {
|
|
3871
|
-
id:
|
|
3904
|
+
id: ee,
|
|
3872
3905
|
children: o
|
|
3873
3906
|
})]
|
|
3874
3907
|
}),
|
|
@@ -3876,13 +3909,13 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3876
3909
|
className: An.headerActions,
|
|
3877
3910
|
children: s
|
|
3878
3911
|
}),
|
|
3879
|
-
/* @__PURE__ */ t(
|
|
3912
|
+
/* @__PURE__ */ t(A, {
|
|
3880
3913
|
variant: "empty",
|
|
3881
3914
|
size: "sm",
|
|
3882
3915
|
"aria-label": v,
|
|
3883
3916
|
disabled: g,
|
|
3884
|
-
onClick: () =>
|
|
3885
|
-
children: /* @__PURE__ */ t(
|
|
3917
|
+
onClick: () => w("close-button"),
|
|
3918
|
+
children: /* @__PURE__ */ t(q, {
|
|
3886
3919
|
name: "IconCross",
|
|
3887
3920
|
width: 20,
|
|
3888
3921
|
height: 20
|
|
@@ -4002,7 +4035,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4002
4035
|
/* @__PURE__ */ t("div", {
|
|
4003
4036
|
className: Vn.icon,
|
|
4004
4037
|
"aria-hidden": "true",
|
|
4005
|
-
children: /* @__PURE__ */ t(
|
|
4038
|
+
children: /* @__PURE__ */ t(q, {
|
|
4006
4039
|
name: Hn[e.variant],
|
|
4007
4040
|
color: "var(--ds-toast-accent)",
|
|
4008
4041
|
width: 20,
|
|
@@ -4020,7 +4053,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4020
4053
|
className: Vn.message,
|
|
4021
4054
|
children: e.message
|
|
4022
4055
|
}),
|
|
4023
|
-
e.action && /* @__PURE__ */ t(
|
|
4056
|
+
e.action && /* @__PURE__ */ t(A, {
|
|
4024
4057
|
variant: "empty",
|
|
4025
4058
|
size: "sm",
|
|
4026
4059
|
onClick: () => {
|
|
@@ -4030,12 +4063,12 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4030
4063
|
})
|
|
4031
4064
|
]
|
|
4032
4065
|
}),
|
|
4033
|
-
e.closable && /* @__PURE__ */ t(
|
|
4066
|
+
e.closable && /* @__PURE__ */ t(A, {
|
|
4034
4067
|
variant: "empty",
|
|
4035
4068
|
size: "sm",
|
|
4036
4069
|
"aria-label": "Закрыть уведомление",
|
|
4037
4070
|
onClick: () => r(e.id),
|
|
4038
|
-
children: /* @__PURE__ */ t(
|
|
4071
|
+
children: /* @__PURE__ */ t(q, {
|
|
4039
4072
|
name: "IconCross",
|
|
4040
4073
|
width: 20,
|
|
4041
4074
|
height: 20
|
|
@@ -4263,92 +4296,92 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4263
4296
|
1.5,
|
|
4264
4297
|
2
|
|
4265
4298
|
], ir = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: s = "contain", loading: c = !1, error: u, fallback: f, className: p = "", controls: m = !0, playsInline: _ = !0, ...v }) => {
|
|
4266
|
-
let y = h(null), b = h(null), x = h(null), S = h(void 0), [C,
|
|
4299
|
+
let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, ee] = g(!1), [w, T] = g(r.length > 0), [E, D] = g(!1), [k, j] = g(!1), [te, M] = g(!1), [N, P] = g(0), [F, I] = g(0), [L, R] = g(0), [z, B] = g(1), [V, H] = g(!!v.muted), [U, ne] = g(1), [re, ie] = g(!!v.loop), [ae, oe] = g(-1), [se, ce] = g(!1), [le, W] = g(!0), [ue, de] = g(!1), [fe, G] = g(!1), pe = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), me = i.map((e, t) => ({
|
|
4267
4300
|
track: e,
|
|
4268
4301
|
index: t
|
|
4269
|
-
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"),
|
|
4270
|
-
|
|
4271
|
-
}, [
|
|
4302
|
+
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), he = u ?? (C ? "Не удалось воспроизвести видео" : void 0), ge = c || w && !he && r.length > 0, _e = !ge && !he && r.length === 0, ve = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, ye = l(() => {
|
|
4303
|
+
W(!0), window.clearTimeout(S.current), k && !se && (S.current = window.setTimeout(() => W(!1), er));
|
|
4304
|
+
}, [k, se]);
|
|
4272
4305
|
d(() => {
|
|
4273
|
-
|
|
4274
|
-
}, [
|
|
4275
|
-
let e = () =>
|
|
4306
|
+
ee(!1), T(r.length > 0), D(!1), j(!1), M(!1), P(0), I(0), R(0);
|
|
4307
|
+
}, [pe, r.length]), d(() => (ye(), () => window.clearTimeout(S.current)), [ye]), d(() => {
|
|
4308
|
+
let e = () => de(document.fullscreenElement === b.current), t = () => G(document.pictureInPictureElement === x.current);
|
|
4276
4309
|
return document.addEventListener("fullscreenchange", e), document.addEventListener("enterpictureinpicture", t), document.addEventListener("leavepictureinpicture", t), () => {
|
|
4277
4310
|
document.removeEventListener("fullscreenchange", e), document.removeEventListener("enterpictureinpicture", t), document.removeEventListener("leavepictureinpicture", t);
|
|
4278
4311
|
};
|
|
4279
4312
|
}, []), d(() => {
|
|
4280
|
-
if (!
|
|
4313
|
+
if (!se) return;
|
|
4281
4314
|
let e = (e) => {
|
|
4282
|
-
y.current?.contains(e.target) ||
|
|
4315
|
+
y.current?.contains(e.target) || ce(!1);
|
|
4283
4316
|
};
|
|
4284
4317
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
4285
|
-
}, [
|
|
4286
|
-
let
|
|
4318
|
+
}, [se]);
|
|
4319
|
+
let be = async () => {
|
|
4287
4320
|
let e = x.current;
|
|
4288
|
-
if (!(!e ||
|
|
4321
|
+
if (!(!e || he || ge)) {
|
|
4289
4322
|
if (e.paused || e.ended) {
|
|
4290
4323
|
e.ended && (e.currentTime = 0);
|
|
4291
4324
|
try {
|
|
4292
4325
|
await e.play();
|
|
4293
4326
|
} catch {
|
|
4294
|
-
|
|
4327
|
+
ee(!0);
|
|
4295
4328
|
}
|
|
4296
4329
|
} else e.pause();
|
|
4297
4330
|
}
|
|
4298
|
-
},
|
|
4331
|
+
}, K = () => {
|
|
4299
4332
|
let e = x.current;
|
|
4300
4333
|
e && (e.muted = !e.muted);
|
|
4301
|
-
},
|
|
4334
|
+
}, xe = (e) => {
|
|
4302
4335
|
let t = x.current;
|
|
4303
4336
|
t && (t.volume = Math.min(1, Math.max(0, e)), t.muted = t.volume === 0);
|
|
4304
|
-
},
|
|
4337
|
+
}, Se = (e) => {
|
|
4305
4338
|
let t = x.current;
|
|
4306
|
-
!t || !
|
|
4307
|
-
},
|
|
4339
|
+
!t || !F || (t.currentTime = Math.min(F, Math.max(0, e)), P(t.currentTime));
|
|
4340
|
+
}, Ce = async () => {
|
|
4308
4341
|
if (b.current) try {
|
|
4309
4342
|
document.fullscreenElement ? await document.exitFullscreen() : await b.current.requestFullscreen();
|
|
4310
4343
|
} catch {
|
|
4311
|
-
|
|
4344
|
+
de(!1);
|
|
4312
4345
|
}
|
|
4313
|
-
},
|
|
4346
|
+
}, J = async () => {
|
|
4314
4347
|
let e = x.current;
|
|
4315
|
-
if (!(!e || !
|
|
4348
|
+
if (!(!e || !ve)) try {
|
|
4316
4349
|
document.pictureInPictureElement ? await document.exitPictureInPicture() : await e.requestPictureInPicture();
|
|
4317
4350
|
} catch {
|
|
4318
|
-
|
|
4351
|
+
G(!1);
|
|
4319
4352
|
}
|
|
4320
|
-
},
|
|
4353
|
+
}, we = (e) => {
|
|
4321
4354
|
let t = x.current;
|
|
4322
4355
|
t && (Array.from(t.textTracks).forEach((t, n) => {
|
|
4323
4356
|
t.mode = n === e ? "showing" : "disabled";
|
|
4324
|
-
}),
|
|
4325
|
-
},
|
|
4357
|
+
}), oe(e));
|
|
4358
|
+
}, Te = (e) => {
|
|
4326
4359
|
let t = e.target;
|
|
4327
4360
|
if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
|
|
4328
4361
|
let n = e.key.toLowerCase();
|
|
4329
|
-
n === " " || n === "k" ? (e.preventDefault(),
|
|
4330
|
-
},
|
|
4362
|
+
n === " " || n === "k" ? (e.preventDefault(), be()) : n === "m" ? (e.preventDefault(), K()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" && me.length ? (e.preventDefault(), we(ae === -1 ? me[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Se(N + (e.key === "ArrowRight" ? tr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), xe(z + (e.key === "ArrowUp" ? nr : -.05))) : e.key === "Escape" && ce(!1), ye();
|
|
4363
|
+
}, Y = () => {
|
|
4331
4364
|
let e = x.current;
|
|
4332
|
-
|
|
4333
|
-
},
|
|
4334
|
-
"--video-progress": `${
|
|
4335
|
-
"--video-buffered": `${
|
|
4365
|
+
ee(!1), T(!0), e?.load();
|
|
4366
|
+
}, X = {
|
|
4367
|
+
"--video-progress": `${F ? N / F * 100 : 0}%`,
|
|
4368
|
+
"--video-buffered": `${L * 100}%`
|
|
4336
4369
|
};
|
|
4337
4370
|
return /* @__PURE__ */ n("figure", {
|
|
4338
4371
|
ref: y,
|
|
4339
4372
|
className: `${$.root} ${p}`,
|
|
4340
|
-
onKeyDown:
|
|
4373
|
+
onKeyDown: Te,
|
|
4341
4374
|
children: [/* @__PURE__ */ n("div", {
|
|
4342
4375
|
ref: b,
|
|
4343
|
-
className: `${$.frame} ${
|
|
4376
|
+
className: `${$.frame} ${ue ? $.fullscreen : ""}`,
|
|
4344
4377
|
style: { aspectRatio: o },
|
|
4345
|
-
"aria-busy":
|
|
4378
|
+
"aria-busy": ge || void 0,
|
|
4346
4379
|
tabIndex: m && r.length ? 0 : void 0,
|
|
4347
|
-
onPointerMove:
|
|
4348
|
-
onPointerDown:
|
|
4349
|
-
onFocusCapture:
|
|
4380
|
+
onPointerMove: ye,
|
|
4381
|
+
onPointerDown: ye,
|
|
4382
|
+
onFocusCapture: ye,
|
|
4350
4383
|
onMouseLeave: () => {
|
|
4351
|
-
|
|
4384
|
+
k && !se && W(!1);
|
|
4352
4385
|
},
|
|
4353
4386
|
children: [
|
|
4354
4387
|
r.length > 0 && /* @__PURE__ */ n("video", {
|
|
@@ -4361,62 +4394,62 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4361
4394
|
className: $.video,
|
|
4362
4395
|
style: { objectFit: s },
|
|
4363
4396
|
onClick: (e) => {
|
|
4364
|
-
v.onClick?.(e),
|
|
4397
|
+
v.onClick?.(e), be();
|
|
4365
4398
|
},
|
|
4366
4399
|
onDoubleClick: (e) => {
|
|
4367
|
-
v.onDoubleClick?.(e),
|
|
4400
|
+
v.onDoubleClick?.(e), Ce();
|
|
4368
4401
|
},
|
|
4369
4402
|
onLoadStart: (e) => {
|
|
4370
|
-
|
|
4403
|
+
T(!0), v.onLoadStart?.(e);
|
|
4371
4404
|
},
|
|
4372
4405
|
onLoadedMetadata: (e) => {
|
|
4373
|
-
|
|
4374
|
-
let t =
|
|
4375
|
-
|
|
4406
|
+
I(e.currentTarget.duration || 0);
|
|
4407
|
+
let t = me.find(({ track: e }) => e.default);
|
|
4408
|
+
we(t?.index ?? -1), v.onLoadedMetadata?.(e);
|
|
4376
4409
|
},
|
|
4377
4410
|
onDurationChange: (e) => {
|
|
4378
|
-
|
|
4411
|
+
I(e.currentTarget.duration || 0), v.onDurationChange?.(e);
|
|
4379
4412
|
},
|
|
4380
4413
|
onTimeUpdate: (e) => {
|
|
4381
|
-
|
|
4414
|
+
P(e.currentTarget.currentTime), v.onTimeUpdate?.(e);
|
|
4382
4415
|
},
|
|
4383
4416
|
onProgress: (e) => {
|
|
4384
4417
|
let t = e.currentTarget;
|
|
4385
|
-
t.duration && t.buffered.length &&
|
|
4418
|
+
t.duration && t.buffered.length && R(t.buffered.end(t.buffered.length - 1) / t.duration), v.onProgress?.(e);
|
|
4386
4419
|
},
|
|
4387
4420
|
onLoadedData: (e) => {
|
|
4388
|
-
|
|
4421
|
+
T(!1), D(!1), v.onLoadedData?.(e);
|
|
4389
4422
|
},
|
|
4390
4423
|
onCanPlay: (e) => {
|
|
4391
|
-
|
|
4424
|
+
T(!1), D(!1), v.onCanPlay?.(e);
|
|
4392
4425
|
},
|
|
4393
4426
|
onWaiting: (e) => {
|
|
4394
|
-
|
|
4427
|
+
D(!0), v.onWaiting?.(e);
|
|
4395
4428
|
},
|
|
4396
4429
|
onPlaying: (e) => {
|
|
4397
|
-
|
|
4430
|
+
j(!0), M(!1), D(!1), v.onPlaying?.(e);
|
|
4398
4431
|
},
|
|
4399
4432
|
onPlay: (e) => {
|
|
4400
|
-
|
|
4433
|
+
j(!0), v.onPlay?.(e);
|
|
4401
4434
|
},
|
|
4402
4435
|
onPause: (e) => {
|
|
4403
|
-
|
|
4436
|
+
j(!1), v.onPause?.(e);
|
|
4404
4437
|
},
|
|
4405
4438
|
onEnded: (e) => {
|
|
4406
|
-
|
|
4439
|
+
j(!1), M(!0), W(!0), v.onEnded?.(e);
|
|
4407
4440
|
},
|
|
4408
4441
|
onVolumeChange: (e) => {
|
|
4409
|
-
|
|
4442
|
+
B(e.currentTarget.volume), H(e.currentTarget.muted), v.onVolumeChange?.(e);
|
|
4410
4443
|
},
|
|
4411
4444
|
onRateChange: (e) => {
|
|
4412
4445
|
ne(e.currentTarget.playbackRate), v.onRateChange?.(e);
|
|
4413
4446
|
},
|
|
4414
4447
|
onError: (e) => {
|
|
4415
|
-
|
|
4448
|
+
T(!1), D(!1), ee(!0), v.onError?.(e);
|
|
4416
4449
|
},
|
|
4417
4450
|
children: [r.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), i.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
|
|
4418
4451
|
}),
|
|
4419
|
-
|
|
4452
|
+
ge && /* @__PURE__ */ n("div", {
|
|
4420
4453
|
className: $.overlay,
|
|
4421
4454
|
role: "status",
|
|
4422
4455
|
"aria-live": "polite",
|
|
@@ -4429,17 +4462,17 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4429
4462
|
})
|
|
4430
4463
|
}), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
|
|
4431
4464
|
}),
|
|
4432
|
-
!
|
|
4465
|
+
!ge && E && !he && /* @__PURE__ */ t("div", {
|
|
4433
4466
|
className: $.buffering,
|
|
4434
4467
|
role: "status",
|
|
4435
4468
|
"aria-label": "Буферизация видео",
|
|
4436
|
-
children: /* @__PURE__ */ t(
|
|
4469
|
+
children: /* @__PURE__ */ t(O, { variant: "primary" })
|
|
4437
4470
|
}),
|
|
4438
|
-
|
|
4471
|
+
_e && /* @__PURE__ */ n("div", {
|
|
4439
4472
|
className: `${$.state} ${$.empty}`,
|
|
4440
4473
|
role: "status",
|
|
4441
4474
|
children: [
|
|
4442
|
-
/* @__PURE__ */ t(
|
|
4475
|
+
/* @__PURE__ */ t(q, {
|
|
4443
4476
|
name: "IconInfoCircle",
|
|
4444
4477
|
className: $.stateIcon,
|
|
4445
4478
|
width: 40,
|
|
@@ -4449,40 +4482,40 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4449
4482
|
f ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
|
|
4450
4483
|
]
|
|
4451
4484
|
}),
|
|
4452
|
-
!
|
|
4485
|
+
!ge && he && /* @__PURE__ */ n("div", {
|
|
4453
4486
|
className: `${$.state} ${$.error}`,
|
|
4454
4487
|
role: "alert",
|
|
4455
4488
|
children: [
|
|
4456
|
-
/* @__PURE__ */ t(
|
|
4489
|
+
/* @__PURE__ */ t(q, {
|
|
4457
4490
|
name: "IconWarning",
|
|
4458
4491
|
className: $.stateIcon,
|
|
4459
4492
|
width: 40,
|
|
4460
4493
|
height: 40
|
|
4461
4494
|
}),
|
|
4462
|
-
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children:
|
|
4463
|
-
r.length > 0 && /* @__PURE__ */ t(
|
|
4495
|
+
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: he })] }),
|
|
4496
|
+
r.length > 0 && /* @__PURE__ */ t(A, {
|
|
4464
4497
|
size: "sm",
|
|
4465
4498
|
variant: "secondary",
|
|
4466
|
-
onClick:
|
|
4499
|
+
onClick: Y,
|
|
4467
4500
|
children: "Повторить"
|
|
4468
4501
|
})
|
|
4469
4502
|
]
|
|
4470
4503
|
}),
|
|
4471
|
-
!
|
|
4504
|
+
!ge && !he && te && /* @__PURE__ */ t("button", {
|
|
4472
4505
|
type: "button",
|
|
4473
4506
|
className: $.replay,
|
|
4474
4507
|
"aria-label": "Воспроизвести заново",
|
|
4475
|
-
onClick: () => void
|
|
4476
|
-
children: /* @__PURE__ */ t(
|
|
4508
|
+
onClick: () => void be(),
|
|
4509
|
+
children: /* @__PURE__ */ t(q, {
|
|
4477
4510
|
name: "IconReplay",
|
|
4478
4511
|
width: 28,
|
|
4479
4512
|
height: 28
|
|
4480
4513
|
})
|
|
4481
4514
|
}),
|
|
4482
|
-
m && r.length > 0 && !
|
|
4483
|
-
className: `${$.controlsLayer} ${
|
|
4515
|
+
m && r.length > 0 && !ge && !he && /* @__PURE__ */ n("div", {
|
|
4516
|
+
className: `${$.controlsLayer} ${le || !k ? $.controlsVisible : ""}`,
|
|
4484
4517
|
onClick: (e) => e.stopPropagation(),
|
|
4485
|
-
children: [
|
|
4518
|
+
children: [se && /* @__PURE__ */ n("div", {
|
|
4486
4519
|
className: $.settings,
|
|
4487
4520
|
role: "dialog",
|
|
4488
4521
|
"aria-label": "Настройки видео",
|
|
@@ -4498,13 +4531,13 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4498
4531
|
children: [e, "×"]
|
|
4499
4532
|
}, e))
|
|
4500
4533
|
})] }),
|
|
4501
|
-
|
|
4502
|
-
value:
|
|
4503
|
-
onChange: (e) =>
|
|
4534
|
+
me.length > 0 && /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Субтитры" }), /* @__PURE__ */ n("select", {
|
|
4535
|
+
value: ae,
|
|
4536
|
+
onChange: (e) => we(Number(e.target.value)),
|
|
4504
4537
|
children: [/* @__PURE__ */ t("option", {
|
|
4505
4538
|
value: -1,
|
|
4506
4539
|
children: "Выключены"
|
|
4507
|
-
}),
|
|
4540
|
+
}), me.map(({ track: e, index: n }) => /* @__PURE__ */ t("option", {
|
|
4508
4541
|
value: n,
|
|
4509
4542
|
children: e.label
|
|
4510
4543
|
}, `${e.srcLang}-${e.label}`))]
|
|
@@ -4513,17 +4546,17 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4513
4546
|
type: "button",
|
|
4514
4547
|
className: $.settingsAction,
|
|
4515
4548
|
"aria-pressed": re,
|
|
4516
|
-
onClick: () =>
|
|
4549
|
+
onClick: () => ie((e) => !e),
|
|
4517
4550
|
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: re ? "Вкл." : "Выкл." })]
|
|
4518
4551
|
}),
|
|
4519
|
-
|
|
4552
|
+
ve && /* @__PURE__ */ t("button", {
|
|
4520
4553
|
type: "button",
|
|
4521
4554
|
className: $.settingsAction,
|
|
4522
|
-
"aria-pressed":
|
|
4523
|
-
onClick: () => void
|
|
4555
|
+
"aria-pressed": fe,
|
|
4556
|
+
onClick: () => void J(),
|
|
4524
4557
|
children: /* @__PURE__ */ n("span", {
|
|
4525
4558
|
className: $.settingsActionLabel,
|
|
4526
|
-
children: [/* @__PURE__ */ t(
|
|
4559
|
+
children: [/* @__PURE__ */ t(q, {
|
|
4527
4560
|
name: "IconPictureInPicture",
|
|
4528
4561
|
width: 18,
|
|
4529
4562
|
height: 18
|
|
@@ -4539,11 +4572,11 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4539
4572
|
children: /* @__PURE__ */ t("button", {
|
|
4540
4573
|
type: "button",
|
|
4541
4574
|
className: `${$.controlButton} ${$.playButton}`,
|
|
4542
|
-
"aria-label":
|
|
4543
|
-
title:
|
|
4544
|
-
onClick: () => void
|
|
4545
|
-
children: /* @__PURE__ */ t(
|
|
4546
|
-
name:
|
|
4575
|
+
"aria-label": k ? "Пауза" : "Воспроизвести",
|
|
4576
|
+
title: k ? "Пауза (K)" : "Воспроизвести (K)",
|
|
4577
|
+
onClick: () => void be(),
|
|
4578
|
+
children: /* @__PURE__ */ t(q, {
|
|
4579
|
+
name: k ? "IconPause" : "IconPlay",
|
|
4547
4580
|
width: 24,
|
|
4548
4581
|
height: 24
|
|
4549
4582
|
})
|
|
@@ -4557,9 +4590,9 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4557
4590
|
"aria-label": V ? "Включить звук" : "Выключить звук",
|
|
4558
4591
|
"aria-pressed": V,
|
|
4559
4592
|
title: "Звук (M)",
|
|
4560
|
-
onClick:
|
|
4561
|
-
children: /* @__PURE__ */ t(
|
|
4562
|
-
name: V ||
|
|
4593
|
+
onClick: K,
|
|
4594
|
+
children: /* @__PURE__ */ t(q, {
|
|
4595
|
+
name: V || z === 0 ? "IconVolumeMuted" : "IconVolume",
|
|
4563
4596
|
width: 22,
|
|
4564
4597
|
height: 22
|
|
4565
4598
|
})
|
|
@@ -4569,10 +4602,10 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4569
4602
|
min: 0,
|
|
4570
4603
|
max: 1,
|
|
4571
4604
|
step: .05,
|
|
4572
|
-
value: V ? 0 :
|
|
4605
|
+
value: V ? 0 : z,
|
|
4573
4606
|
"aria-label": "Громкость",
|
|
4574
|
-
"aria-valuetext": `${Math.round((V ? 0 :
|
|
4575
|
-
onChange: (e) =>
|
|
4607
|
+
"aria-valuetext": `${Math.round((V ? 0 : z) * 100)}%`,
|
|
4608
|
+
onChange: (e) => xe(Number(e.target.value))
|
|
4576
4609
|
})]
|
|
4577
4610
|
}),
|
|
4578
4611
|
/* @__PURE__ */ n("div", {
|
|
@@ -4580,23 +4613,23 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4580
4613
|
children: [
|
|
4581
4614
|
/* @__PURE__ */ t("span", {
|
|
4582
4615
|
className: $.time,
|
|
4583
|
-
children: $n(
|
|
4616
|
+
children: $n(N)
|
|
4584
4617
|
}),
|
|
4585
4618
|
/* @__PURE__ */ t("input", {
|
|
4586
4619
|
className: $.timeline,
|
|
4587
|
-
style:
|
|
4620
|
+
style: X,
|
|
4588
4621
|
type: "range",
|
|
4589
4622
|
min: 0,
|
|
4590
|
-
max:
|
|
4623
|
+
max: F || 0,
|
|
4591
4624
|
step: .01,
|
|
4592
|
-
value: Math.min(
|
|
4625
|
+
value: Math.min(N, F || 0),
|
|
4593
4626
|
"aria-label": "Позиция воспроизведения",
|
|
4594
|
-
"aria-valuetext": `${$n(
|
|
4595
|
-
onChange: (e) =>
|
|
4627
|
+
"aria-valuetext": `${$n(N)} из ${$n(F)}`,
|
|
4628
|
+
onChange: (e) => Se(Number(e.target.value))
|
|
4596
4629
|
}),
|
|
4597
4630
|
/* @__PURE__ */ t("span", {
|
|
4598
4631
|
className: $.time,
|
|
4599
|
-
children: $n(
|
|
4632
|
+
children: $n(F)
|
|
4600
4633
|
})
|
|
4601
4634
|
]
|
|
4602
4635
|
}),
|
|
@@ -4606,10 +4639,10 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4606
4639
|
type: "button",
|
|
4607
4640
|
className: $.controlButton,
|
|
4608
4641
|
"aria-label": "Настройки",
|
|
4609
|
-
"aria-expanded":
|
|
4642
|
+
"aria-expanded": se,
|
|
4610
4643
|
title: "Настройки",
|
|
4611
|
-
onClick: () =>
|
|
4612
|
-
children: /* @__PURE__ */ t(
|
|
4644
|
+
onClick: () => ce((e) => !e),
|
|
4645
|
+
children: /* @__PURE__ */ t(q, {
|
|
4613
4646
|
name: "IconSettings",
|
|
4614
4647
|
width: 22,
|
|
4615
4648
|
height: 22
|
|
@@ -4617,11 +4650,11 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4617
4650
|
}), /* @__PURE__ */ t("button", {
|
|
4618
4651
|
type: "button",
|
|
4619
4652
|
className: $.controlButton,
|
|
4620
|
-
"aria-label":
|
|
4653
|
+
"aria-label": ue ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
|
|
4621
4654
|
title: "Полноэкранный режим (F)",
|
|
4622
|
-
onClick: () => void
|
|
4623
|
-
children: /* @__PURE__ */ t(
|
|
4624
|
-
name:
|
|
4655
|
+
onClick: () => void Ce(),
|
|
4656
|
+
children: /* @__PURE__ */ t(q, {
|
|
4657
|
+
name: ue ? "IconFullscreenExit" : "IconFullscreen",
|
|
4625
4658
|
width: 22,
|
|
4626
4659
|
height: 22
|
|
4627
4660
|
})
|
|
@@ -4721,7 +4754,7 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4721
4754
|
}), /* @__PURE__ */ t("span", {
|
|
4722
4755
|
className: ar.icon,
|
|
4723
4756
|
"aria-hidden": "true",
|
|
4724
|
-
children: /* @__PURE__ */ t(
|
|
4757
|
+
children: /* @__PURE__ */ t(q, {
|
|
4725
4758
|
name: "IconChevron",
|
|
4726
4759
|
width: 20,
|
|
4727
4760
|
height: 20
|
|
@@ -4963,4 +4996,4 @@ var mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4963
4996
|
});
|
|
4964
4997
|
};
|
|
4965
4998
|
//#endregion
|
|
4966
|
-
export { xn as ConfirmModal, sr as DSAccordion,
|
|
4999
|
+
export { xn as ConfirmModal, sr as DSAccordion, ee as DSBadge, fr as DSBottomNavigation, Ln as DSBottomSheet, A as DSButton, Ce as DSCheckbox, E as DSCounterBadge, Tt as DSDataTable, We as DSDateRange, Ve as DSDateTimePicker, In as DSDrawer, Qe as DSDropDown, st as DSDropDownMultiple, te as DSFieldLabel, M as DSFieldMessage, qt as DSFileInput, Rt as DSFilters, Yt as DSFloatingMenu, Bt as DSFormGrid, Vt as DSFormGridItem, Rn as DSFullscreenDialog, q as DSIcon, It as DSInfoBlock, nt as DSInput, O as DSLoader, hn as DSModal, mn as DSModalFrame, ur as DSNavigationSurface, Fn as DSOverlay, Bn as DSPageLoader, Jt as DSPortal, lt as DSRadioButton, Pt as DSSearchDropDown, Ke as DSSkeleton, et as DSSort, Qn as DSTabs, $t as DSTextarea, Un as DSToast, qn as DSToastProvider, Xn as DSTooltip, Ht as DSValidationSummary, ir as DSVideoPlayerFrame, Sn as ErrorModal, gn as ModalSystemProvider, Cn as builtInModalRegistry, _n as defineModalRegistry, T as formatDSCounterValue, De as formatDateInputValue, Ne as formatDateTimeLocalValue, or as getDSAccordionScrollTarget, pt as getDSDataTableColumnStyle, ht as getDSDataTablePaginationItems, mt as getDSDataTableStickyColumnStyle, Tn as getErrorMessage, ft as getNextDSDataTablePageSelection, Xe as getNextEnabledOptionIndex, Ae as isValidDateInputPrefix, Ue as isValidDateRange, Oe as maskDateInputValue, je as parseDateInputValue, Pe as parseDateTimeLocalValue, nn as resetModalStore, Kn as resetToastStore, wn as useConfirmModal, Dn as useConfirmModalStore, Pn as useDSOverlay, En as useErrorModal, On as useErrorModalStore, kn as useModals, tn as useModalsStore, Jn as useToast, Gn as useToastStore, gt as validateDSDataTableData };
|