md-components-mdigial-azamat 0.0.95 → 0.0.97
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/ActionIconList/ActionIconList.js +1 -1
- package/dist/AllComponents.js +1 -1
- package/dist/AllComponentsInfo.js +1 -1
- package/dist/Cards/WarningCard/WarningCard.js +1 -1
- package/dist/Cards/WarningCard/index.js +1 -1
- package/dist/Cards/WarningCard/info.js +1 -1
- package/dist/Forms/FormDefault/index.js +1 -1
- package/dist/Forms/FormDefault/info.js +1 -1
- package/dist/Forms/helpers/renderFormFields.js +1 -1
- package/dist/Forms/model/components.js +1 -1
- package/dist/PageViewer/renderComponents.js +1 -1
- package/dist/RenderAllComponents/RenderAllComponents.js +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/{componentsMap-e918275c.js → componentsMap-280a0148.js} +1 -1
- package/dist/{info-0d58accd.js → info-085c4fc3.js} +246 -232
- package/dist/main.js +1 -1
- package/package.json +1 -1
|
@@ -2,16 +2,16 @@ import { C as ee } from "./index-0a5f313c.js";
|
|
|
2
2
|
import { jsx as t, jsxs as i, Fragment as U } from "react/jsx-runtime";
|
|
3
3
|
import { warningCardVariant as he, WarningCardVariant as j, WarningCardVariantKey as ge } from "./Cards/WarningCard/model.js";
|
|
4
4
|
import "./ConfigProvider/index.js";
|
|
5
|
-
import { Banner as
|
|
5
|
+
import { Banner as be } from "./Banner/Banner.js";
|
|
6
6
|
import "./BannerAndText/index.js";
|
|
7
|
-
import { forwardRef as P, useState as I, useMemo as A, useEffect as
|
|
8
|
-
import { c as
|
|
7
|
+
import { forwardRef as P, useState as I, useMemo as A, useEffect as xe, useRef as ye, useImperativeHandle as te, useCallback as we } from "react";
|
|
8
|
+
import { c as b } from "./cn-6a4bf187.js";
|
|
9
9
|
import "./Faq/components/Collapse/Collapse.js";
|
|
10
10
|
import "./Header/components/HeaderTabsMobile/HeaderTabsMobile.js";
|
|
11
11
|
import { HtmlContent as ke } from "./HtmlContent/HtmlContent.js";
|
|
12
12
|
import "./Header/components/TabsOutlined/TabsOutlined.js";
|
|
13
13
|
import { B as R } from "./index-875e92ce.js";
|
|
14
|
-
import { B as
|
|
14
|
+
import { B as Ce, a as ve, b as De } from "./const-53dff524.js";
|
|
15
15
|
import { Stepper as Ne } from "./Stepper/Stepper.js";
|
|
16
16
|
import { Segments as Le } from "./Segments/Segments.js";
|
|
17
17
|
import { VideoFull as _e } from "./Video/VideoFull/VideoFull.js";
|
|
@@ -60,7 +60,7 @@ import { SwiperList as ot } from "./SwiperList/SwiperList.js";
|
|
|
60
60
|
import "./TasksBanner/TasksBanner.js";
|
|
61
61
|
import { TasksBannerList as at } from "./TasksBannerList/TasksBannerList.js";
|
|
62
62
|
import { VideoMainBanner as nt } from "./VideoMainBanner/VideoMainBanner.js";
|
|
63
|
-
import { M as st, B as
|
|
63
|
+
import { M as st, B as lt, C as it, S as ct, b as dt, V as pt, c as mt, d as ut, e as ft, f as ht, g as gt, P as bt, h as xt, W as yt, F as wt, k as kt, D as Ct, l as vt, m as Dt, I as Nt, o as Lt, p as _t, A as Bt, q as Mt, T as St, r as Ft, E as Vt, s as It, t as Tt, u as Ht, v as Pt, w as Wt, x as Gt, y as Ot } from "./data.mock-f00bb32c.js";
|
|
64
64
|
import { DataTypesEnum as X, FieldTypes as G } from "./Types/FiledTypes.js";
|
|
65
65
|
import "react-dom";
|
|
66
66
|
import "./AnimatedSwiper/info.js";
|
|
@@ -118,21 +118,21 @@ const ae = [
|
|
|
118
118
|
"description",
|
|
119
119
|
"description_color",
|
|
120
120
|
"html_content",
|
|
121
|
-
|
|
121
|
+
Ce,
|
|
122
122
|
he
|
|
123
123
|
], z = ({
|
|
124
124
|
title: a,
|
|
125
125
|
description: r,
|
|
126
126
|
button: o,
|
|
127
|
-
html_content:
|
|
127
|
+
html_content: s,
|
|
128
128
|
variant: e = ge.Orange
|
|
129
129
|
}) => {
|
|
130
|
-
var
|
|
130
|
+
var l, m, k, y;
|
|
131
131
|
return /* @__PURE__ */ t(re, { children: /* @__PURE__ */ t(
|
|
132
132
|
"div",
|
|
133
133
|
{
|
|
134
134
|
className: "rounded-[24px] p-6",
|
|
135
|
-
style: { background: (
|
|
135
|
+
style: { background: (l = j[e]) == null ? void 0 : l.background },
|
|
136
136
|
children: /* @__PURE__ */ i("div", { className: "flex gap-4 items-center justify-between", children: [
|
|
137
137
|
/* @__PURE__ */ i(
|
|
138
138
|
"div",
|
|
@@ -150,7 +150,7 @@ const ae = [
|
|
|
150
150
|
/* @__PURE__ */ t(
|
|
151
151
|
"p",
|
|
152
152
|
{
|
|
153
|
-
className:
|
|
153
|
+
className: b("text-[24px] leading-8 font-bold"),
|
|
154
154
|
style: { color: (k = j[e]) == null ? void 0 : k.textColor },
|
|
155
155
|
children: a
|
|
156
156
|
}
|
|
@@ -163,7 +163,7 @@ const ae = [
|
|
|
163
163
|
children: r
|
|
164
164
|
}
|
|
165
165
|
),
|
|
166
|
-
|
|
166
|
+
s && /* @__PURE__ */ t(ke, { data: s })
|
|
167
167
|
] })
|
|
168
168
|
]
|
|
169
169
|
}
|
|
@@ -177,42 +177,42 @@ z.propsToEdit = ae;
|
|
|
177
177
|
const ne = P(
|
|
178
178
|
({
|
|
179
179
|
label: a,
|
|
180
|
-
options: r,
|
|
180
|
+
options: r = [],
|
|
181
181
|
value: o = [],
|
|
182
|
-
onChange:
|
|
182
|
+
onChange: s,
|
|
183
183
|
error: e,
|
|
184
|
-
className:
|
|
184
|
+
className: l,
|
|
185
185
|
direction: m = "column"
|
|
186
186
|
}, k) => {
|
|
187
|
-
const y = (
|
|
188
|
-
if (!
|
|
187
|
+
const y = (n) => {
|
|
188
|
+
if (!s)
|
|
189
189
|
return;
|
|
190
|
-
const N = o.includes(
|
|
191
|
-
|
|
190
|
+
const N = o.includes(n) ? o.filter((C) => C !== n) : [...o, n];
|
|
191
|
+
s(N);
|
|
192
192
|
};
|
|
193
193
|
return /* @__PURE__ */ i(
|
|
194
194
|
"div",
|
|
195
195
|
{
|
|
196
196
|
ref: k,
|
|
197
|
-
className:
|
|
197
|
+
className: b("flex flex-col gap-2", l),
|
|
198
198
|
children: [
|
|
199
199
|
a && /* @__PURE__ */ t("label", { className: "text-sm font-medium text-blackBG mb-1", children: a }),
|
|
200
200
|
/* @__PURE__ */ t(
|
|
201
201
|
"div",
|
|
202
202
|
{
|
|
203
|
-
className:
|
|
203
|
+
className: b(
|
|
204
204
|
"flex gap-4",
|
|
205
205
|
m === "column" ? "flex-col" : "flex-row flex-wrap"
|
|
206
206
|
),
|
|
207
|
-
children: r.map((
|
|
207
|
+
children: r == null ? void 0 : r.map((n) => /* @__PURE__ */ t(
|
|
208
208
|
Y,
|
|
209
209
|
{
|
|
210
|
-
label:
|
|
211
|
-
checked: o.includes(
|
|
212
|
-
onChange: () => y(
|
|
213
|
-
error: e && o.length === 0 ? e : void 0
|
|
210
|
+
label: n == null ? void 0 : n.label,
|
|
211
|
+
checked: o.includes(n == null ? void 0 : n.value),
|
|
212
|
+
onChange: () => y(n == null ? void 0 : n.value),
|
|
213
|
+
error: e && (o == null ? void 0 : o.length) === 0 ? e : void 0
|
|
214
214
|
},
|
|
215
|
-
|
|
215
|
+
n == null ? void 0 : n.value
|
|
216
216
|
))
|
|
217
217
|
}
|
|
218
218
|
),
|
|
@@ -224,7 +224,7 @@ const ne = P(
|
|
|
224
224
|
);
|
|
225
225
|
ne.displayName = "CheckboxGroup";
|
|
226
226
|
const Y = P(
|
|
227
|
-
({ className: a, label: r, error: o, ...
|
|
227
|
+
({ className: a, label: r, error: o, ...s }, e) => /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
228
228
|
/* @__PURE__ */ i("label", { className: "flex items-start gap-3 cursor-pointer group", children: [
|
|
229
229
|
/* @__PURE__ */ i("div", { className: "relative flex items-center justify-center mt-0.5", children: [
|
|
230
230
|
/* @__PURE__ */ t(
|
|
@@ -233,13 +233,13 @@ const Y = P(
|
|
|
233
233
|
type: "checkbox",
|
|
234
234
|
className: "peer sr-only",
|
|
235
235
|
ref: e,
|
|
236
|
-
...
|
|
236
|
+
...s
|
|
237
237
|
}
|
|
238
238
|
),
|
|
239
239
|
/* @__PURE__ */ t(
|
|
240
240
|
"div",
|
|
241
241
|
{
|
|
242
|
-
className:
|
|
242
|
+
className: b(
|
|
243
243
|
"relative flex items-center justify-center w-5 h-5 rounded-md border-2 transition-all duration-200",
|
|
244
244
|
"border-grayBlue5 bg-white",
|
|
245
245
|
"peer-checked:bg-greenLight peer-checked:border-greenLight",
|
|
@@ -259,7 +259,7 @@ const Y = P(
|
|
|
259
259
|
r && /* @__PURE__ */ t(
|
|
260
260
|
"span",
|
|
261
261
|
{
|
|
262
|
-
className:
|
|
262
|
+
className: b(
|
|
263
263
|
"text-sm leading-5 text-graySoft select-none",
|
|
264
264
|
"group-hover:text-blackBG transition-colors duration-200",
|
|
265
265
|
o && "text-red-500"
|
|
@@ -273,13 +273,13 @@ const Y = P(
|
|
|
273
273
|
);
|
|
274
274
|
Y.displayName = "Checkbox";
|
|
275
275
|
const se = P(
|
|
276
|
-
({ className: a, type: r, error: o, label:
|
|
277
|
-
|
|
276
|
+
({ className: a, type: r, error: o, label: s, ...e }, l) => /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
277
|
+
s && /* @__PURE__ */ t("label", { className: "block text-sm font-medium text-blackBG mb-2", children: s }),
|
|
278
278
|
/* @__PURE__ */ t(
|
|
279
279
|
"input",
|
|
280
280
|
{
|
|
281
281
|
type: r,
|
|
282
|
-
className:
|
|
282
|
+
className: b(
|
|
283
283
|
"flex h-14 w-full rounded-2xl border-[1px] border-grayBlue bg-white px-[16px] py-[16px] text-base",
|
|
284
284
|
"placeholder:text-gray2 placeholder:opacity-60",
|
|
285
285
|
"transition-all duration-300 ease-in-out",
|
|
@@ -289,7 +289,7 @@ const se = P(
|
|
|
289
289
|
o && "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_4px_rgba(239,68,68,0.15)]",
|
|
290
290
|
a
|
|
291
291
|
),
|
|
292
|
-
ref:
|
|
292
|
+
ref: l,
|
|
293
293
|
...e
|
|
294
294
|
}
|
|
295
295
|
),
|
|
@@ -316,40 +316,40 @@ const Rt = () => /* @__PURE__ */ t(
|
|
|
316
316
|
), Xt = (a) => {
|
|
317
317
|
if (!a)
|
|
318
318
|
return "";
|
|
319
|
-
const r = String(a.getDate()).padStart(2, "0"), o = String(a.getMonth() + 1).padStart(2, "0"),
|
|
320
|
-
return `${r}.${o}.${
|
|
319
|
+
const r = String(a.getDate()).padStart(2, "0"), o = String(a.getMonth() + 1).padStart(2, "0"), s = a.getFullYear();
|
|
320
|
+
return `${r}.${o}.${s}`;
|
|
321
321
|
}, qt = (a) => {
|
|
322
322
|
if (!a)
|
|
323
323
|
return null;
|
|
324
324
|
const r = a.split(".");
|
|
325
325
|
if (r.length === 3) {
|
|
326
|
-
const o = parseInt(r[0], 10),
|
|
327
|
-
if (!isNaN(o) && !isNaN(
|
|
328
|
-
const
|
|
329
|
-
if (
|
|
330
|
-
return
|
|
326
|
+
const o = parseInt(r[0], 10), s = parseInt(r[1], 10) - 1, e = parseInt(r[2], 10);
|
|
327
|
+
if (!isNaN(o) && !isNaN(s) && !isNaN(e)) {
|
|
328
|
+
const l = new Date(e, s, o);
|
|
329
|
+
if (l.getDate() === o && l.getMonth() === s && l.getFullYear() === e)
|
|
330
|
+
return l;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
return null;
|
|
334
|
-
}, zt = (a, r) => new Date(r, a, 1).toLocaleDateString("ru-RU", { month: "long", year: "numeric" }), Yt = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
334
|
+
}, zt = (a, r) => new Date(r, a, 1).toLocaleDateString("ru-RU", { month: "long", year: "numeric" }), Yt = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], le = P(
|
|
335
335
|
({
|
|
336
336
|
className: a,
|
|
337
337
|
error: r,
|
|
338
338
|
label: o,
|
|
339
|
-
value:
|
|
339
|
+
value: s,
|
|
340
340
|
onChange: e,
|
|
341
|
-
placeholder:
|
|
341
|
+
placeholder: l = "Дата обращения в Контакт-центр",
|
|
342
342
|
...m
|
|
343
343
|
}, k) => {
|
|
344
|
-
const [y,
|
|
345
|
-
|
|
344
|
+
const [y, n] = I(""), [N, C] = I(!1), [c, v] = I((/* @__PURE__ */ new Date()).getMonth()), [h, x] = I((/* @__PURE__ */ new Date()).getFullYear()), [u, S] = I(null), F = s !== void 0, w = F ? s : y, { ref: L } = q(N, () => {
|
|
345
|
+
C(!1);
|
|
346
346
|
}), B = A(() => qt(w), [w]);
|
|
347
|
-
|
|
348
|
-
B && (S(B),
|
|
347
|
+
xe(() => {
|
|
348
|
+
B && (S(B), v(B.getMonth()), x(B.getFullYear()));
|
|
349
349
|
}, [B]);
|
|
350
350
|
const T = A(() => {
|
|
351
|
-
const f = new Date(h, c, 1), V = new Date(h, c + 1, 0).getDate(),
|
|
352
|
-
for (let M =
|
|
351
|
+
const f = new Date(h, c, 1), V = new Date(h, c + 1, 0).getDate(), p = f.getDay(), D = [], W = new Date(h, c, 0).getDate();
|
|
352
|
+
for (let M = p - 1; M >= 0; M--)
|
|
353
353
|
D.push(W - M);
|
|
354
354
|
for (let M = 1; M <= V; M++)
|
|
355
355
|
D.push(M);
|
|
@@ -358,24 +358,24 @@ const Rt = () => /* @__PURE__ */ t(
|
|
|
358
358
|
D.push(M);
|
|
359
359
|
return D;
|
|
360
360
|
}, [c, h]), O = (f) => {
|
|
361
|
-
const
|
|
362
|
-
F ||
|
|
363
|
-
}, Z = (f,
|
|
361
|
+
const d = f.target.value;
|
|
362
|
+
F || n(d), e == null || e(d);
|
|
363
|
+
}, Z = (f, d, V) => {
|
|
364
364
|
if (f === null)
|
|
365
365
|
return;
|
|
366
|
-
let
|
|
367
|
-
|
|
368
|
-
const W = new Date(D,
|
|
369
|
-
S(W),
|
|
366
|
+
let p = c, D = h;
|
|
367
|
+
d ? (p = p - 1, p < 0 && (p = 11, D = D - 1)) : V && (p = p + 1, p > 11 && (p = 0, D = D + 1));
|
|
368
|
+
const W = new Date(D, p, f), H = Xt(W);
|
|
369
|
+
S(W), v(p), x(D), F || n(H), e == null || e(H), C(!1);
|
|
370
370
|
}, $ = () => {
|
|
371
|
-
c === 0 ? (
|
|
371
|
+
c === 0 ? (v(11), x(h - 1)) : v(c - 1);
|
|
372
372
|
}, g = () => {
|
|
373
|
-
c === 11 ? (
|
|
374
|
-
}, _ = (f,
|
|
373
|
+
c === 11 ? (v(0), x(h + 1)) : v(c + 1);
|
|
374
|
+
}, _ = (f, d, V) => {
|
|
375
375
|
if (!u || f === null)
|
|
376
376
|
return !1;
|
|
377
|
-
let
|
|
378
|
-
return
|
|
377
|
+
let p = c, D = h;
|
|
378
|
+
return d ? (p = p - 1, p < 0 && (p = 11, D = D - 1)) : V && (p = p + 1, p > 11 && (p = 0, D = D + 1)), u.getDate() === f && u.getMonth() === p && u.getFullYear() === D;
|
|
379
379
|
};
|
|
380
380
|
return /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
381
381
|
o && /* @__PURE__ */ t("label", { className: "block text-sm font-medium text-blackBG mb-2", children: o }),
|
|
@@ -383,7 +383,7 @@ const Rt = () => /* @__PURE__ */ t(
|
|
|
383
383
|
/* @__PURE__ */ i(
|
|
384
384
|
"div",
|
|
385
385
|
{
|
|
386
|
-
className:
|
|
386
|
+
className: b(
|
|
387
387
|
"relative flex items-center h-14 w-full rounded-2xl border-[1px] border-grayBlue bg-white",
|
|
388
388
|
"transition-all duration-300 ease-in-out",
|
|
389
389
|
"hover:border-greenLight hover:shadow-[0_0_0_4px_rgba(22,163,74,0.1)]",
|
|
@@ -396,7 +396,7 @@ const Rt = () => /* @__PURE__ */ t(
|
|
|
396
396
|
"button",
|
|
397
397
|
{
|
|
398
398
|
type: "button",
|
|
399
|
-
onClick: () =>
|
|
399
|
+
onClick: () => C(!N),
|
|
400
400
|
className: "absolute left-4 flex items-center justify-center cursor-pointer",
|
|
401
401
|
tabIndex: -1,
|
|
402
402
|
children: /* @__PURE__ */ t(Rt, {})
|
|
@@ -407,7 +407,7 @@ const Rt = () => /* @__PURE__ */ t(
|
|
|
407
407
|
{
|
|
408
408
|
type: "text",
|
|
409
409
|
inputMode: "none",
|
|
410
|
-
className:
|
|
410
|
+
className: b(
|
|
411
411
|
"flex h-full w-full rounded-2xl px-[16px] pl-[48px] py-[16px] text-base",
|
|
412
412
|
"placeholder:text-gray2 placeholder:opacity-60",
|
|
413
413
|
"bg-transparent border-none outline-none",
|
|
@@ -416,8 +416,8 @@ const Rt = () => /* @__PURE__ */ t(
|
|
|
416
416
|
ref: k,
|
|
417
417
|
value: w,
|
|
418
418
|
onChange: O,
|
|
419
|
-
placeholder:
|
|
420
|
-
onClick: () =>
|
|
419
|
+
placeholder: l,
|
|
420
|
+
onClick: () => C(!0),
|
|
421
421
|
readOnly: !0,
|
|
422
422
|
...m
|
|
423
423
|
}
|
|
@@ -498,12 +498,12 @@ const Rt = () => /* @__PURE__ */ t(
|
|
|
498
498
|
},
|
|
499
499
|
f
|
|
500
500
|
)) }),
|
|
501
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-7 gap-1", children: T.map((f,
|
|
502
|
-
const
|
|
501
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-7 gap-1", children: T.map((f, d) => {
|
|
502
|
+
const p = new Date(h, c, 1).getDay(), D = new Date(
|
|
503
503
|
h,
|
|
504
504
|
c + 1,
|
|
505
505
|
0
|
|
506
|
-
).getDate(), W =
|
|
506
|
+
).getDate(), W = d < p, H = d >= p + D, M = !W && !H, fe = _(
|
|
507
507
|
f,
|
|
508
508
|
W,
|
|
509
509
|
H
|
|
@@ -514,7 +514,7 @@ const Rt = () => /* @__PURE__ */ t(
|
|
|
514
514
|
type: "button",
|
|
515
515
|
onClick: () => Z(f, W, H),
|
|
516
516
|
disabled: f === null,
|
|
517
|
-
className:
|
|
517
|
+
className: b(
|
|
518
518
|
"w-10 h-10 rounded-lg text-sm font-medium transition-colors",
|
|
519
519
|
"hover:bg-[#E8F4FD] focus:outline-none focus:bg-[#E8F4FD]",
|
|
520
520
|
M ? "text-blackBG" : "text-grayBlue5 opacity-50",
|
|
@@ -522,7 +522,7 @@ const Rt = () => /* @__PURE__ */ t(
|
|
|
522
522
|
),
|
|
523
523
|
children: f
|
|
524
524
|
},
|
|
525
|
-
|
|
525
|
+
d
|
|
526
526
|
);
|
|
527
527
|
}) })
|
|
528
528
|
]
|
|
@@ -533,47 +533,47 @@ const Rt = () => /* @__PURE__ */ t(
|
|
|
533
533
|
] });
|
|
534
534
|
}
|
|
535
535
|
);
|
|
536
|
-
|
|
537
|
-
const
|
|
536
|
+
le.displayName = "DateInput";
|
|
537
|
+
const ie = P(
|
|
538
538
|
({
|
|
539
539
|
className: a,
|
|
540
540
|
isFormatted: r,
|
|
541
541
|
isReadable: o,
|
|
542
|
-
error:
|
|
542
|
+
error: s,
|
|
543
543
|
label: e,
|
|
544
|
-
onChange:
|
|
544
|
+
onChange: l,
|
|
545
545
|
value: m,
|
|
546
546
|
defaultValue: k,
|
|
547
547
|
...y
|
|
548
|
-
},
|
|
548
|
+
}, n) => {
|
|
549
549
|
const N = ye(null);
|
|
550
|
-
te(
|
|
551
|
-
const
|
|
552
|
-
(
|
|
553
|
-
if (
|
|
550
|
+
te(n, () => N.current);
|
|
551
|
+
const C = !!o || !!r, c = we(
|
|
552
|
+
(x) => {
|
|
553
|
+
if (x == null || x === "")
|
|
554
554
|
return "";
|
|
555
|
-
const u = Array.isArray(
|
|
556
|
-
return
|
|
555
|
+
const u = Array.isArray(x) ? x.join("").replace(/\D/g, "") : x.toString().replace(/\D/g, "");
|
|
556
|
+
return C ? u.replace(/\B(?=(\d{3})+(?!\d))/g, " ") : u;
|
|
557
557
|
},
|
|
558
|
-
[
|
|
558
|
+
[C]
|
|
559
559
|
), h = {
|
|
560
560
|
...y,
|
|
561
561
|
type: "text",
|
|
562
562
|
inputMode: "numeric",
|
|
563
|
-
onChange: (
|
|
564
|
-
const u =
|
|
565
|
-
if (u.value = B,
|
|
563
|
+
onChange: (x) => {
|
|
564
|
+
const u = x.target, S = u.value, F = S.replace(/\D/g, ""), w = u.selectionStart || 0, L = S.slice(0, w).replace(/\D/g, "").length, B = c(F);
|
|
565
|
+
if (u.value = B, l) {
|
|
566
566
|
const T = u.value;
|
|
567
|
-
u.value = F,
|
|
567
|
+
u.value = F, l(x), u.value = T;
|
|
568
568
|
}
|
|
569
|
-
if (
|
|
569
|
+
if (C) {
|
|
570
570
|
let T = 0, O = 0;
|
|
571
571
|
for (; O < L && T < u.value.length; )
|
|
572
572
|
/\d/.test(u.value[T]) && O++, T++;
|
|
573
573
|
u.setSelectionRange(T, T);
|
|
574
574
|
}
|
|
575
575
|
},
|
|
576
|
-
className:
|
|
576
|
+
className: b(
|
|
577
577
|
"flex h-14 w-full rounded-2xl border-[1px] border-grayBlue bg-white px-[16px] py-[16px] text-base text-blackBG",
|
|
578
578
|
"placeholder:text-gray2 placeholder:opacity-60",
|
|
579
579
|
"transition-all duration-300 ease-in-out",
|
|
@@ -581,7 +581,7 @@ const le = P(
|
|
|
581
581
|
"focus:border-greenLight focus:outline-none focus:ring-0 focus:shadow-[0_0_0_4px_rgba(22,163,74,0.15)]",
|
|
582
582
|
"disabled:cursor-not-allowed disabled:bg-lightGray disabled:opacity-50",
|
|
583
583
|
"[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
584
|
-
|
|
584
|
+
s && "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_4px_rgba(239,68,68,0.15)]",
|
|
585
585
|
a
|
|
586
586
|
)
|
|
587
587
|
};
|
|
@@ -594,11 +594,11 @@ const le = P(
|
|
|
594
594
|
ref: N
|
|
595
595
|
}
|
|
596
596
|
) }),
|
|
597
|
-
|
|
597
|
+
s && /* @__PURE__ */ t("p", { className: "mt-2 text-sm text-red-500", children: s })
|
|
598
598
|
] });
|
|
599
599
|
}
|
|
600
600
|
);
|
|
601
|
-
|
|
601
|
+
ie.displayName = "NumberField";
|
|
602
602
|
const Kt = {
|
|
603
603
|
96: { name: "Кыргызстан", short: "KG", mask: "+996", length: 9 }
|
|
604
604
|
}, Qt = (a) => {
|
|
@@ -613,24 +613,24 @@ const Kt = {
|
|
|
613
613
|
length: r.length,
|
|
614
614
|
flag: Qt(r.short)
|
|
615
615
|
})), E = (a) => K().find((o) => o.id === a), J = (a, r) => {
|
|
616
|
-
const o = r.dialCode,
|
|
616
|
+
const o = r.dialCode, s = r.length;
|
|
617
617
|
let e = a;
|
|
618
618
|
a.startsWith(o) && (e = a.slice(o.length));
|
|
619
|
-
const
|
|
620
|
-
if (
|
|
619
|
+
const l = e.slice(0, s);
|
|
620
|
+
if (l.length === 0)
|
|
621
621
|
return r.mask;
|
|
622
|
-
let m =
|
|
623
|
-
return
|
|
622
|
+
let m = l;
|
|
623
|
+
return l.length > 6 ? m = `${l.slice(0, 3)} ${l.slice(3, 6)} ${l.slice(6)}` : l.length > 3 && (m = `${l.slice(0, 3)} ${l.slice(3)}`), `${r.mask} ${m}`;
|
|
624
624
|
}, Ut = (a, r) => {
|
|
625
625
|
if (!a)
|
|
626
626
|
return null;
|
|
627
|
-
const o = a.replace(/\D/g, ""),
|
|
627
|
+
const o = a.replace(/\D/g, ""), s = K();
|
|
628
628
|
if (a.startsWith("+")) {
|
|
629
|
-
for (const e of
|
|
629
|
+
for (const e of s)
|
|
630
630
|
if (a.startsWith(e.mask))
|
|
631
631
|
return e;
|
|
632
632
|
}
|
|
633
|
-
for (const e of
|
|
633
|
+
for (const e of s)
|
|
634
634
|
if (o.startsWith(e.dialCode))
|
|
635
635
|
return e;
|
|
636
636
|
return o.startsWith("0") && E("96") || null;
|
|
@@ -639,13 +639,13 @@ const Kt = {
|
|
|
639
639
|
className: a,
|
|
640
640
|
error: r,
|
|
641
641
|
label: o,
|
|
642
|
-
value:
|
|
642
|
+
value: s,
|
|
643
643
|
onChange: e,
|
|
644
|
-
defaultCountry:
|
|
644
|
+
defaultCountry: l = "996",
|
|
645
645
|
...m
|
|
646
646
|
}, k) => {
|
|
647
|
-
const [y,
|
|
648
|
-
|
|
647
|
+
const [y, n] = I(""), [N, C] = I(l), [c, v] = I(!1), [h, x] = I(""), u = s !== void 0, S = u ? s : y, { ref: F } = q(c, () => {
|
|
648
|
+
v(!1), x("");
|
|
649
649
|
}), w = A(() => K(), []), L = E(N) || w[0], B = A(() => {
|
|
650
650
|
if (!h)
|
|
651
651
|
return w;
|
|
@@ -659,31 +659,31 @@ const Kt = {
|
|
|
659
659
|
const _ = g.replace(/\D/g, "");
|
|
660
660
|
let f = _;
|
|
661
661
|
(_.startsWith(L.dialCode) || g.startsWith(L.mask)) && (f = _.slice(L.dialCode.length));
|
|
662
|
-
const
|
|
663
|
-
return
|
|
662
|
+
const d = f.slice(0, L.length);
|
|
663
|
+
return d.length === 0 ? "" : d.length <= 3 ? d : d.length <= 6 ? `${d.slice(0, 3)} ${d.slice(3)}` : `${d.slice(0, 3)} ${d.slice(3, 6)} ${d.slice(6)}`;
|
|
664
664
|
})(S), Z = (g) => {
|
|
665
|
-
|
|
665
|
+
C(g), v(!1), x("");
|
|
666
666
|
const _ = S.replace(/\D/g, ""), f = E(g);
|
|
667
667
|
if (!f)
|
|
668
668
|
return;
|
|
669
|
-
let
|
|
670
|
-
_.startsWith(L.dialCode) && (
|
|
671
|
-
const V = J(
|
|
672
|
-
u ||
|
|
669
|
+
let d = _;
|
|
670
|
+
_.startsWith(L.dialCode) && (d = _.slice(L.dialCode.length));
|
|
671
|
+
const V = J(d, f);
|
|
672
|
+
u || n(V), e == null || e(V);
|
|
673
673
|
}, $ = (g) => {
|
|
674
|
-
const _ = g.target.value, f = _.replace(/\D/g, ""),
|
|
674
|
+
const _ = g.target.value, f = _.replace(/\D/g, ""), d = Ut(
|
|
675
675
|
_
|
|
676
676
|
);
|
|
677
|
-
|
|
678
|
-
const V =
|
|
679
|
-
u ||
|
|
677
|
+
d && d.id !== N && C(d.id);
|
|
678
|
+
const V = d || E(N) || L, p = J(f, V);
|
|
679
|
+
u || n(p), e == null || e(p);
|
|
680
680
|
};
|
|
681
681
|
return /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
682
682
|
o && /* @__PURE__ */ t("label", { className: "block text-sm font-medium text-blackBG mb-2", children: o }),
|
|
683
683
|
/* @__PURE__ */ i(
|
|
684
684
|
"div",
|
|
685
685
|
{
|
|
686
|
-
className:
|
|
686
|
+
className: b(
|
|
687
687
|
"relative flex gap-2 h-14 flex-1 rounded-2xl border-[1px] border-grayBlue bg-white text-base",
|
|
688
688
|
"placeholder:text-gray2 placeholder:opacity-60",
|
|
689
689
|
"transition-all duration-300 ease-in-out",
|
|
@@ -704,8 +704,8 @@ const Kt = {
|
|
|
704
704
|
"button",
|
|
705
705
|
{
|
|
706
706
|
type: "button",
|
|
707
|
-
onClick: () =>
|
|
708
|
-
className:
|
|
707
|
+
onClick: () => v(!c),
|
|
708
|
+
className: b(
|
|
709
709
|
"flex h-14 w-[120px] rounded-2xl px-3 py-2 items-center justify-center cursor-pointer shrink-0",
|
|
710
710
|
"transition-all duration-300 ease-in-out",
|
|
711
711
|
r && "border-red-500 hover:border-red-500 focus:border-red-500",
|
|
@@ -720,7 +720,7 @@ const Kt = {
|
|
|
720
720
|
/* @__PURE__ */ t(
|
|
721
721
|
"svg",
|
|
722
722
|
{
|
|
723
|
-
className:
|
|
723
|
+
className: b(
|
|
724
724
|
"w-4 h-4 ml-1 text-grayBlue5 transition-transform duration-200 shrink-0",
|
|
725
725
|
c && "rotate-180"
|
|
726
726
|
),
|
|
@@ -747,9 +747,9 @@ const Kt = {
|
|
|
747
747
|
{
|
|
748
748
|
type: "text",
|
|
749
749
|
value: h,
|
|
750
|
-
onChange: (g) =>
|
|
750
|
+
onChange: (g) => x(g.target.value),
|
|
751
751
|
placeholder: "Поиск страны...",
|
|
752
|
-
className:
|
|
752
|
+
className: b(
|
|
753
753
|
"w-full px-3 py-2 rounded-xl border-[1px] border-grayBlue text-sm",
|
|
754
754
|
"focus:outline-none focus:border-greenLight"
|
|
755
755
|
),
|
|
@@ -761,7 +761,7 @@ const Kt = {
|
|
|
761
761
|
{
|
|
762
762
|
type: "button",
|
|
763
763
|
onClick: () => Z(g.id),
|
|
764
|
-
className:
|
|
764
|
+
className: b(
|
|
765
765
|
"w-full px-4 py-3 text-left cursor-pointer text-base text-blackBG transition-colors",
|
|
766
766
|
"hover:bg-[#E8F4FD] focus:bg-[#E8F4FD] focus:outline-none",
|
|
767
767
|
N === g.id && "bg-[#E8F4FD]",
|
|
@@ -784,7 +784,7 @@ const Kt = {
|
|
|
784
784
|
{
|
|
785
785
|
type: "tel",
|
|
786
786
|
inputMode: "tel",
|
|
787
|
-
className:
|
|
787
|
+
className: b(
|
|
788
788
|
"flex h-full flex-1 rounded-2xl px-[16px] py-[16px] text-base",
|
|
789
789
|
"placeholder:text-gray2 placeholder:opacity-60",
|
|
790
790
|
"transition-all duration-300 ease-in-out",
|
|
@@ -809,45 +809,52 @@ const Kt = {
|
|
|
809
809
|
}
|
|
810
810
|
);
|
|
811
811
|
ce.displayName = "PhoneInput";
|
|
812
|
-
const
|
|
812
|
+
const de = P(
|
|
813
813
|
({
|
|
814
814
|
label: a,
|
|
815
|
-
options: r,
|
|
816
|
-
value: o,
|
|
817
|
-
name:
|
|
815
|
+
options: r = [],
|
|
816
|
+
value: o = [],
|
|
817
|
+
name: s,
|
|
818
818
|
onChange: e,
|
|
819
|
-
error:
|
|
819
|
+
error: l,
|
|
820
820
|
className: m,
|
|
821
821
|
direction: k = "column"
|
|
822
|
-
}, y) => /* @__PURE__ */ i(
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
children: r.map((l) => /* @__PURE__ */ t(
|
|
832
|
-
de,
|
|
822
|
+
}, y) => /* @__PURE__ */ i(
|
|
823
|
+
"div",
|
|
824
|
+
{
|
|
825
|
+
ref: y,
|
|
826
|
+
className: b("flex flex-col gap-2", m),
|
|
827
|
+
children: [
|
|
828
|
+
a && /* @__PURE__ */ t("label", { className: "text-sm font-medium text-blackBG mb-1", children: a }),
|
|
829
|
+
/* @__PURE__ */ t(
|
|
830
|
+
"div",
|
|
833
831
|
{
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
832
|
+
className: b(
|
|
833
|
+
"flex gap-4",
|
|
834
|
+
k === "column" ? "flex-col" : "flex-row flex-wrap"
|
|
835
|
+
),
|
|
836
|
+
children: r == null ? void 0 : r.map((n) => /* @__PURE__ */ t(
|
|
837
|
+
pe,
|
|
838
|
+
{
|
|
839
|
+
name: s,
|
|
840
|
+
label: n == null ? void 0 : n.label,
|
|
841
|
+
value: n == null ? void 0 : n.value,
|
|
842
|
+
checked: o === (n == null ? void 0 : n.value),
|
|
843
|
+
onChange: () => e == null ? void 0 : e(n == null ? void 0 : n.value),
|
|
844
|
+
error: l && !o ? l : void 0
|
|
845
|
+
},
|
|
846
|
+
n == null ? void 0 : n.value
|
|
847
|
+
))
|
|
848
|
+
}
|
|
849
|
+
),
|
|
850
|
+
l && /* @__PURE__ */ t("p", { className: "mt-1 text-sm text-red-500", children: l })
|
|
851
|
+
]
|
|
852
|
+
}
|
|
853
|
+
)
|
|
847
854
|
);
|
|
848
|
-
|
|
849
|
-
const
|
|
850
|
-
({ className: a, label: r, error: o, ...
|
|
855
|
+
de.displayName = "RadioGroup";
|
|
856
|
+
const pe = P(
|
|
857
|
+
({ className: a, label: r, error: o, ...s }, e) => /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
851
858
|
/* @__PURE__ */ i("label", { className: "flex items-start gap-3 cursor-pointer group", children: [
|
|
852
859
|
/* @__PURE__ */ i("div", { className: "relative flex items-center justify-center mt-0.5", children: [
|
|
853
860
|
/* @__PURE__ */ t(
|
|
@@ -856,13 +863,13 @@ const de = P(
|
|
|
856
863
|
type: "radio",
|
|
857
864
|
className: "peer sr-only",
|
|
858
865
|
ref: e,
|
|
859
|
-
...
|
|
866
|
+
...s
|
|
860
867
|
}
|
|
861
868
|
),
|
|
862
869
|
/* @__PURE__ */ t(
|
|
863
870
|
"div",
|
|
864
871
|
{
|
|
865
|
-
className:
|
|
872
|
+
className: b(
|
|
866
873
|
"relative flex items-center justify-center w-5 h-5 rounded-full border-2 transition-all duration-200",
|
|
867
874
|
"border-grayBlue5 bg-white",
|
|
868
875
|
"peer-checked:bg-white peer-checked:border-greenLight",
|
|
@@ -882,7 +889,7 @@ const de = P(
|
|
|
882
889
|
r && /* @__PURE__ */ t(
|
|
883
890
|
"span",
|
|
884
891
|
{
|
|
885
|
-
className:
|
|
892
|
+
className: b(
|
|
886
893
|
"text-sm leading-5 text-graySoft select-none",
|
|
887
894
|
"group-hover:text-blackBG transition-colors duration-200",
|
|
888
895
|
o && "text-red-500"
|
|
@@ -894,29 +901,29 @@ const de = P(
|
|
|
894
901
|
o && /* @__PURE__ */ t("p", { className: "mt-2 text-sm text-red-500", children: o })
|
|
895
902
|
] })
|
|
896
903
|
);
|
|
897
|
-
|
|
904
|
+
pe.displayName = "Radio";
|
|
898
905
|
const me = P(
|
|
899
906
|
({
|
|
900
907
|
className: a,
|
|
901
908
|
error: r,
|
|
902
909
|
label: o,
|
|
903
|
-
options:
|
|
910
|
+
options: s = [],
|
|
904
911
|
placeholder: e = "Выберите категорию",
|
|
905
|
-
value:
|
|
912
|
+
value: l,
|
|
906
913
|
onChange: m,
|
|
907
914
|
onBlur: k,
|
|
908
915
|
name: y,
|
|
909
|
-
disabled:
|
|
916
|
+
disabled: n,
|
|
910
917
|
...N
|
|
911
|
-
},
|
|
918
|
+
}, C) => {
|
|
912
919
|
const {
|
|
913
920
|
ref: c,
|
|
914
|
-
isShow:
|
|
921
|
+
isShow: v,
|
|
915
922
|
setIsShow: h
|
|
916
923
|
} = q(!1);
|
|
917
|
-
te(
|
|
918
|
-
const
|
|
919
|
-
|
|
924
|
+
te(C, () => c.current);
|
|
925
|
+
const x = s.find((w) => w.value === l), u = () => {
|
|
926
|
+
n || h(!v);
|
|
920
927
|
}, S = (w) => {
|
|
921
928
|
m && m({
|
|
922
929
|
target: {
|
|
@@ -928,14 +935,14 @@ const me = P(
|
|
|
928
935
|
k && k({
|
|
929
936
|
target: {
|
|
930
937
|
name: y,
|
|
931
|
-
value:
|
|
938
|
+
value: l
|
|
932
939
|
}
|
|
933
940
|
});
|
|
934
941
|
};
|
|
935
942
|
return /* @__PURE__ */ i(
|
|
936
943
|
"div",
|
|
937
944
|
{
|
|
938
|
-
className:
|
|
945
|
+
className: b("w-full", a),
|
|
939
946
|
ref: c,
|
|
940
947
|
onBlur: F,
|
|
941
948
|
...N,
|
|
@@ -947,24 +954,24 @@ const me = P(
|
|
|
947
954
|
{
|
|
948
955
|
type: "button",
|
|
949
956
|
onClick: u,
|
|
950
|
-
disabled:
|
|
951
|
-
className:
|
|
957
|
+
disabled: n,
|
|
958
|
+
className: b(
|
|
952
959
|
"flex h-14 w-full items-center justify-between rounded-2xl border-[1px] border-grayBlue bg-white px-[20px] text-base text-blackBG",
|
|
953
960
|
"transition-all duration-300 ease-in-out",
|
|
954
961
|
"hover:border-greenLight hover:shadow-[0_0_0_4px_rgba(22,163,74,0.1)]",
|
|
955
|
-
|
|
956
|
-
|
|
962
|
+
v && "border-greenLight shadow-[0_0_0_4px_rgba(22,163,74,0.15)] ring-0 outline-none",
|
|
963
|
+
n && "cursor-not-allowed bg-lightGray opacity-50",
|
|
957
964
|
r && "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_4px_rgba(239,68,68,0.15)]",
|
|
958
|
-
!
|
|
965
|
+
!x && "text-gray2 opacity-60"
|
|
959
966
|
),
|
|
960
967
|
children: [
|
|
961
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
968
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: x ? x.label : e }),
|
|
962
969
|
/* @__PURE__ */ t(
|
|
963
970
|
"svg",
|
|
964
971
|
{
|
|
965
|
-
className:
|
|
972
|
+
className: b(
|
|
966
973
|
"ml-2 h-5 w-5 text-gray2 transition-transform duration-300",
|
|
967
|
-
|
|
974
|
+
v && "rotate-180"
|
|
968
975
|
),
|
|
969
976
|
fill: "none",
|
|
970
977
|
stroke: "currentColor",
|
|
@@ -983,22 +990,22 @@ const me = P(
|
|
|
983
990
|
]
|
|
984
991
|
}
|
|
985
992
|
),
|
|
986
|
-
|
|
993
|
+
v && /* @__PURE__ */ t(
|
|
987
994
|
"div",
|
|
988
995
|
{
|
|
989
|
-
className:
|
|
996
|
+
className: b(
|
|
990
997
|
"absolute left-0 z-[100] mt-2 w-full overflow-hidden rounded-2xl border-[1px] border-grayBlue bg-white shadow-xl",
|
|
991
998
|
"transition-all duration-200 ease-in-out"
|
|
992
999
|
),
|
|
993
|
-
children: /* @__PURE__ */ t("div", { className: "max-h-[280px] overflow-y-auto py-2", children:
|
|
1000
|
+
children: /* @__PURE__ */ t("div", { className: "max-h-[280px] overflow-y-auto py-2", children: s.length > 0 ? s.map((w) => /* @__PURE__ */ t(
|
|
994
1001
|
"button",
|
|
995
1002
|
{
|
|
996
1003
|
type: "button",
|
|
997
1004
|
onClick: () => S(w),
|
|
998
|
-
className:
|
|
1005
|
+
className: b(
|
|
999
1006
|
"flex w-full items-center px-5 py-3 text-left text-base transition-colors",
|
|
1000
1007
|
"hover:bg-green-50 active:bg-green-100",
|
|
1001
|
-
w.value ===
|
|
1008
|
+
w.value === l && "bg-green-50 font-medium text-greenLight",
|
|
1002
1009
|
// Мобильные отступы чуть больше для удобства тапа
|
|
1003
1010
|
"max-tablet:py-4"
|
|
1004
1011
|
),
|
|
@@ -1030,18 +1037,18 @@ const Jt = {
|
|
|
1030
1037
|
}
|
|
1031
1038
|
], tr = {
|
|
1032
1039
|
text: se,
|
|
1033
|
-
number:
|
|
1040
|
+
number: ie,
|
|
1034
1041
|
phone: ce,
|
|
1035
1042
|
select: me,
|
|
1036
|
-
date:
|
|
1037
|
-
radio:
|
|
1043
|
+
date: le,
|
|
1044
|
+
radio: de,
|
|
1038
1045
|
checkbox: ne,
|
|
1039
1046
|
file: Qe
|
|
1040
1047
|
}, rr = (a, {
|
|
1041
1048
|
register: r,
|
|
1042
1049
|
errors: o,
|
|
1043
|
-
control:
|
|
1044
|
-
}) => a.map((e,
|
|
1050
|
+
control: s
|
|
1051
|
+
}) => a.map((e, l) => {
|
|
1045
1052
|
var k;
|
|
1046
1053
|
if ((e == null ? void 0 : e.componentType) === "component") {
|
|
1047
1054
|
const y = Jt[e == null ? void 0 : e.key];
|
|
@@ -1051,43 +1058,50 @@ const Jt = {
|
|
|
1051
1058
|
{
|
|
1052
1059
|
...e == null ? void 0 : e.props
|
|
1053
1060
|
},
|
|
1054
|
-
|
|
1061
|
+
l
|
|
1055
1062
|
);
|
|
1056
1063
|
}
|
|
1057
1064
|
const m = tr[e == null ? void 0 : e.type];
|
|
1058
1065
|
if (m) {
|
|
1059
1066
|
const y = ["select", "radio", "checkbox", "file"].includes(
|
|
1060
1067
|
e.type
|
|
1061
|
-
),
|
|
1062
|
-
return y &&
|
|
1068
|
+
), n = e != null && e.name ? (k = o[e == null ? void 0 : e.name]) == null ? void 0 : k.message : void 0;
|
|
1069
|
+
return y && s && (e != null && e.name) ? /* @__PURE__ */ t(
|
|
1063
1070
|
ze,
|
|
1064
1071
|
{
|
|
1065
1072
|
name: e.name,
|
|
1066
|
-
control:
|
|
1073
|
+
control: s,
|
|
1067
1074
|
rules: { validate: e.validate },
|
|
1068
|
-
render: ({ field: { onChange: N, value:
|
|
1075
|
+
render: ({ field: { onChange: N, value: C, name: c, ref: v } }) => /* @__PURE__ */ t(
|
|
1069
1076
|
m,
|
|
1070
1077
|
{
|
|
1071
1078
|
...e.field_props,
|
|
1072
1079
|
onChange: N,
|
|
1073
|
-
value:
|
|
1080
|
+
value: C,
|
|
1074
1081
|
name: c,
|
|
1075
|
-
ref:
|
|
1076
|
-
error:
|
|
1082
|
+
ref: v,
|
|
1083
|
+
error: n
|
|
1077
1084
|
}
|
|
1078
1085
|
)
|
|
1079
1086
|
},
|
|
1080
|
-
|
|
1081
|
-
) : /* @__PURE__ */ t(
|
|
1087
|
+
l
|
|
1088
|
+
) : e.name ? /* @__PURE__ */ t(
|
|
1082
1089
|
m,
|
|
1083
1090
|
{
|
|
1084
1091
|
...e == null ? void 0 : e.field_props,
|
|
1085
1092
|
...r(e == null ? void 0 : e.name, {
|
|
1086
1093
|
validate: e == null ? void 0 : e.validate
|
|
1087
1094
|
}),
|
|
1088
|
-
error:
|
|
1095
|
+
error: n
|
|
1096
|
+
},
|
|
1097
|
+
l
|
|
1098
|
+
) : /* @__PURE__ */ t(
|
|
1099
|
+
m,
|
|
1100
|
+
{
|
|
1101
|
+
...e == null ? void 0 : e.field_props,
|
|
1102
|
+
error: n
|
|
1089
1103
|
},
|
|
1090
|
-
|
|
1104
|
+
l
|
|
1091
1105
|
);
|
|
1092
1106
|
}
|
|
1093
1107
|
return null;
|
|
@@ -1103,7 +1117,7 @@ const Jt = {
|
|
|
1103
1117
|
}), ga = {
|
|
1104
1118
|
title: "Оставьте заявку, чтобы подключить MKassa",
|
|
1105
1119
|
subtitle: "с Вами свяжется наш специалист и поможет с подключением сервиса"
|
|
1106
|
-
},
|
|
1120
|
+
}, ba = {
|
|
1107
1121
|
title: "Форма заявки",
|
|
1108
1122
|
description: "Форма заявки ",
|
|
1109
1123
|
types: [ee.form]
|
|
@@ -1124,7 +1138,7 @@ const Jt = {
|
|
|
1124
1138
|
label: "Тип поля",
|
|
1125
1139
|
type: "fieldType",
|
|
1126
1140
|
options: Et
|
|
1127
|
-
}),
|
|
1141
|
+
}), lr = {
|
|
1128
1142
|
type: "fields",
|
|
1129
1143
|
dataType: "array",
|
|
1130
1144
|
label: "Поля для формы",
|
|
@@ -1154,21 +1168,21 @@ const Jt = {
|
|
|
1154
1168
|
// placeholder: FieldTypes.STRING,
|
|
1155
1169
|
// },
|
|
1156
1170
|
}
|
|
1157
|
-
},
|
|
1171
|
+
}, ir = ["title", "subtitle", "color", lr], ue = ({
|
|
1158
1172
|
title: a,
|
|
1159
1173
|
subtitle: r,
|
|
1160
1174
|
color: o,
|
|
1161
|
-
gridCols:
|
|
1175
|
+
gridCols: s = 1,
|
|
1162
1176
|
gridRow: e = 2,
|
|
1163
|
-
fields:
|
|
1177
|
+
fields: l = []
|
|
1164
1178
|
}) => {
|
|
1165
1179
|
var L;
|
|
1166
|
-
const [m, k] = I(!1), [y,
|
|
1167
|
-
register:
|
|
1180
|
+
const [m, k] = I(!1), [y, n] = I(!1), N = Ke(960), {
|
|
1181
|
+
register: C,
|
|
1168
1182
|
handleSubmit: c,
|
|
1169
|
-
watch:
|
|
1183
|
+
watch: v,
|
|
1170
1184
|
reset: h,
|
|
1171
|
-
control:
|
|
1185
|
+
control: x,
|
|
1172
1186
|
formState: { errors: u }
|
|
1173
1187
|
} = Ye({
|
|
1174
1188
|
defaultValues: {
|
|
@@ -1177,12 +1191,12 @@ const Jt = {
|
|
|
1177
1191
|
business_category: "",
|
|
1178
1192
|
agreement: !1
|
|
1179
1193
|
}
|
|
1180
|
-
}), S =
|
|
1194
|
+
}), S = v("agreement"), F = async (B) => {
|
|
1181
1195
|
console.log("Form submitted:", B);
|
|
1182
|
-
}, w = rr(
|
|
1183
|
-
register:
|
|
1196
|
+
}, w = rr(l || [], {
|
|
1197
|
+
register: C,
|
|
1184
1198
|
errors: u,
|
|
1185
|
-
control:
|
|
1199
|
+
control: x
|
|
1186
1200
|
});
|
|
1187
1201
|
return /* @__PURE__ */ t(re, { children: /* @__PURE__ */ t(
|
|
1188
1202
|
"form",
|
|
@@ -1196,7 +1210,7 @@ const Jt = {
|
|
|
1196
1210
|
style: {
|
|
1197
1211
|
boxShadow: `0px 8px 24px rgba(0,0,0,0.08),0px -8px 0px ${o}`
|
|
1198
1212
|
},
|
|
1199
|
-
className: "bg-white rounded-[24px]
|
|
1213
|
+
className: "bg-white rounded-[24px] w-full flex flex-col items-center justify-center py-[72px] px-[96px] max-tablet:py-[40px] max-tablet:px-[32px] transition-all duration-300 mt-[8px]",
|
|
1200
1214
|
children: [
|
|
1201
1215
|
/* @__PURE__ */ i("div", { className: "text-center mb-10 max-tablet:mb-8", children: [
|
|
1202
1216
|
/* @__PURE__ */ t("h2", { className: "text-[36px] leading-[44px] font-semibold m-0 mb-3 text-blackBG max-tablet:text-[28px] max-tablet:leading-[36px]", children: a }),
|
|
@@ -1241,7 +1255,7 @@ const Jt = {
|
|
|
1241
1255
|
{
|
|
1242
1256
|
className: "w-[640px] mb-8 max-tablet:w-full grid gap-6",
|
|
1243
1257
|
style: {
|
|
1244
|
-
gridTemplateColumns: `repeat(${N ? 1 :
|
|
1258
|
+
gridTemplateColumns: `repeat(${N ? 1 : s}, 1fr)`,
|
|
1245
1259
|
gridTemplateRows: `repeat(${e}, auto)`
|
|
1246
1260
|
},
|
|
1247
1261
|
children: w
|
|
@@ -1250,7 +1264,7 @@ const Jt = {
|
|
|
1250
1264
|
/* @__PURE__ */ t("div", { className: "pt-2", children: /* @__PURE__ */ t(
|
|
1251
1265
|
Y,
|
|
1252
1266
|
{
|
|
1253
|
-
...
|
|
1267
|
+
...C("agreement", {
|
|
1254
1268
|
required: "Необходимо согласие на обработку персональных данных"
|
|
1255
1269
|
}),
|
|
1256
1270
|
error: (L = u.agreement) == null ? void 0 : L.message,
|
|
@@ -1277,7 +1291,7 @@ const Jt = {
|
|
|
1277
1291
|
loading: y,
|
|
1278
1292
|
className: "w-full whitespace-nowrap transition-all duration-200 hover:scale-[1.02] active:scale-[0.98]",
|
|
1279
1293
|
type: "submit",
|
|
1280
|
-
size:
|
|
1294
|
+
size: ve.XL,
|
|
1281
1295
|
variant: De.Primary,
|
|
1282
1296
|
disabled: !S || y,
|
|
1283
1297
|
children: "Отправить заявку"
|
|
@@ -1290,10 +1304,10 @@ const Jt = {
|
|
|
1290
1304
|
}
|
|
1291
1305
|
) });
|
|
1292
1306
|
};
|
|
1293
|
-
ue.propsToEdit =
|
|
1294
|
-
const
|
|
1307
|
+
ue.propsToEdit = ir;
|
|
1308
|
+
const xa = {
|
|
1295
1309
|
MainBanner: { key: "MainBanner", component: He },
|
|
1296
|
-
Banner: { key: "Banner", component:
|
|
1310
|
+
Banner: { key: "Banner", component: be },
|
|
1297
1311
|
CardImageList: { key: "CardImageList", component: Te },
|
|
1298
1312
|
Stepper: { key: "Stepper", component: Ne },
|
|
1299
1313
|
Segments: { key: "Segments", component: Le },
|
|
@@ -1343,23 +1357,23 @@ const ba = {
|
|
|
1343
1357
|
TitleBlock: { key: "TitleBlock", component: oe }
|
|
1344
1358
|
}, ya = {
|
|
1345
1359
|
MainBanner: st.component_props,
|
|
1346
|
-
Banner:
|
|
1347
|
-
CardImageList:
|
|
1360
|
+
Banner: lt.component_props,
|
|
1361
|
+
CardImageList: it.component_props,
|
|
1348
1362
|
Stepper: ct.component_props,
|
|
1349
|
-
Segments:
|
|
1350
|
-
VideoFull:
|
|
1363
|
+
Segments: dt.component_props,
|
|
1364
|
+
VideoFull: pt.component_props,
|
|
1351
1365
|
VideoList: mt.component_props,
|
|
1352
1366
|
VideoListMini: ut.component_props,
|
|
1353
1367
|
ContentCardList: ft.component_props,
|
|
1354
1368
|
CardIconList: ht.component_props,
|
|
1355
1369
|
MultiCards: gt.component_props,
|
|
1356
|
-
Partners:
|
|
1357
|
-
PartnersColors:
|
|
1370
|
+
Partners: bt.component_props,
|
|
1371
|
+
PartnersColors: xt.component_props,
|
|
1358
1372
|
WarningCard: yt.component_props,
|
|
1359
1373
|
Faq: wt.component_props,
|
|
1360
1374
|
DownloadFileBanner: kt.component_props,
|
|
1361
|
-
DownloadFileHalf:
|
|
1362
|
-
DownloadFileFull:
|
|
1375
|
+
DownloadFileHalf: Ct.component_props,
|
|
1376
|
+
DownloadFileFull: vt.component_props,
|
|
1363
1377
|
DownloadFileMini: Dt.component_props,
|
|
1364
1378
|
InstructionList: Nt.component_props,
|
|
1365
1379
|
PreviewList: Lt.component_props,
|
|
@@ -1387,13 +1401,13 @@ export {
|
|
|
1387
1401
|
ya as A,
|
|
1388
1402
|
ue as F,
|
|
1389
1403
|
z as W,
|
|
1390
|
-
|
|
1404
|
+
xa as a,
|
|
1391
1405
|
er as b,
|
|
1392
1406
|
Jt as c,
|
|
1393
1407
|
or as d,
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1408
|
+
lr as e,
|
|
1409
|
+
ba as f,
|
|
1410
|
+
ir as g,
|
|
1397
1411
|
ga as i,
|
|
1398
1412
|
ae as p,
|
|
1399
1413
|
rr as r,
|