md-components-mdigial-azamat 0.0.77 → 0.0.80
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/ActionCard/ActionCard.js +30 -0
- package/dist/ActionCard/index.js +4 -0
- package/dist/ActionCard/info.js +11 -0
- package/dist/ActionCard/types.js +1 -0
- package/dist/ActionCardList/ActionCardList.js +32 -0
- package/dist/ActionCardList/index.js +4 -0
- package/dist/ActionCardList/info.js +11 -0
- package/dist/ActionCardList/types.js +1 -0
- package/dist/ActionIconList/ActionIconList.js +174 -0
- package/dist/ActionIconList/index.js +4 -0
- package/dist/ActionIconList/info.js +11 -0
- package/dist/ActionIconList/types.js +1 -0
- package/dist/AllComponents.js +39 -127
- package/dist/AllComponentsInfo.js +26 -27
- package/dist/AnimatedSwiper/index.js +9 -3
- package/dist/AnimatedSwiper/info.js +1 -1
- package/dist/Banner/Banner.js +1 -1
- package/dist/Banner/info.js +1 -1
- package/dist/BannerAndText/index.js +1 -1
- package/dist/BannerAndText/info.js +1 -1
- package/dist/CardIconList/CardIconList.js +16 -15
- package/dist/CardIconList/info.js +1 -1
- package/dist/CardImageList/CardImageList.js +1 -1
- package/dist/CardImageList/info.js +1 -1
- package/dist/CardImageSecondary/info.js +1 -1
- package/dist/CardImageSecondaryList/CardImageSecondaryList.js +1 -1
- package/dist/CardImageSecondaryList/info.js +1 -1
- package/dist/CardInfoTable/index.js +1 -1
- package/dist/CardInfoTable/info.js +1 -1
- package/dist/{index-04224eb4.js → Cards/ActionIconCard/index.js} +21 -27
- package/dist/Cards/ActionIconCard/info.js +11 -0
- package/dist/Cards/ActionIconCard/types.js +1 -0
- package/dist/Cards/CardImage/info.js +1 -1
- package/dist/Cards/ColoredCard/info.js +1 -1
- package/dist/Cards/ContentCard/info.js +1 -1
- package/dist/Cards/FeaturesCard/index.js +100 -8
- package/dist/Cards/FeaturesCard/info.js +2 -2
- package/dist/Cards/WarningCard/WarningCard.js +103 -68
- package/dist/Cards/WarningCard/index.js +1 -1
- package/dist/Cards/WarningCard/info.js +3 -9
- package/dist/ComponentContainer-05e27e82.js +16 -0
- package/dist/ContentCardList/ContentCardList.js +1 -1
- package/dist/ContentCardList/info.js +1 -1
- package/dist/DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js +1 -1
- package/dist/DownloadFile/components/DownloadFileBanner/info.js +1 -1
- package/dist/DownloadFile/components/DownloadFileBright/index.js +1 -1
- package/dist/DownloadFile/components/DownloadFileBright/info.js +1 -1
- package/dist/DownloadFile/components/DownloadFileFull/DownloadFileFull.js +1 -1
- package/dist/DownloadFile/components/DownloadFileFull/info.js +1 -1
- package/dist/DownloadFile/components/DownloadFileHalf/DownloadFileHalf.js +1 -1
- package/dist/DownloadFile/components/DownloadFileHalf/info.js +1 -1
- package/dist/DownloadFile/components/DownloadFileMini/DownloadFileMini.js +1 -1
- package/dist/DownloadFile/components/DownloadFileMini/info.js +1 -1
- package/dist/DownloadFile/components/FileBannerSecondary/FileBannerSecondary.js +1 -1
- package/dist/DownloadFile/components/FileBannerSecondary/info.js +1 -1
- package/dist/Faq/Faq.js +2 -2
- package/dist/Faq/components/FeedbackForm/FeedbackForm.js +6 -55
- package/dist/Faq/components/FeedbackForm/index.js +1 -1
- package/dist/Faq/info.js +1 -1
- package/dist/FileLoader/fileLoader.js +22 -0
- package/dist/FileLoader/index.js +1787 -0
- package/dist/Footer/info.js +1 -1
- package/dist/Forms/FormDefault/componentTypes.js +31 -0
- package/dist/Forms/FormDefault/index.js +10 -273
- package/dist/Forms/FormDefault/info.js +104 -18
- package/dist/Forms/helpers/renderFormFields.js +7 -0
- package/dist/Forms/model/components.js +102 -0
- package/dist/Forms/types/formItems.js +1 -0
- package/dist/Header/components/HeaderTabsMobile/HeaderTabsMobile.js +2 -2
- package/dist/Header/components/TabsOutlined/TabsOutlined.js +2 -2
- package/dist/Header/info.js +1 -1
- package/dist/HeroPossibilityBanner/info.js +1 -1
- package/dist/InfoBanner/info.js +1 -1
- package/dist/InfoBannerList/InfoBannerList.js +1 -1
- package/dist/InfoBannerList/info.js +1 -1
- package/dist/InstructionList/InstructionList.js +1 -1
- package/dist/InstructionList/info.js +1 -1
- package/dist/IntroBanner/IntroBanner.js +1 -1
- package/dist/IntroBanner/info.js +1 -1
- package/dist/MainBanner/MainBanner.js +1 -1
- package/dist/MainBanner/info.js +1 -1
- package/dist/MultiCards/index.js +1 -1
- package/dist/MultiCards/info.js +1 -1
- package/dist/PageViewer/renderComponents.js +1 -1
- package/dist/Partners/Partners.js +1 -1
- package/dist/Partners/info.js +1 -1
- package/dist/PartnersColors/PartnersColors.js +1 -1
- package/dist/PartnersColors/info.js +1 -1
- package/dist/PreviewList/PreviewList.js +1 -1
- package/dist/PreviewList/info.js +1 -1
- package/dist/PromoPoster/PromoPoster.js +1 -1
- package/dist/PromoPoster/info.js +1 -1
- package/dist/RenderAllComponents/RenderAllComponents.js +1 -1
- package/dist/RenderAllComponents/const.js +1 -1
- package/dist/Segments/info.js +1 -1
- package/dist/Space/info.js +1 -1
- package/dist/StandartTable/index.js +1 -1
- package/dist/StandartTable/info.js +1 -1
- package/dist/Stepper/Stepper.js +1 -1
- package/dist/Stepper/info.js +1 -1
- package/dist/SwiperList/SwiperList.js +7 -7
- package/dist/SwiperList/info.js +1 -1
- package/dist/TasksBanner/info.js +1 -1
- package/dist/TasksBannerList/TasksBannerList.js +1 -1
- package/dist/TasksBannerList/info.js +1 -1
- package/dist/TitleBlock/TitleBlock.js +15 -0
- package/dist/TitleBlock/index.js +4 -0
- package/dist/TitleBlock/info.js +11 -0
- package/dist/TitleBlock/types.js +1 -0
- package/dist/Video/VideoFull/VideoFull.js +1 -1
- package/dist/Video/VideoFull/info.js +1 -1
- package/dist/Video/VideoList/VideoList.js +1 -1
- package/dist/Video/VideoList/info.js +1 -1
- package/dist/Video/VideoListMini/VideoListMini.js +1 -1
- package/dist/Video/VideoListMini/info.js +1 -1
- package/dist/VideoMainBanner/VideoMainBanner.js +1 -1
- package/dist/VideoMainBanner/info.js +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/{componentsMap-ae33b476.js → componentsMap-56a530ca.js} +38 -39
- package/dist/{data.mock-30d53d62.js → data.mock-9071e4ea.js} +54 -52
- package/dist/{index-b826f1c7.js → index-0a5f313c.js} +1 -1
- package/dist/index-a0ed2e4a.js +1221 -0
- package/dist/info-7ea3fd7e.js +1380 -0
- package/dist/main.js +59 -60
- package/dist/{mousewheel-2cf27f39.js → mousewheel-865ae601.js} +1 -1
- package/dist/{navigation-48c90d3b.js → navigation-b894d0cd.js} +1 -1
- package/dist/size-b1291031.js +8 -0
- package/dist/{swiper-react-bfbb44d6.js → swiper-react-90953710.js} +3 -3
- package/package.json +4 -1
- package/dist/ComponentContainer-841196f9.js +0 -16
- package/dist/index.esm-67811428.js +0 -1012
|
@@ -0,0 +1,1380 @@
|
|
|
1
|
+
import { C as U } from "./index-0a5f313c.js";
|
|
2
|
+
import { jsx as t, jsxs as i, Fragment as K } from "react/jsx-runtime";
|
|
3
|
+
import { warningCardVariant as fe, WarningCardVariant as O, WarningCardVariantKey as he } from "./Cards/WarningCard/model.js";
|
|
4
|
+
import "./ConfigProvider/index.js";
|
|
5
|
+
import { Banner as ge } from "./Banner/Banner.js";
|
|
6
|
+
import "./BannerAndText/index.js";
|
|
7
|
+
import { forwardRef as P, useState as I, useMemo as R, useEffect as xe, useRef as be, useImperativeHandle as J, useCallback as ye } from "react";
|
|
8
|
+
import { c as x } from "./cn-6a4bf187.js";
|
|
9
|
+
import "./Faq/components/Collapse/Collapse.js";
|
|
10
|
+
import "./Header/components/HeaderTabsMobile/HeaderTabsMobile.js";
|
|
11
|
+
import { HtmlContent as we } from "./HtmlContent/HtmlContent.js";
|
|
12
|
+
import "./Header/components/TabsOutlined/TabsOutlined.js";
|
|
13
|
+
import { B as E } from "./index-875e92ce.js";
|
|
14
|
+
import { B as ve, a as ke, b as Ce } from "./const-53dff524.js";
|
|
15
|
+
import { Stepper as De } from "./Stepper/Stepper.js";
|
|
16
|
+
import { Segments as Ne } from "./Segments/Segments.js";
|
|
17
|
+
import { VideoFull as Le } from "./Video/VideoFull/VideoFull.js";
|
|
18
|
+
import { VideoList as _e } from "./Video/VideoList/VideoList.js";
|
|
19
|
+
import { VideoListMini as Be } from "./Video/VideoListMini/VideoListMini.js";
|
|
20
|
+
import { ContentCardList as Se } from "./ContentCardList/ContentCardList.js";
|
|
21
|
+
import { CardIconList as Fe } from "./CardIconList/CardIconList.js";
|
|
22
|
+
import { MultiCards as Me } from "./MultiCards/index.js";
|
|
23
|
+
import { Partners as Ve } from "./Partners/Partners.js";
|
|
24
|
+
import { CardImageList as Ie } from "./CardImageList/CardImageList.js";
|
|
25
|
+
import { MainBanner as He } from "./MainBanner/MainBanner.js";
|
|
26
|
+
import { Faq as Te } from "./Faq/Faq.js";
|
|
27
|
+
import { InstructionList as Pe } from "./InstructionList/InstructionList.js";
|
|
28
|
+
import "./HeroPossibilityBanner/index.js";
|
|
29
|
+
import { PartnersColors as Ge } from "./PartnersColors/PartnersColors.js";
|
|
30
|
+
import { PreviewList as We } from "./PreviewList/PreviewList.js";
|
|
31
|
+
import "./Cards/CardImage/CardImage.js";
|
|
32
|
+
import "./Cards/ContentCard/ContentCard.js";
|
|
33
|
+
import "./Cards/ColoredCard/index.js";
|
|
34
|
+
import "./Cards/FeaturesCard/index.js";
|
|
35
|
+
import { DownloadFileBanner as je } from "./DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js";
|
|
36
|
+
import { DownloadFileFull as Oe } from "./DownloadFile/components/DownloadFileFull/DownloadFileFull.js";
|
|
37
|
+
import { DownloadFileHalf as Ze } from "./DownloadFile/components/DownloadFileHalf/DownloadFileHalf.js";
|
|
38
|
+
import { DownloadFileMini as Re } from "./DownloadFile/components/DownloadFileMini/DownloadFileMini.js";
|
|
39
|
+
import "./InstructionList/components/InstructionCard/InstructionCard.js";
|
|
40
|
+
import "./PreviewList/components/PreviewCard/PreviewCard.js";
|
|
41
|
+
import $e from "./AnimatedSwiper/index.js";
|
|
42
|
+
import "./CardImageSecondary/CardImageSecondary.js";
|
|
43
|
+
import { CardImageSecondaryList as Ae } from "./CardImageSecondaryList/CardImageSecondaryList.js";
|
|
44
|
+
import { CardInfoTable as Ee } from "./CardInfoTable/index.js";
|
|
45
|
+
import { DownloadFileBright as Xe } from "./DownloadFile/components/DownloadFileBright/index.js";
|
|
46
|
+
import "./DownloadFile/components/FileBannerSecondary/FileBannerSecondary.js";
|
|
47
|
+
import { C as qe, u as ze } from "./index-a0ed2e4a.js";
|
|
48
|
+
import { C as ee } from "./ComponentContainer-05e27e82.js";
|
|
49
|
+
import { u as Ye } from "./useScreenSize-c1b64c02.js";
|
|
50
|
+
import Ke from "./FileLoader/index.js";
|
|
51
|
+
import { u as X } from "./useClickOutside-197b0df2.js";
|
|
52
|
+
import { TitleBlock as Qe } from "./TitleBlock/TitleBlock.js";
|
|
53
|
+
import "./InfoBanner/index.js";
|
|
54
|
+
import { InfoBannerList as Ue } from "./InfoBannerList/InfoBannerList.js";
|
|
55
|
+
import { IntroBanner as Je } from "./IntroBanner/IntroBanner.js";
|
|
56
|
+
import { PromoPoster as et } from "./PromoPoster/PromoPoster.js";
|
|
57
|
+
import { Space as tt } from "./Space/Space.js";
|
|
58
|
+
import { StandartTable as rt } from "./StandartTable/index.js";
|
|
59
|
+
import { SwiperList as ot } from "./SwiperList/SwiperList.js";
|
|
60
|
+
import "./TasksBanner/TasksBanner.js";
|
|
61
|
+
import { TasksBannerList as at } from "./TasksBannerList/TasksBannerList.js";
|
|
62
|
+
import { VideoMainBanner as nt } from "./VideoMainBanner/VideoMainBanner.js";
|
|
63
|
+
import { M as st, B as it, C as lt, 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 xt, h as bt, W as yt, F as wt, k as vt, D as kt, l as Ct, m as Dt, I as Nt, o as Lt, p as _t, A as Bt, q as St, T as Ft, r as Mt, E as Vt, s as It, t as Ht, u as Tt, v as Pt, w as Gt, x as Wt } from "./data.mock-9071e4ea.js";
|
|
64
|
+
import { DataTypesEnum as jt, FieldTypes as j } from "./Types/FiledTypes.js";
|
|
65
|
+
import "./AnimatedSwiper/info.js";
|
|
66
|
+
import "./Banner/info.js";
|
|
67
|
+
import "./BannerAndText/info.js";
|
|
68
|
+
import "./CardIconList/info.js";
|
|
69
|
+
import "./CardImageList/info.js";
|
|
70
|
+
import "./CardImageSecondary/info.js";
|
|
71
|
+
import "./CardImageSecondaryList/info.js";
|
|
72
|
+
import "./CardInfoTable/info.js";
|
|
73
|
+
import "./Cards/CardImage/info.js";
|
|
74
|
+
import "./Cards/ColoredCard/info.js";
|
|
75
|
+
import "./Cards/ContentCard/info.js";
|
|
76
|
+
import "./Cards/FeaturesCard/info.js";
|
|
77
|
+
import "./ContentCardList/info.js";
|
|
78
|
+
import "./DownloadFile/components/DownloadFileBanner/info.js";
|
|
79
|
+
import "./DownloadFile/components/DownloadFileBright/info.js";
|
|
80
|
+
import "./DownloadFile/components/DownloadFileFull/info.js";
|
|
81
|
+
import "./DownloadFile/components/DownloadFileHalf/info.js";
|
|
82
|
+
import "./DownloadFile/components/DownloadFileMini/info.js";
|
|
83
|
+
import "./Faq/info.js";
|
|
84
|
+
import "./Footer/info.js";
|
|
85
|
+
import "./Header/info.js";
|
|
86
|
+
import "./HeroPossibilityBanner/info.js";
|
|
87
|
+
import "./InfoBanner/info.js";
|
|
88
|
+
import "./InfoBannerList/info.js";
|
|
89
|
+
import "./InstructionList/info.js";
|
|
90
|
+
import "./IntroBanner/info.js";
|
|
91
|
+
import "./MainBanner/info.js";
|
|
92
|
+
import "./MultiCards/info.js";
|
|
93
|
+
import "./Partners/info.js";
|
|
94
|
+
import "./PartnersColors/info.js";
|
|
95
|
+
import "./PreviewList/info.js";
|
|
96
|
+
import "./PromoPoster/info.js";
|
|
97
|
+
import "./Segments/info.js";
|
|
98
|
+
import "./Space/info.js";
|
|
99
|
+
import "./StandartTable/info.js";
|
|
100
|
+
import "./Stepper/info.js";
|
|
101
|
+
import "./SwiperList/info.js";
|
|
102
|
+
import "./TasksBanner/info.js";
|
|
103
|
+
import "./TasksBannerList/info.js";
|
|
104
|
+
import "./Video/VideoFull/info.js";
|
|
105
|
+
import "./Video/VideoList/info.js";
|
|
106
|
+
import "./Video/VideoListMini/info.js";
|
|
107
|
+
import "./VideoMainBanner/info.js";
|
|
108
|
+
import { componentTypes as Ot } from "./Forms/FormDefault/componentTypes.js";
|
|
109
|
+
import { Header as Zt } from "./Header/Header.js";
|
|
110
|
+
import { Footer as Rt } from "./Footer/Footer.js";
|
|
111
|
+
import { I as $t } from "./Icon-70ea6cb8.js";
|
|
112
|
+
const te = [
|
|
113
|
+
"title",
|
|
114
|
+
"title_color",
|
|
115
|
+
"description",
|
|
116
|
+
"description_color",
|
|
117
|
+
"html_content",
|
|
118
|
+
ve,
|
|
119
|
+
fe
|
|
120
|
+
], q = ({
|
|
121
|
+
title: a,
|
|
122
|
+
description: r,
|
|
123
|
+
button: o,
|
|
124
|
+
html_content: n,
|
|
125
|
+
variant: e = he.Orange
|
|
126
|
+
}) => {
|
|
127
|
+
var s, m, v, y;
|
|
128
|
+
return /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ t(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
className: "rounded-[24px] p-6",
|
|
132
|
+
style: { background: (s = O[e]) == null ? void 0 : s.background },
|
|
133
|
+
children: /* @__PURE__ */ i("div", { className: "flex gap-4 items-center justify-between", children: [
|
|
134
|
+
/* @__PURE__ */ i(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
className: "flex gap-[16px] items-center max-tablet:flex-col max-tablet:items-start max-tablet:gap-[12px]",
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ t(
|
|
140
|
+
$t,
|
|
141
|
+
{
|
|
142
|
+
name: (m = O[e]) == null ? void 0 : m.icon,
|
|
143
|
+
size: 40
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ i("div", { className: "flex flex-col gap-[4px] max-tablet:gap-0", children: [
|
|
147
|
+
/* @__PURE__ */ t(
|
|
148
|
+
"p",
|
|
149
|
+
{
|
|
150
|
+
className: x("text-[24px] leading-8 font-bold"),
|
|
151
|
+
style: { color: (v = O[e]) == null ? void 0 : v.textColor },
|
|
152
|
+
children: a
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ t(
|
|
156
|
+
"p",
|
|
157
|
+
{
|
|
158
|
+
className: "text-[16px] leading-6",
|
|
159
|
+
style: { color: (y = O[e]) == null ? void 0 : y.textColor },
|
|
160
|
+
children: r
|
|
161
|
+
}
|
|
162
|
+
),
|
|
163
|
+
n && /* @__PURE__ */ t(we, { data: n })
|
|
164
|
+
] })
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
/* @__PURE__ */ t(E, { ...o })
|
|
169
|
+
] })
|
|
170
|
+
}
|
|
171
|
+
) });
|
|
172
|
+
};
|
|
173
|
+
q.propsToEdit = te;
|
|
174
|
+
const re = P(
|
|
175
|
+
({
|
|
176
|
+
label: a,
|
|
177
|
+
options: r,
|
|
178
|
+
value: o = [],
|
|
179
|
+
onChange: n,
|
|
180
|
+
error: e,
|
|
181
|
+
className: s,
|
|
182
|
+
direction: m = "column"
|
|
183
|
+
}, v) => {
|
|
184
|
+
const y = (l) => {
|
|
185
|
+
if (!n)
|
|
186
|
+
return;
|
|
187
|
+
const N = o.includes(l) ? o.filter((k) => k !== l) : [...o, l];
|
|
188
|
+
n(N);
|
|
189
|
+
};
|
|
190
|
+
return /* @__PURE__ */ i(
|
|
191
|
+
"div",
|
|
192
|
+
{
|
|
193
|
+
ref: v,
|
|
194
|
+
className: x("flex flex-col gap-2", s),
|
|
195
|
+
children: [
|
|
196
|
+
a && /* @__PURE__ */ t("label", { className: "text-sm font-medium text-blackBG mb-1", children: a }),
|
|
197
|
+
/* @__PURE__ */ t(
|
|
198
|
+
"div",
|
|
199
|
+
{
|
|
200
|
+
className: x(
|
|
201
|
+
"flex gap-4",
|
|
202
|
+
m === "column" ? "flex-col" : "flex-row flex-wrap"
|
|
203
|
+
),
|
|
204
|
+
children: r.map((l) => /* @__PURE__ */ t(
|
|
205
|
+
z,
|
|
206
|
+
{
|
|
207
|
+
label: l.label,
|
|
208
|
+
checked: o.includes(l.value),
|
|
209
|
+
onChange: () => y(l.value),
|
|
210
|
+
error: e && o.length === 0 ? e : void 0
|
|
211
|
+
},
|
|
212
|
+
l.value
|
|
213
|
+
))
|
|
214
|
+
}
|
|
215
|
+
),
|
|
216
|
+
e && /* @__PURE__ */ t("p", { className: "mt-1 text-sm text-red-500", children: e })
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
);
|
|
222
|
+
re.displayName = "CheckboxGroup";
|
|
223
|
+
const z = P(
|
|
224
|
+
({ className: a, label: r, error: o, ...n }, e) => /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
225
|
+
/* @__PURE__ */ i("label", { className: "flex items-start gap-3 cursor-pointer group", children: [
|
|
226
|
+
/* @__PURE__ */ i("div", { className: "relative flex items-center justify-center mt-0.5", children: [
|
|
227
|
+
/* @__PURE__ */ t(
|
|
228
|
+
"input",
|
|
229
|
+
{
|
|
230
|
+
type: "checkbox",
|
|
231
|
+
className: "peer sr-only",
|
|
232
|
+
ref: e,
|
|
233
|
+
...n
|
|
234
|
+
}
|
|
235
|
+
),
|
|
236
|
+
/* @__PURE__ */ t(
|
|
237
|
+
"div",
|
|
238
|
+
{
|
|
239
|
+
className: x(
|
|
240
|
+
"relative flex items-center justify-center w-5 h-5 rounded-md border-2 transition-all duration-200",
|
|
241
|
+
"border-grayBlue5 bg-white",
|
|
242
|
+
"peer-checked:bg-greenLight peer-checked:border-greenLight",
|
|
243
|
+
"peer-focus:outline-none peer-focus:border-greenLight",
|
|
244
|
+
"peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
245
|
+
"group-hover:border-greenLight",
|
|
246
|
+
'after:content-[""] after:absolute after:opacity-0 after:transition-opacity after:duration-200',
|
|
247
|
+
"after:w-[6px] after:h-[10px] after:border-r-2 after:border-b-2 after:border-white",
|
|
248
|
+
"after:rotate-45 after:-translate-x-[2px] after:translate-y-[-2px] after:top-1/2 after:left-1/2",
|
|
249
|
+
"after:translate-y-[-50%] after:translate-x-[-50%] peer-checked:after:opacity-100",
|
|
250
|
+
o && "border-red-500",
|
|
251
|
+
a
|
|
252
|
+
)
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
] }),
|
|
256
|
+
r && /* @__PURE__ */ t(
|
|
257
|
+
"span",
|
|
258
|
+
{
|
|
259
|
+
className: x(
|
|
260
|
+
"text-sm leading-5 text-graySoft select-none",
|
|
261
|
+
"group-hover:text-blackBG transition-colors duration-200",
|
|
262
|
+
o && "text-red-500"
|
|
263
|
+
),
|
|
264
|
+
children: r
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
] }),
|
|
268
|
+
o && /* @__PURE__ */ t("p", { className: "mt-2 text-sm text-red-500", children: o })
|
|
269
|
+
] })
|
|
270
|
+
);
|
|
271
|
+
z.displayName = "Checkbox";
|
|
272
|
+
const oe = P(
|
|
273
|
+
({ className: a, type: r, error: o, label: n, ...e }, s) => /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
274
|
+
n && /* @__PURE__ */ t("label", { className: "block text-sm font-medium text-blackBG mb-2", children: n }),
|
|
275
|
+
/* @__PURE__ */ t(
|
|
276
|
+
"input",
|
|
277
|
+
{
|
|
278
|
+
type: r,
|
|
279
|
+
className: x(
|
|
280
|
+
"flex h-14 w-full rounded-2xl border-[1px] border-grayBlue bg-white px-[16px] py-[16px] text-base",
|
|
281
|
+
"placeholder:text-gray2 placeholder:opacity-60",
|
|
282
|
+
"transition-all duration-300 ease-in-out",
|
|
283
|
+
"hover:border-greenLight hover:shadow-[0_0_0_4px_rgba(22,163,74,0.1)]",
|
|
284
|
+
"focus:border-greenLight focus:outline-none focus:shadow-[0_0_0_4px_rgba(22,163,74,0.15)] focus:ring-0",
|
|
285
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-lightGray",
|
|
286
|
+
o && "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_4px_rgba(239,68,68,0.15)]",
|
|
287
|
+
a
|
|
288
|
+
),
|
|
289
|
+
ref: s,
|
|
290
|
+
...e
|
|
291
|
+
}
|
|
292
|
+
),
|
|
293
|
+
o && /* @__PURE__ */ t("p", { className: "mt-2 text-sm text-red-500", children: o })
|
|
294
|
+
] })
|
|
295
|
+
);
|
|
296
|
+
oe.displayName = "Input";
|
|
297
|
+
const At = () => /* @__PURE__ */ t(
|
|
298
|
+
"svg",
|
|
299
|
+
{
|
|
300
|
+
width: "20",
|
|
301
|
+
height: "20",
|
|
302
|
+
viewBox: "0 0 20 20",
|
|
303
|
+
fill: "none",
|
|
304
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
305
|
+
children: /* @__PURE__ */ t(
|
|
306
|
+
"path",
|
|
307
|
+
{
|
|
308
|
+
d: "M18.3327 9.16669V10.1667H19.3327V9.16669H18.3327ZM1.66602 9.16669H0.666016V10.1667H1.66602V9.16669ZM4.99935 4.16669V5.16669H14.9993V4.16669V3.16669H4.99935V4.16669ZM18.3327 7.50002H17.3327V14.1667H18.3327H19.3327V7.50002H18.3327ZM14.9993 17.5V16.5H4.99935V17.5V18.5H14.9993V17.5ZM1.66602 14.1667H2.66602V7.50002H1.66602H0.666016V14.1667H1.66602ZM4.99935 17.5V16.5C4.1854 16.5 3.67555 16.4979 3.30381 16.4479C2.96084 16.4018 2.88859 16.3321 2.86128 16.3048L2.15417 17.0119L1.44706 17.719C1.90791 18.1798 2.47257 18.3542 3.03731 18.4301C3.57329 18.5021 4.24194 18.5 4.99935 18.5V17.5ZM1.66602 14.1667H0.666016C0.666016 14.9241 0.663892 15.5927 0.735952 16.1287C0.81188 16.6935 0.986218 17.2581 1.44706 17.719L2.15417 17.0119L2.86128 16.3048C2.83397 16.2774 2.76423 16.2052 2.71812 15.8622C2.66814 15.4905 2.66602 14.9806 2.66602 14.1667H1.66602ZM18.3327 14.1667H17.3327C17.3327 14.9806 17.3306 15.4905 17.2806 15.8622C17.2345 16.2052 17.1647 16.2774 17.1374 16.3048L17.8445 17.0119L18.5516 17.719C19.0125 17.2581 19.1868 16.6935 19.2627 16.1287C19.3348 15.5927 19.3327 14.9241 19.3327 14.1667H18.3327ZM14.9993 17.5V18.5C15.7568 18.5 16.4254 18.5021 16.9614 18.4301C17.5261 18.3542 18.0908 18.1798 18.5516 17.719L17.8445 17.0119L17.1374 16.3048C17.1101 16.3321 17.0379 16.4018 16.6949 16.4479C16.3232 16.4979 15.8133 16.5 14.9993 16.5V17.5ZM14.9993 4.16669V5.16669C15.8133 5.16669 16.3232 5.16881 16.6949 5.21879C17.0379 5.2649 17.1101 5.33464 17.1374 5.36195L17.8445 4.65484L18.5516 3.94774C18.0908 3.48689 17.5261 3.31255 16.9614 3.23662C16.4254 3.16456 15.7568 3.16669 14.9993 3.16669V4.16669ZM18.3327 7.50002H19.3327C19.3327 6.74262 19.3348 6.07396 19.2627 5.53799C19.1868 4.97324 19.0125 4.40858 18.5516 3.94774L17.8445 4.65484L17.1374 5.36195C17.1647 5.38926 17.2345 5.46151 17.2806 5.80448C17.3306 6.17622 17.3327 6.68608 17.3327 7.50002H18.3327ZM4.99935 4.16669V3.16669C4.24194 3.16669 3.57329 3.16456 3.03732 3.23662C2.47257 3.31255 1.90791 3.48689 1.44706 3.94774L2.15417 4.65484L2.86128 5.36195C2.88859 5.33464 2.96084 5.2649 3.30381 5.21879C3.67555 5.16881 4.1854 5.16669 4.99935 5.16669V4.16669ZM1.66602 7.50002H2.66602C2.66602 6.68608 2.66814 6.17622 2.71812 5.80448C2.76423 5.46151 2.83397 5.38926 2.86128 5.36195L2.15417 4.65484L1.44706 3.94774C0.986218 4.40858 0.81188 4.97324 0.735952 5.53799C0.663892 6.07396 0.666016 6.74262 0.666016 7.50002H1.66602ZM18.3327 7.50002H17.3327V9.16669H18.3327H19.3327V7.50002H18.3327ZM18.3327 9.16669V8.16669H1.66602V9.16669V10.1667H18.3327V9.16669ZM1.66602 9.16669H2.66602V7.50002H1.66602H0.666016V9.16669H1.66602ZM5.83268 1.66669H4.83268V4.16669H5.83268H6.83268V1.66669H5.83268ZM14.166 1.66669H13.166V4.16669H14.166H15.166V1.66669H14.166ZM14.166 14.1667V15.1667H15.8327V14.1667V13.1667H14.166V14.1667Z",
|
|
309
|
+
fill: "#40474F"
|
|
310
|
+
}
|
|
311
|
+
)
|
|
312
|
+
}
|
|
313
|
+
), Et = (a) => {
|
|
314
|
+
if (!a)
|
|
315
|
+
return "";
|
|
316
|
+
const r = String(a.getDate()).padStart(2, "0"), o = String(a.getMonth() + 1).padStart(2, "0"), n = a.getFullYear();
|
|
317
|
+
return `${r}.${o}.${n}`;
|
|
318
|
+
}, Xt = (a) => {
|
|
319
|
+
if (!a)
|
|
320
|
+
return null;
|
|
321
|
+
const r = a.split(".");
|
|
322
|
+
if (r.length === 3) {
|
|
323
|
+
const o = parseInt(r[0], 10), n = parseInt(r[1], 10) - 1, e = parseInt(r[2], 10);
|
|
324
|
+
if (!isNaN(o) && !isNaN(n) && !isNaN(e)) {
|
|
325
|
+
const s = new Date(e, n, o);
|
|
326
|
+
if (s.getDate() === o && s.getMonth() === n && s.getFullYear() === e)
|
|
327
|
+
return s;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
return null;
|
|
331
|
+
}, qt = (a, r) => new Date(r, a, 1).toLocaleDateString("ru-RU", { month: "long", year: "numeric" }), zt = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], ae = P(
|
|
332
|
+
({
|
|
333
|
+
className: a,
|
|
334
|
+
error: r,
|
|
335
|
+
label: o,
|
|
336
|
+
value: n,
|
|
337
|
+
onChange: e,
|
|
338
|
+
placeholder: s = "Дата обращения в Контакт-центр",
|
|
339
|
+
...m
|
|
340
|
+
}, v) => {
|
|
341
|
+
const [y, l] = I(""), [N, k] = I(!1), [c, C] = I((/* @__PURE__ */ new Date()).getMonth()), [h, b] = I((/* @__PURE__ */ new Date()).getFullYear()), [u, F] = I(null), M = n !== void 0, w = M ? n : y, { ref: L } = X(N, () => {
|
|
342
|
+
k(!1);
|
|
343
|
+
}), B = R(() => Xt(w), [w]);
|
|
344
|
+
xe(() => {
|
|
345
|
+
B && (F(B), C(B.getMonth()), b(B.getFullYear()));
|
|
346
|
+
}, [B]);
|
|
347
|
+
const H = R(() => {
|
|
348
|
+
const f = new Date(h, c, 1), V = new Date(h, c + 1, 0).getDate(), p = f.getDay(), D = [], G = new Date(h, c, 0).getDate();
|
|
349
|
+
for (let S = p - 1; S >= 0; S--)
|
|
350
|
+
D.push(G - S);
|
|
351
|
+
for (let S = 1; S <= V; S++)
|
|
352
|
+
D.push(S);
|
|
353
|
+
const T = 42 - D.length;
|
|
354
|
+
for (let S = 1; S <= T; S++)
|
|
355
|
+
D.push(S);
|
|
356
|
+
return D;
|
|
357
|
+
}, [c, h]), W = (f) => {
|
|
358
|
+
const d = f.target.value;
|
|
359
|
+
M || l(d), e == null || e(d);
|
|
360
|
+
}, $ = (f, d, V) => {
|
|
361
|
+
if (f === null)
|
|
362
|
+
return;
|
|
363
|
+
let p = c, D = h;
|
|
364
|
+
d ? (p = p - 1, p < 0 && (p = 11, D = D - 1)) : V && (p = p + 1, p > 11 && (p = 0, D = D + 1));
|
|
365
|
+
const G = new Date(D, p, f), T = Et(G);
|
|
366
|
+
F(G), C(p), b(D), M || l(T), e == null || e(T), k(!1);
|
|
367
|
+
}, A = () => {
|
|
368
|
+
c === 0 ? (C(11), b(h - 1)) : C(c - 1);
|
|
369
|
+
}, g = () => {
|
|
370
|
+
c === 11 ? (C(0), b(h + 1)) : C(c + 1);
|
|
371
|
+
}, _ = (f, d, V) => {
|
|
372
|
+
if (!u || f === null)
|
|
373
|
+
return !1;
|
|
374
|
+
let p = c, D = h;
|
|
375
|
+
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;
|
|
376
|
+
};
|
|
377
|
+
return /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
378
|
+
o && /* @__PURE__ */ t("label", { className: "block text-sm font-medium text-blackBG mb-2", children: o }),
|
|
379
|
+
/* @__PURE__ */ i("div", { className: "relative", children: [
|
|
380
|
+
/* @__PURE__ */ i(
|
|
381
|
+
"div",
|
|
382
|
+
{
|
|
383
|
+
className: x(
|
|
384
|
+
"relative flex items-center h-14 w-full rounded-2xl border-[1px] border-grayBlue bg-white",
|
|
385
|
+
"transition-all duration-300 ease-in-out",
|
|
386
|
+
"hover:border-greenLight hover:shadow-[0_0_0_4px_rgba(22,163,74,0.1)]",
|
|
387
|
+
"focus-within:border-greenLight focus-within:shadow-[0_0_0_4px_rgba(22,163,74,0.15)]",
|
|
388
|
+
r && "border-red-500 hover:border-red-500 focus-within:border-red-500 focus-within:shadow-[0_0_0_4px_rgba(239,68,68,0.15)]",
|
|
389
|
+
a
|
|
390
|
+
),
|
|
391
|
+
children: [
|
|
392
|
+
/* @__PURE__ */ t(
|
|
393
|
+
"button",
|
|
394
|
+
{
|
|
395
|
+
type: "button",
|
|
396
|
+
onClick: () => k(!N),
|
|
397
|
+
className: "absolute left-4 flex items-center justify-center cursor-pointer",
|
|
398
|
+
tabIndex: -1,
|
|
399
|
+
children: /* @__PURE__ */ t(At, {})
|
|
400
|
+
}
|
|
401
|
+
),
|
|
402
|
+
/* @__PURE__ */ t(
|
|
403
|
+
"input",
|
|
404
|
+
{
|
|
405
|
+
type: "text",
|
|
406
|
+
inputMode: "none",
|
|
407
|
+
className: x(
|
|
408
|
+
"flex h-full w-full rounded-2xl px-[16px] pl-[48px] py-[16px] text-base",
|
|
409
|
+
"placeholder:text-gray2 placeholder:opacity-60",
|
|
410
|
+
"bg-transparent border-none outline-none",
|
|
411
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
412
|
+
),
|
|
413
|
+
ref: v,
|
|
414
|
+
value: w,
|
|
415
|
+
onChange: W,
|
|
416
|
+
placeholder: s,
|
|
417
|
+
onClick: () => k(!0),
|
|
418
|
+
readOnly: !0,
|
|
419
|
+
...m
|
|
420
|
+
}
|
|
421
|
+
)
|
|
422
|
+
]
|
|
423
|
+
}
|
|
424
|
+
),
|
|
425
|
+
N && /* @__PURE__ */ i(
|
|
426
|
+
"div",
|
|
427
|
+
{
|
|
428
|
+
ref: L,
|
|
429
|
+
className: "absolute top-[calc(100%+8px)] left-0 z-50 bg-white rounded-2xl border border-grayBlue shadow-lg p-4 min-w-[320px]",
|
|
430
|
+
children: [
|
|
431
|
+
/* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4", children: [
|
|
432
|
+
/* @__PURE__ */ t(
|
|
433
|
+
"button",
|
|
434
|
+
{
|
|
435
|
+
type: "button",
|
|
436
|
+
onClick: A,
|
|
437
|
+
className: "p-2 hover:bg-grayBlue rounded-lg transition-colors",
|
|
438
|
+
children: /* @__PURE__ */ t(
|
|
439
|
+
"svg",
|
|
440
|
+
{
|
|
441
|
+
width: "16",
|
|
442
|
+
height: "16",
|
|
443
|
+
viewBox: "0 0 16 16",
|
|
444
|
+
fill: "none",
|
|
445
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
446
|
+
children: /* @__PURE__ */ t(
|
|
447
|
+
"path",
|
|
448
|
+
{
|
|
449
|
+
d: "M10 12L6 8L10 4",
|
|
450
|
+
stroke: "currentColor",
|
|
451
|
+
strokeWidth: "2",
|
|
452
|
+
strokeLinecap: "round",
|
|
453
|
+
strokeLinejoin: "round"
|
|
454
|
+
}
|
|
455
|
+
)
|
|
456
|
+
}
|
|
457
|
+
)
|
|
458
|
+
}
|
|
459
|
+
),
|
|
460
|
+
/* @__PURE__ */ t("h3", { className: "text-base font-semibold text-blackBG", children: qt(c, h) }),
|
|
461
|
+
/* @__PURE__ */ t(
|
|
462
|
+
"button",
|
|
463
|
+
{
|
|
464
|
+
type: "button",
|
|
465
|
+
onClick: g,
|
|
466
|
+
className: "p-2 hover:bg-grayBlue rounded-lg transition-colors",
|
|
467
|
+
children: /* @__PURE__ */ t(
|
|
468
|
+
"svg",
|
|
469
|
+
{
|
|
470
|
+
width: "16",
|
|
471
|
+
height: "16",
|
|
472
|
+
viewBox: "0 0 16 16",
|
|
473
|
+
fill: "none",
|
|
474
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
475
|
+
children: /* @__PURE__ */ t(
|
|
476
|
+
"path",
|
|
477
|
+
{
|
|
478
|
+
d: "M6 4L10 8L6 12",
|
|
479
|
+
stroke: "currentColor",
|
|
480
|
+
strokeWidth: "2",
|
|
481
|
+
strokeLinecap: "round",
|
|
482
|
+
strokeLinejoin: "round"
|
|
483
|
+
}
|
|
484
|
+
)
|
|
485
|
+
}
|
|
486
|
+
)
|
|
487
|
+
}
|
|
488
|
+
)
|
|
489
|
+
] }),
|
|
490
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-7 gap-1 mb-2", children: zt.map((f) => /* @__PURE__ */ t(
|
|
491
|
+
"div",
|
|
492
|
+
{
|
|
493
|
+
className: "text-center text-xs font-medium text-grayBlue5 py-2",
|
|
494
|
+
children: f
|
|
495
|
+
},
|
|
496
|
+
f
|
|
497
|
+
)) }),
|
|
498
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-7 gap-1", children: H.map((f, d) => {
|
|
499
|
+
const p = new Date(h, c, 1).getDay(), D = new Date(
|
|
500
|
+
h,
|
|
501
|
+
c + 1,
|
|
502
|
+
0
|
|
503
|
+
).getDate(), G = d < p, T = d >= p + D, S = !G && !T, ue = _(
|
|
504
|
+
f,
|
|
505
|
+
G,
|
|
506
|
+
T
|
|
507
|
+
);
|
|
508
|
+
return /* @__PURE__ */ t(
|
|
509
|
+
"button",
|
|
510
|
+
{
|
|
511
|
+
type: "button",
|
|
512
|
+
onClick: () => $(f, G, T),
|
|
513
|
+
disabled: f === null,
|
|
514
|
+
className: x(
|
|
515
|
+
"w-10 h-10 rounded-lg text-sm font-medium transition-colors",
|
|
516
|
+
"hover:bg-[#E8F4FD] focus:outline-none focus:bg-[#E8F4FD]",
|
|
517
|
+
S ? "text-blackBG" : "text-grayBlue5 opacity-50",
|
|
518
|
+
ue && "bg-[#16A34A] text-white hover:bg-[#16A34A] focus:bg-[#16A34A]"
|
|
519
|
+
),
|
|
520
|
+
children: f
|
|
521
|
+
},
|
|
522
|
+
d
|
|
523
|
+
);
|
|
524
|
+
}) })
|
|
525
|
+
]
|
|
526
|
+
}
|
|
527
|
+
)
|
|
528
|
+
] }),
|
|
529
|
+
r && /* @__PURE__ */ t("p", { className: "mt-2 text-sm text-red-500", children: r })
|
|
530
|
+
] });
|
|
531
|
+
}
|
|
532
|
+
);
|
|
533
|
+
ae.displayName = "DateInput";
|
|
534
|
+
const ne = P(
|
|
535
|
+
({
|
|
536
|
+
className: a,
|
|
537
|
+
isFormatted: r,
|
|
538
|
+
isReadable: o,
|
|
539
|
+
error: n,
|
|
540
|
+
label: e,
|
|
541
|
+
onChange: s,
|
|
542
|
+
value: m,
|
|
543
|
+
defaultValue: v,
|
|
544
|
+
...y
|
|
545
|
+
}, l) => {
|
|
546
|
+
const N = be(null);
|
|
547
|
+
J(l, () => N.current);
|
|
548
|
+
const k = !!o || !!r, c = ye(
|
|
549
|
+
(b) => {
|
|
550
|
+
if (b == null || b === "")
|
|
551
|
+
return "";
|
|
552
|
+
const u = Array.isArray(b) ? b.join("").replace(/\D/g, "") : b.toString().replace(/\D/g, "");
|
|
553
|
+
return k ? u.replace(/\B(?=(\d{3})+(?!\d))/g, " ") : u;
|
|
554
|
+
},
|
|
555
|
+
[k]
|
|
556
|
+
), h = {
|
|
557
|
+
...y,
|
|
558
|
+
type: "text",
|
|
559
|
+
inputMode: "numeric",
|
|
560
|
+
onChange: (b) => {
|
|
561
|
+
const u = b.target, F = u.value, M = F.replace(/\D/g, ""), w = u.selectionStart || 0, L = F.slice(0, w).replace(/\D/g, "").length, B = c(M);
|
|
562
|
+
if (u.value = B, s) {
|
|
563
|
+
const H = u.value;
|
|
564
|
+
u.value = M, s(b), u.value = H;
|
|
565
|
+
}
|
|
566
|
+
if (k) {
|
|
567
|
+
let H = 0, W = 0;
|
|
568
|
+
for (; W < L && H < u.value.length; )
|
|
569
|
+
/\d/.test(u.value[H]) && W++, H++;
|
|
570
|
+
u.setSelectionRange(H, H);
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
className: x(
|
|
574
|
+
"flex h-14 w-full rounded-2xl border-[1px] border-grayBlue bg-white px-[16px] py-[16px] text-base text-blackBG",
|
|
575
|
+
"placeholder:text-gray2 placeholder:opacity-60",
|
|
576
|
+
"transition-all duration-300 ease-in-out",
|
|
577
|
+
"hover:border-greenLight hover:shadow-[0_0_0_4px_rgba(22,163,74,0.1)]",
|
|
578
|
+
"focus:border-greenLight focus:outline-none focus:ring-0 focus:shadow-[0_0_0_4px_rgba(22,163,74,0.15)]",
|
|
579
|
+
"disabled:cursor-not-allowed disabled:bg-lightGray disabled:opacity-50",
|
|
580
|
+
"[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
581
|
+
n && "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_4px_rgba(239,68,68,0.15)]",
|
|
582
|
+
a
|
|
583
|
+
)
|
|
584
|
+
};
|
|
585
|
+
return m !== void 0 ? h.value = c(m) : v !== void 0 && (h.defaultValue = c(v)), /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
586
|
+
e && /* @__PURE__ */ t("label", { className: "mb-2 block text-sm font-medium text-blackBG", children: e }),
|
|
587
|
+
/* @__PURE__ */ t("div", { className: "group relative", children: /* @__PURE__ */ t(
|
|
588
|
+
"input",
|
|
589
|
+
{
|
|
590
|
+
...h,
|
|
591
|
+
ref: N
|
|
592
|
+
}
|
|
593
|
+
) }),
|
|
594
|
+
n && /* @__PURE__ */ t("p", { className: "mt-2 text-sm text-red-500", children: n })
|
|
595
|
+
] });
|
|
596
|
+
}
|
|
597
|
+
);
|
|
598
|
+
ne.displayName = "NumberField";
|
|
599
|
+
const Yt = {
|
|
600
|
+
96: { name: "Кыргызстан", short: "KG", mask: "+996", length: 9 }
|
|
601
|
+
}, Kt = (a) => {
|
|
602
|
+
const r = a.toUpperCase().split("").map((o) => 127397 + o.charCodeAt(0));
|
|
603
|
+
return String.fromCodePoint(...r);
|
|
604
|
+
}, Y = () => Object.entries(Yt).map(([a, r]) => ({
|
|
605
|
+
id: a,
|
|
606
|
+
name: r.name,
|
|
607
|
+
short: r.short,
|
|
608
|
+
mask: r.mask,
|
|
609
|
+
dialCode: r.mask.replace("+", ""),
|
|
610
|
+
length: r.length,
|
|
611
|
+
flag: Kt(r.short)
|
|
612
|
+
})), Z = (a) => Y().find((o) => o.id === a), Q = (a, r) => {
|
|
613
|
+
const o = r.dialCode, n = r.length;
|
|
614
|
+
let e = a;
|
|
615
|
+
a.startsWith(o) && (e = a.slice(o.length));
|
|
616
|
+
const s = e.slice(0, n);
|
|
617
|
+
if (s.length === 0)
|
|
618
|
+
return r.mask;
|
|
619
|
+
let m = s;
|
|
620
|
+
return s.length > 6 ? m = `${s.slice(0, 3)} ${s.slice(3, 6)} ${s.slice(6)}` : s.length > 3 && (m = `${s.slice(0, 3)} ${s.slice(3)}`), `${r.mask} ${m}`;
|
|
621
|
+
}, Qt = (a, r) => {
|
|
622
|
+
if (!a)
|
|
623
|
+
return null;
|
|
624
|
+
const o = a.replace(/\D/g, ""), n = Y();
|
|
625
|
+
if (a.startsWith("+")) {
|
|
626
|
+
for (const e of n)
|
|
627
|
+
if (a.startsWith(e.mask))
|
|
628
|
+
return e;
|
|
629
|
+
}
|
|
630
|
+
for (const e of n)
|
|
631
|
+
if (o.startsWith(e.dialCode))
|
|
632
|
+
return e;
|
|
633
|
+
return o.startsWith("0") && Z("96") || null;
|
|
634
|
+
}, se = P(
|
|
635
|
+
({
|
|
636
|
+
className: a,
|
|
637
|
+
error: r,
|
|
638
|
+
label: o,
|
|
639
|
+
value: n,
|
|
640
|
+
onChange: e,
|
|
641
|
+
defaultCountry: s = "996",
|
|
642
|
+
...m
|
|
643
|
+
}, v) => {
|
|
644
|
+
const [y, l] = I(""), [N, k] = I(s), [c, C] = I(!1), [h, b] = I(""), u = n !== void 0, F = u ? n : y, { ref: M } = X(c, () => {
|
|
645
|
+
C(!1), b("");
|
|
646
|
+
}), w = R(() => Y(), []), L = Z(N) || w[0], B = R(() => {
|
|
647
|
+
if (!h)
|
|
648
|
+
return w;
|
|
649
|
+
const g = h.toLowerCase();
|
|
650
|
+
return w.filter(
|
|
651
|
+
(_) => _.name.toLowerCase().includes(g) || _.mask.toLowerCase().includes(g) || _.short.toLowerCase().includes(g)
|
|
652
|
+
);
|
|
653
|
+
}, [w, h]), W = ((g) => {
|
|
654
|
+
if (!g)
|
|
655
|
+
return "";
|
|
656
|
+
const _ = g.replace(/\D/g, "");
|
|
657
|
+
let f = _;
|
|
658
|
+
(_.startsWith(L.dialCode) || g.startsWith(L.mask)) && (f = _.slice(L.dialCode.length));
|
|
659
|
+
const d = f.slice(0, L.length);
|
|
660
|
+
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)}`;
|
|
661
|
+
})(F), $ = (g) => {
|
|
662
|
+
k(g), C(!1), b("");
|
|
663
|
+
const _ = F.replace(/\D/g, ""), f = Z(g);
|
|
664
|
+
if (!f)
|
|
665
|
+
return;
|
|
666
|
+
let d = _;
|
|
667
|
+
_.startsWith(L.dialCode) && (d = _.slice(L.dialCode.length));
|
|
668
|
+
const V = Q(d, f);
|
|
669
|
+
u || l(V), e == null || e(V);
|
|
670
|
+
}, A = (g) => {
|
|
671
|
+
const _ = g.target.value, f = _.replace(/\D/g, ""), d = Qt(
|
|
672
|
+
_
|
|
673
|
+
);
|
|
674
|
+
d && d.id !== N && k(d.id);
|
|
675
|
+
const V = d || Z(N) || L, p = Q(f, V);
|
|
676
|
+
u || l(p), e == null || e(p);
|
|
677
|
+
};
|
|
678
|
+
return /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
679
|
+
o && /* @__PURE__ */ t("label", { className: "block text-sm font-medium text-blackBG mb-2", children: o }),
|
|
680
|
+
/* @__PURE__ */ i(
|
|
681
|
+
"div",
|
|
682
|
+
{
|
|
683
|
+
className: x(
|
|
684
|
+
"relative flex gap-2 h-14 flex-1 rounded-2xl border-[1px] border-grayBlue bg-white text-base",
|
|
685
|
+
"placeholder:text-gray2 placeholder:opacity-60",
|
|
686
|
+
"transition-all duration-300 ease-in-out",
|
|
687
|
+
"hover:border-greenLight hover:shadow-[0_0_0_4px_rgba(22,163,74,0.1)]",
|
|
688
|
+
"focus:border-greenLight focus:outline-none focus:shadow-[0_0_0_4px_rgba(22,163,74,0.15)] focus:ring-0",
|
|
689
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-lightGray",
|
|
690
|
+
r && "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_4px_rgba(239,68,68,0.15)]",
|
|
691
|
+
a
|
|
692
|
+
),
|
|
693
|
+
children: [
|
|
694
|
+
/* @__PURE__ */ i(
|
|
695
|
+
"div",
|
|
696
|
+
{
|
|
697
|
+
ref: M,
|
|
698
|
+
className: "relative",
|
|
699
|
+
children: [
|
|
700
|
+
/* @__PURE__ */ i(
|
|
701
|
+
"button",
|
|
702
|
+
{
|
|
703
|
+
type: "button",
|
|
704
|
+
onClick: () => C(!c),
|
|
705
|
+
className: x(
|
|
706
|
+
"flex h-14 w-[120px] rounded-2xl px-3 py-2 items-center justify-center cursor-pointer shrink-0",
|
|
707
|
+
"transition-all duration-300 ease-in-out",
|
|
708
|
+
r && "border-red-500 hover:border-red-500 focus:border-red-500",
|
|
709
|
+
c && "border-greenLight"
|
|
710
|
+
),
|
|
711
|
+
children: [
|
|
712
|
+
/* @__PURE__ */ i("span", { className: "text-base font-medium whitespace-nowrap", children: [
|
|
713
|
+
L.flag,
|
|
714
|
+
" ",
|
|
715
|
+
L.mask
|
|
716
|
+
] }),
|
|
717
|
+
/* @__PURE__ */ t(
|
|
718
|
+
"svg",
|
|
719
|
+
{
|
|
720
|
+
className: x(
|
|
721
|
+
"w-4 h-4 ml-1 text-grayBlue5 transition-transform duration-200 shrink-0",
|
|
722
|
+
c && "rotate-180"
|
|
723
|
+
),
|
|
724
|
+
fill: "none",
|
|
725
|
+
stroke: "currentColor",
|
|
726
|
+
viewBox: "0 0 24 24",
|
|
727
|
+
children: /* @__PURE__ */ t(
|
|
728
|
+
"path",
|
|
729
|
+
{
|
|
730
|
+
strokeLinecap: "round",
|
|
731
|
+
strokeLinejoin: "round",
|
|
732
|
+
strokeWidth: 2,
|
|
733
|
+
d: "M19 9l-7 7-7-7"
|
|
734
|
+
}
|
|
735
|
+
)
|
|
736
|
+
}
|
|
737
|
+
)
|
|
738
|
+
]
|
|
739
|
+
}
|
|
740
|
+
),
|
|
741
|
+
c && /* @__PURE__ */ i("div", { className: "absolute top-[calc(100%+4px)] left-0 z-50 bg-white rounded-2xl border border-grayBlue shadow-lg max-h-[400px] overflow-hidden flex flex-col min-w-[280px]", children: [
|
|
742
|
+
/* @__PURE__ */ t("div", { className: "p-3 border-b border-grayBlue", children: /* @__PURE__ */ t(
|
|
743
|
+
"input",
|
|
744
|
+
{
|
|
745
|
+
type: "text",
|
|
746
|
+
value: h,
|
|
747
|
+
onChange: (g) => b(g.target.value),
|
|
748
|
+
placeholder: "Поиск страны...",
|
|
749
|
+
className: x(
|
|
750
|
+
"w-full px-3 py-2 rounded-xl border-[1px] border-grayBlue text-sm",
|
|
751
|
+
"focus:outline-none focus:border-greenLight"
|
|
752
|
+
),
|
|
753
|
+
onClick: (g) => g.stopPropagation()
|
|
754
|
+
}
|
|
755
|
+
) }),
|
|
756
|
+
/* @__PURE__ */ t("div", { className: "overflow-y-auto max-h-[340px]", children: B.length > 0 ? B.map((g) => /* @__PURE__ */ t(
|
|
757
|
+
"button",
|
|
758
|
+
{
|
|
759
|
+
type: "button",
|
|
760
|
+
onClick: () => $(g.id),
|
|
761
|
+
className: x(
|
|
762
|
+
"w-full px-4 py-3 text-left cursor-pointer text-base text-blackBG transition-colors",
|
|
763
|
+
"hover:bg-[#E8F4FD] focus:bg-[#E8F4FD] focus:outline-none",
|
|
764
|
+
N === g.id && "bg-[#E8F4FD]",
|
|
765
|
+
"first:rounded-t-2xl"
|
|
766
|
+
),
|
|
767
|
+
children: /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
|
|
768
|
+
/* @__PURE__ */ t("span", { className: "text-lg", children: g.flag }),
|
|
769
|
+
/* @__PURE__ */ t("span", { className: "font-medium", children: g.mask }),
|
|
770
|
+
/* @__PURE__ */ t("span", { className: "text-sm text-grayBlue5", children: g.name })
|
|
771
|
+
] })
|
|
772
|
+
},
|
|
773
|
+
g.id
|
|
774
|
+
)) : /* @__PURE__ */ t("div", { className: "px-4 py-3 text-center text-grayBlue5", children: "Страны не найдены" }) })
|
|
775
|
+
] })
|
|
776
|
+
]
|
|
777
|
+
}
|
|
778
|
+
),
|
|
779
|
+
/* @__PURE__ */ t(
|
|
780
|
+
"input",
|
|
781
|
+
{
|
|
782
|
+
type: "tel",
|
|
783
|
+
inputMode: "tel",
|
|
784
|
+
className: x(
|
|
785
|
+
"flex h-full flex-1 rounded-2xl px-[16px] py-[16px] text-base",
|
|
786
|
+
"placeholder:text-gray2 placeholder:opacity-60",
|
|
787
|
+
"transition-all duration-300 ease-in-out",
|
|
788
|
+
"hover:border-none hover:shadow-none",
|
|
789
|
+
"focus:border-none focus:outline-none focus:shadow-none focus:ring-0",
|
|
790
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-lightGray",
|
|
791
|
+
r && "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_4px_rgba(239,68,68,0.15)]",
|
|
792
|
+
a
|
|
793
|
+
),
|
|
794
|
+
ref: v,
|
|
795
|
+
value: W,
|
|
796
|
+
onChange: A,
|
|
797
|
+
placeholder: "XXX XXX XXX",
|
|
798
|
+
...m
|
|
799
|
+
}
|
|
800
|
+
)
|
|
801
|
+
]
|
|
802
|
+
}
|
|
803
|
+
),
|
|
804
|
+
r && /* @__PURE__ */ t("p", { className: "mt-2 text-sm text-red-500", children: r })
|
|
805
|
+
] });
|
|
806
|
+
}
|
|
807
|
+
);
|
|
808
|
+
se.displayName = "PhoneInput";
|
|
809
|
+
const ie = P(
|
|
810
|
+
({
|
|
811
|
+
label: a,
|
|
812
|
+
options: r,
|
|
813
|
+
value: o,
|
|
814
|
+
name: n,
|
|
815
|
+
onChange: e,
|
|
816
|
+
error: s,
|
|
817
|
+
className: m,
|
|
818
|
+
direction: v = "column"
|
|
819
|
+
}, y) => /* @__PURE__ */ i("div", { ref: y, className: x("flex flex-col gap-2", m), children: [
|
|
820
|
+
a && /* @__PURE__ */ t("label", { className: "text-sm font-medium text-blackBG mb-1", children: a }),
|
|
821
|
+
/* @__PURE__ */ t(
|
|
822
|
+
"div",
|
|
823
|
+
{
|
|
824
|
+
className: x(
|
|
825
|
+
"flex gap-4",
|
|
826
|
+
v === "column" ? "flex-col" : "flex-row flex-wrap"
|
|
827
|
+
),
|
|
828
|
+
children: r.map((l) => /* @__PURE__ */ t(
|
|
829
|
+
le,
|
|
830
|
+
{
|
|
831
|
+
name: n,
|
|
832
|
+
label: l.label,
|
|
833
|
+
value: l.value,
|
|
834
|
+
checked: o === l.value,
|
|
835
|
+
onChange: () => e == null ? void 0 : e(l.value),
|
|
836
|
+
error: s && !o ? s : void 0
|
|
837
|
+
},
|
|
838
|
+
l.value
|
|
839
|
+
))
|
|
840
|
+
}
|
|
841
|
+
),
|
|
842
|
+
s && /* @__PURE__ */ t("p", { className: "mt-1 text-sm text-red-500", children: s })
|
|
843
|
+
] })
|
|
844
|
+
);
|
|
845
|
+
ie.displayName = "RadioGroup";
|
|
846
|
+
const le = P(
|
|
847
|
+
({ className: a, label: r, error: o, ...n }, e) => /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
848
|
+
/* @__PURE__ */ i("label", { className: "flex items-start gap-3 cursor-pointer group", children: [
|
|
849
|
+
/* @__PURE__ */ i("div", { className: "relative flex items-center justify-center mt-0.5", children: [
|
|
850
|
+
/* @__PURE__ */ t(
|
|
851
|
+
"input",
|
|
852
|
+
{
|
|
853
|
+
type: "radio",
|
|
854
|
+
className: "peer sr-only",
|
|
855
|
+
ref: e,
|
|
856
|
+
...n
|
|
857
|
+
}
|
|
858
|
+
),
|
|
859
|
+
/* @__PURE__ */ t(
|
|
860
|
+
"div",
|
|
861
|
+
{
|
|
862
|
+
className: x(
|
|
863
|
+
"relative flex items-center justify-center w-5 h-5 rounded-full border-2 transition-all duration-200",
|
|
864
|
+
"border-grayBlue5 bg-white",
|
|
865
|
+
"peer-checked:bg-white peer-checked:border-greenLight",
|
|
866
|
+
"peer-focus:outline-none peer-focus:border-greenLight",
|
|
867
|
+
"peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
868
|
+
"group-hover:border-greenLight",
|
|
869
|
+
'after:content-[""] after:absolute after:opacity-0 after:transition-opacity after:duration-200',
|
|
870
|
+
"after:w-2.5 after:h-2.5 after:rounded-full after:bg-greenLight",
|
|
871
|
+
"after:top-1/2 after:left-1/2 after:-translate-x-1/2 after:-translate-y-1/2",
|
|
872
|
+
"peer-checked:after:opacity-100",
|
|
873
|
+
o && "border-red-500",
|
|
874
|
+
a
|
|
875
|
+
)
|
|
876
|
+
}
|
|
877
|
+
)
|
|
878
|
+
] }),
|
|
879
|
+
r && /* @__PURE__ */ t(
|
|
880
|
+
"span",
|
|
881
|
+
{
|
|
882
|
+
className: x(
|
|
883
|
+
"text-sm leading-5 text-graySoft select-none",
|
|
884
|
+
"group-hover:text-blackBG transition-colors duration-200",
|
|
885
|
+
o && "text-red-500"
|
|
886
|
+
),
|
|
887
|
+
children: r
|
|
888
|
+
}
|
|
889
|
+
)
|
|
890
|
+
] }),
|
|
891
|
+
o && /* @__PURE__ */ t("p", { className: "mt-2 text-sm text-red-500", children: o })
|
|
892
|
+
] })
|
|
893
|
+
);
|
|
894
|
+
le.displayName = "Radio";
|
|
895
|
+
const ce = P(
|
|
896
|
+
({
|
|
897
|
+
className: a,
|
|
898
|
+
error: r,
|
|
899
|
+
label: o,
|
|
900
|
+
options: n = [],
|
|
901
|
+
placeholder: e = "Выберите категорию",
|
|
902
|
+
value: s,
|
|
903
|
+
onChange: m,
|
|
904
|
+
onBlur: v,
|
|
905
|
+
name: y,
|
|
906
|
+
disabled: l,
|
|
907
|
+
...N
|
|
908
|
+
}, k) => {
|
|
909
|
+
const {
|
|
910
|
+
ref: c,
|
|
911
|
+
isShow: C,
|
|
912
|
+
setIsShow: h
|
|
913
|
+
} = X(!1);
|
|
914
|
+
J(k, () => c.current);
|
|
915
|
+
const b = n.find((w) => w.value === s), u = () => {
|
|
916
|
+
l || h(!C);
|
|
917
|
+
}, F = (w) => {
|
|
918
|
+
m && m({
|
|
919
|
+
target: {
|
|
920
|
+
name: y,
|
|
921
|
+
value: w.value
|
|
922
|
+
}
|
|
923
|
+
}), h(!1);
|
|
924
|
+
}, M = (w) => {
|
|
925
|
+
v && v({
|
|
926
|
+
target: {
|
|
927
|
+
name: y,
|
|
928
|
+
value: s
|
|
929
|
+
}
|
|
930
|
+
});
|
|
931
|
+
};
|
|
932
|
+
return /* @__PURE__ */ i(
|
|
933
|
+
"div",
|
|
934
|
+
{
|
|
935
|
+
className: x("w-full", a),
|
|
936
|
+
ref: c,
|
|
937
|
+
onBlur: M,
|
|
938
|
+
...N,
|
|
939
|
+
children: [
|
|
940
|
+
o && /* @__PURE__ */ t("label", { className: "mb-2 block text-sm font-medium text-blackBG", children: o }),
|
|
941
|
+
/* @__PURE__ */ i("div", { className: "relative", children: [
|
|
942
|
+
/* @__PURE__ */ i(
|
|
943
|
+
"button",
|
|
944
|
+
{
|
|
945
|
+
type: "button",
|
|
946
|
+
onClick: u,
|
|
947
|
+
disabled: l,
|
|
948
|
+
className: x(
|
|
949
|
+
"flex h-14 w-full items-center justify-between rounded-2xl border-[1px] border-grayBlue bg-white px-[20px] text-base text-blackBG",
|
|
950
|
+
"transition-all duration-300 ease-in-out",
|
|
951
|
+
"hover:border-greenLight hover:shadow-[0_0_0_4px_rgba(22,163,74,0.1)]",
|
|
952
|
+
C && "border-greenLight shadow-[0_0_0_4px_rgba(22,163,74,0.15)] ring-0 outline-none",
|
|
953
|
+
l && "cursor-not-allowed bg-lightGray opacity-50",
|
|
954
|
+
r && "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_4px_rgba(239,68,68,0.15)]",
|
|
955
|
+
!b && "text-gray2 opacity-60"
|
|
956
|
+
),
|
|
957
|
+
children: [
|
|
958
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: b ? b.label : e }),
|
|
959
|
+
/* @__PURE__ */ t(
|
|
960
|
+
"svg",
|
|
961
|
+
{
|
|
962
|
+
className: x(
|
|
963
|
+
"ml-2 h-5 w-5 text-gray2 transition-transform duration-300",
|
|
964
|
+
C && "rotate-180"
|
|
965
|
+
),
|
|
966
|
+
fill: "none",
|
|
967
|
+
stroke: "currentColor",
|
|
968
|
+
viewBox: "0 0 24 24",
|
|
969
|
+
children: /* @__PURE__ */ t(
|
|
970
|
+
"path",
|
|
971
|
+
{
|
|
972
|
+
strokeLinecap: "round",
|
|
973
|
+
strokeLinejoin: "round",
|
|
974
|
+
strokeWidth: 2,
|
|
975
|
+
d: "M19 9l-7 7-7-7"
|
|
976
|
+
}
|
|
977
|
+
)
|
|
978
|
+
}
|
|
979
|
+
)
|
|
980
|
+
]
|
|
981
|
+
}
|
|
982
|
+
),
|
|
983
|
+
C && /* @__PURE__ */ t(
|
|
984
|
+
"div",
|
|
985
|
+
{
|
|
986
|
+
className: x(
|
|
987
|
+
"absolute left-0 z-[100] mt-2 w-full overflow-hidden rounded-2xl border-[1px] border-grayBlue bg-white shadow-xl",
|
|
988
|
+
"transition-all duration-200 ease-in-out"
|
|
989
|
+
),
|
|
990
|
+
children: /* @__PURE__ */ t("div", { className: "max-h-[280px] overflow-y-auto py-2", children: n.length > 0 ? n.map((w) => /* @__PURE__ */ t(
|
|
991
|
+
"button",
|
|
992
|
+
{
|
|
993
|
+
type: "button",
|
|
994
|
+
onClick: () => F(w),
|
|
995
|
+
className: x(
|
|
996
|
+
"flex w-full items-center px-5 py-3 text-left text-base transition-colors",
|
|
997
|
+
"hover:bg-green-50 active:bg-green-100",
|
|
998
|
+
w.value === s && "bg-green-50 font-medium text-greenLight",
|
|
999
|
+
// Мобильные отступы чуть больше для удобства тапа
|
|
1000
|
+
"max-tablet:py-4"
|
|
1001
|
+
),
|
|
1002
|
+
children: w.label
|
|
1003
|
+
},
|
|
1004
|
+
w.value
|
|
1005
|
+
)) : /* @__PURE__ */ t("div", { className: "px-5 py-3 text-sm text-gray2", children: "Нет данных" }) })
|
|
1006
|
+
}
|
|
1007
|
+
)
|
|
1008
|
+
] }),
|
|
1009
|
+
r && /* @__PURE__ */ t("p", { className: "mt-2 text-sm text-red-500", children: r })
|
|
1010
|
+
]
|
|
1011
|
+
}
|
|
1012
|
+
);
|
|
1013
|
+
}
|
|
1014
|
+
);
|
|
1015
|
+
ce.displayName = "Select";
|
|
1016
|
+
const Ut = {
|
|
1017
|
+
TitleBlock: Qe,
|
|
1018
|
+
WarningCard: q
|
|
1019
|
+
}, Jt = [
|
|
1020
|
+
{
|
|
1021
|
+
label: "TitleBlock",
|
|
1022
|
+
value: "TitleBlock"
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
label: "WarningCard",
|
|
1026
|
+
value: "WarningCard"
|
|
1027
|
+
}
|
|
1028
|
+
], er = {
|
|
1029
|
+
text: oe,
|
|
1030
|
+
number: ne,
|
|
1031
|
+
phone: se,
|
|
1032
|
+
select: ce,
|
|
1033
|
+
date: ae,
|
|
1034
|
+
radio: ie,
|
|
1035
|
+
checkbox: re,
|
|
1036
|
+
file: Ke
|
|
1037
|
+
}, tr = (a, {
|
|
1038
|
+
register: r,
|
|
1039
|
+
errors: o,
|
|
1040
|
+
control: n
|
|
1041
|
+
}) => a.map((e, s) => {
|
|
1042
|
+
var v;
|
|
1043
|
+
if ((e == null ? void 0 : e.componentType) === "component") {
|
|
1044
|
+
const y = Ut[e == null ? void 0 : e.key];
|
|
1045
|
+
if (y)
|
|
1046
|
+
return /* @__PURE__ */ t(
|
|
1047
|
+
y,
|
|
1048
|
+
{
|
|
1049
|
+
...e == null ? void 0 : e.props
|
|
1050
|
+
},
|
|
1051
|
+
s
|
|
1052
|
+
);
|
|
1053
|
+
}
|
|
1054
|
+
const m = er[e == null ? void 0 : e.type];
|
|
1055
|
+
if (m) {
|
|
1056
|
+
const y = ["select", "radio", "checkbox", "file"].includes(
|
|
1057
|
+
e.type
|
|
1058
|
+
), l = (v = o[e.name]) == null ? void 0 : v.message;
|
|
1059
|
+
return y && n ? /* @__PURE__ */ t(
|
|
1060
|
+
qe,
|
|
1061
|
+
{
|
|
1062
|
+
name: e.name,
|
|
1063
|
+
control: n,
|
|
1064
|
+
rules: { validate: e.validate },
|
|
1065
|
+
render: ({ field: { onChange: N, value: k, name: c, ref: C } }) => /* @__PURE__ */ t(
|
|
1066
|
+
m,
|
|
1067
|
+
{
|
|
1068
|
+
...e.field_props,
|
|
1069
|
+
onChange: N,
|
|
1070
|
+
value: k,
|
|
1071
|
+
name: c,
|
|
1072
|
+
ref: C,
|
|
1073
|
+
error: l
|
|
1074
|
+
}
|
|
1075
|
+
)
|
|
1076
|
+
},
|
|
1077
|
+
s
|
|
1078
|
+
) : /* @__PURE__ */ t(
|
|
1079
|
+
m,
|
|
1080
|
+
{
|
|
1081
|
+
...e == null ? void 0 : e.field_props,
|
|
1082
|
+
...r(e == null ? void 0 : e.name, {
|
|
1083
|
+
validate: e == null ? void 0 : e.validate
|
|
1084
|
+
}),
|
|
1085
|
+
error: l
|
|
1086
|
+
},
|
|
1087
|
+
s
|
|
1088
|
+
);
|
|
1089
|
+
}
|
|
1090
|
+
return null;
|
|
1091
|
+
}), de = ({
|
|
1092
|
+
label: a,
|
|
1093
|
+
type: r,
|
|
1094
|
+
options: o
|
|
1095
|
+
}) => ({
|
|
1096
|
+
dataType: jt.select,
|
|
1097
|
+
label: a,
|
|
1098
|
+
type: r,
|
|
1099
|
+
options: o
|
|
1100
|
+
}), da = {
|
|
1101
|
+
title: "Оставьте заявку, чтобы подключить MKassa",
|
|
1102
|
+
subtitle: "с Вами свяжется наш специалист и поможет с подключением сервиса"
|
|
1103
|
+
}, pa = {
|
|
1104
|
+
title: "Форма заявки",
|
|
1105
|
+
description: "Форма заявки ",
|
|
1106
|
+
types: [U.form],
|
|
1107
|
+
propsToEdit: pe
|
|
1108
|
+
}, rr = {
|
|
1109
|
+
title: "Оставьте заявку, чтобы подключить MKassa",
|
|
1110
|
+
description: "с Вами свяжется наш специалист и поможет с подключением сервиса",
|
|
1111
|
+
color: "#45464b"
|
|
1112
|
+
}, or = de({
|
|
1113
|
+
label: "Тип поля",
|
|
1114
|
+
type: "componentType",
|
|
1115
|
+
options: Ot
|
|
1116
|
+
}), ar = de({
|
|
1117
|
+
label: "Компонент",
|
|
1118
|
+
type: "componentType",
|
|
1119
|
+
options: Jt
|
|
1120
|
+
}), nr = {
|
|
1121
|
+
type: "fields",
|
|
1122
|
+
dataType: "array",
|
|
1123
|
+
label: "Поля для формы",
|
|
1124
|
+
data: {
|
|
1125
|
+
componentType: or,
|
|
1126
|
+
type: j.STRING,
|
|
1127
|
+
key: ar,
|
|
1128
|
+
name: j.STRING,
|
|
1129
|
+
field_props: {
|
|
1130
|
+
label: j.STRING,
|
|
1131
|
+
placeholder: j.STRING
|
|
1132
|
+
},
|
|
1133
|
+
form_item_props: {
|
|
1134
|
+
label: j.STRING,
|
|
1135
|
+
placeholder: j.STRING
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
}, pe = ["title", "subtitle", "color", nr], me = ({
|
|
1139
|
+
title: a,
|
|
1140
|
+
subtitle: r,
|
|
1141
|
+
color: o,
|
|
1142
|
+
gridCols: n = 1,
|
|
1143
|
+
gridRow: e = 2,
|
|
1144
|
+
fields: s = []
|
|
1145
|
+
}) => {
|
|
1146
|
+
var L;
|
|
1147
|
+
const [m, v] = I(!1), [y, l] = I(!1), N = Ye(960), {
|
|
1148
|
+
register: k,
|
|
1149
|
+
handleSubmit: c,
|
|
1150
|
+
watch: C,
|
|
1151
|
+
reset: h,
|
|
1152
|
+
control: b,
|
|
1153
|
+
formState: { errors: u }
|
|
1154
|
+
} = ze({
|
|
1155
|
+
defaultValues: {
|
|
1156
|
+
fio: "",
|
|
1157
|
+
phone: "",
|
|
1158
|
+
business_category: "",
|
|
1159
|
+
agreement: !1
|
|
1160
|
+
}
|
|
1161
|
+
}), F = C("agreement"), M = async (B) => {
|
|
1162
|
+
console.log("Form submitted:", B);
|
|
1163
|
+
}, w = tr(s || [], {
|
|
1164
|
+
register: k,
|
|
1165
|
+
errors: u,
|
|
1166
|
+
control: b
|
|
1167
|
+
});
|
|
1168
|
+
return /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ t(
|
|
1169
|
+
"form",
|
|
1170
|
+
{
|
|
1171
|
+
onSubmit: c(M),
|
|
1172
|
+
id: "application_form",
|
|
1173
|
+
className: "w-full",
|
|
1174
|
+
children: /* @__PURE__ */ i(
|
|
1175
|
+
"div",
|
|
1176
|
+
{
|
|
1177
|
+
style: {
|
|
1178
|
+
boxShadow: `0px 8px 24px rgba(0,0,0,0.08),0px -8px 0px ${o}`
|
|
1179
|
+
},
|
|
1180
|
+
className: "bg-white rounded-[24px] shadow-[0px_8px_24px_rgba(0,0,0,0.08),0px_-8px_0px_#45464b] 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 hover:shadow-[0px_12px_32px_rgba(0,0,0,0.12),0px_-8px_0px_#45464b] mt-[8px]",
|
|
1181
|
+
children: [
|
|
1182
|
+
/* @__PURE__ */ i("div", { className: "text-center mb-10 max-tablet:mb-8", children: [
|
|
1183
|
+
/* @__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 }),
|
|
1184
|
+
/* @__PURE__ */ t("span", { className: "text-[18px] leading-[26px] text-graySoft max-tablet:text-[16px] max-tablet:leading-[24px]", children: r })
|
|
1185
|
+
] }),
|
|
1186
|
+
m ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center w-[640px] gap-8 max-tablet:w-full animate-in fade-in duration-500", children: /* @__PURE__ */ i("div", { className: "text-center", children: [
|
|
1187
|
+
/* @__PURE__ */ t("div", { className: "w-20 h-20 rounded-full bg-gradient-to-br from-greenLight to-green flex items-center justify-center mx-auto mb-6 shadow-lg animate-in zoom-in duration-500", children: /* @__PURE__ */ t(
|
|
1188
|
+
"svg",
|
|
1189
|
+
{
|
|
1190
|
+
className: "w-10 h-10 text-white",
|
|
1191
|
+
fill: "none",
|
|
1192
|
+
stroke: "currentColor",
|
|
1193
|
+
viewBox: "0 0 24 24",
|
|
1194
|
+
children: /* @__PURE__ */ t(
|
|
1195
|
+
"path",
|
|
1196
|
+
{
|
|
1197
|
+
strokeLinecap: "round",
|
|
1198
|
+
strokeLinejoin: "round",
|
|
1199
|
+
strokeWidth: 3,
|
|
1200
|
+
d: "M5 13l4 4L19 7"
|
|
1201
|
+
}
|
|
1202
|
+
)
|
|
1203
|
+
}
|
|
1204
|
+
) }),
|
|
1205
|
+
/* @__PURE__ */ i("div", { className: "text-center", children: [
|
|
1206
|
+
/* @__PURE__ */ t("div", { className: "font-semibold text-[24px] leading-[32px] text-blackBG mb-3", children: "Заявка успешно отправлена" }),
|
|
1207
|
+
/* @__PURE__ */ t("div", { className: "text-[18px] leading-[26px] text-graySoft", children: "С Вами свяжется наш специалист и поможет с подключением сервиса" }),
|
|
1208
|
+
/* @__PURE__ */ t(
|
|
1209
|
+
E,
|
|
1210
|
+
{
|
|
1211
|
+
className: "justify-center m-auto mt-6",
|
|
1212
|
+
title: "Закрыть",
|
|
1213
|
+
onClick: () => {
|
|
1214
|
+
v(!1), h();
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
)
|
|
1218
|
+
] })
|
|
1219
|
+
] }) }) : /* @__PURE__ */ i(K, { children: [
|
|
1220
|
+
/* @__PURE__ */ t(
|
|
1221
|
+
"div",
|
|
1222
|
+
{
|
|
1223
|
+
className: "w-[640px] mb-8 max-tablet:w-full grid gap-6",
|
|
1224
|
+
style: {
|
|
1225
|
+
gridTemplateColumns: `repeat(${N ? 1 : n}, 1fr)`,
|
|
1226
|
+
gridTemplateRows: `repeat(${e}, auto)`
|
|
1227
|
+
},
|
|
1228
|
+
children: w
|
|
1229
|
+
}
|
|
1230
|
+
),
|
|
1231
|
+
/* @__PURE__ */ t("div", { className: "pt-2", children: /* @__PURE__ */ t(
|
|
1232
|
+
z,
|
|
1233
|
+
{
|
|
1234
|
+
...k("agreement", {
|
|
1235
|
+
required: "Необходимо согласие на обработку персональных данных"
|
|
1236
|
+
}),
|
|
1237
|
+
error: (L = u.agreement) == null ? void 0 : L.message,
|
|
1238
|
+
label: /* @__PURE__ */ i(K, { children: [
|
|
1239
|
+
"Я соглашаюсь с",
|
|
1240
|
+
" ",
|
|
1241
|
+
/* @__PURE__ */ t(
|
|
1242
|
+
"button",
|
|
1243
|
+
{
|
|
1244
|
+
type: "button",
|
|
1245
|
+
className: "text-greenLight hover:text-green underline transition-colors duration-200 bg-transparent border-0 p-0 cursor-pointer",
|
|
1246
|
+
onClick: (B) => {
|
|
1247
|
+
B.preventDefault();
|
|
1248
|
+
},
|
|
1249
|
+
children: "условиями обработки персональных данных"
|
|
1250
|
+
}
|
|
1251
|
+
)
|
|
1252
|
+
] })
|
|
1253
|
+
}
|
|
1254
|
+
) }),
|
|
1255
|
+
/* @__PURE__ */ t("div", { className: "mt-6 w-[640px] max-tablet:w-full", children: /* @__PURE__ */ t(
|
|
1256
|
+
E,
|
|
1257
|
+
{
|
|
1258
|
+
loading: y,
|
|
1259
|
+
className: "w-full whitespace-nowrap transition-all duration-200 hover:scale-[1.02] active:scale-[0.98]",
|
|
1260
|
+
type: "submit",
|
|
1261
|
+
size: ke.XL,
|
|
1262
|
+
variant: Ce.Primary,
|
|
1263
|
+
disabled: !F || y,
|
|
1264
|
+
children: "Отправить заявку"
|
|
1265
|
+
}
|
|
1266
|
+
) })
|
|
1267
|
+
] })
|
|
1268
|
+
]
|
|
1269
|
+
}
|
|
1270
|
+
)
|
|
1271
|
+
}
|
|
1272
|
+
) });
|
|
1273
|
+
};
|
|
1274
|
+
me.propsToEdit = pe;
|
|
1275
|
+
const ma = {
|
|
1276
|
+
MainBanner: { key: "MainBanner", component: He },
|
|
1277
|
+
Banner: { key: "Banner", component: ge },
|
|
1278
|
+
CardImageList: { key: "CardImageList", component: Ie },
|
|
1279
|
+
Stepper: { key: "Stepper", component: De },
|
|
1280
|
+
Segments: { key: "Segments", component: Ne },
|
|
1281
|
+
VideoFull: { key: "VideoFull", component: Le },
|
|
1282
|
+
VideoList: { key: "VideoList", component: _e },
|
|
1283
|
+
VideoListMini: { key: "VideoListMini", component: Be },
|
|
1284
|
+
ContentCardList: { key: "ContentCardList", component: Se },
|
|
1285
|
+
CardIconList: { key: "CardIconList", component: Fe },
|
|
1286
|
+
MultiCards: { key: "MultiCards", component: Me },
|
|
1287
|
+
Partners: { key: "Partners", component: Ve },
|
|
1288
|
+
PartnersColors: { key: "PartnersColors", component: Ge },
|
|
1289
|
+
WarningCard: { key: "WarningCard", component: q },
|
|
1290
|
+
Faq: { key: "Faq", component: Te },
|
|
1291
|
+
DownloadFileBanner: {
|
|
1292
|
+
key: "DownloadFileBanner",
|
|
1293
|
+
component: je
|
|
1294
|
+
},
|
|
1295
|
+
DownloadFileHalf: { key: "DownloadFileHalf", component: Ze },
|
|
1296
|
+
DownloadFileFull: { key: "DownloadFileFull", component: Oe },
|
|
1297
|
+
DownloadFileMini: { key: "DownloadFileMini", component: Re },
|
|
1298
|
+
InstructionList: { key: "InstructionList", component: Pe },
|
|
1299
|
+
PreviewList: { key: "PreviewList", component: We },
|
|
1300
|
+
SwiperList: { key: "SwiperList", component: ot },
|
|
1301
|
+
AnimatedSwiper: { key: "AnimatedSwiper", component: $e },
|
|
1302
|
+
InfoBannerList: { key: "InfoBannerList", component: Ue },
|
|
1303
|
+
TasksBannerList: { key: "TasksBannerList", component: at },
|
|
1304
|
+
VideoMainBanner: { key: "VideoMainBanner", component: nt },
|
|
1305
|
+
Space: { key: "Space", component: tt },
|
|
1306
|
+
PromoPoster: { key: "PromoPoster", component: et },
|
|
1307
|
+
CardImageSecondaryList: {
|
|
1308
|
+
key: "CardImageSecondaryList",
|
|
1309
|
+
component: Ae
|
|
1310
|
+
},
|
|
1311
|
+
CardInfoTable: { key: "CardInfoTable", component: Ee },
|
|
1312
|
+
StandartTable: { key: "StandartTable", component: rt },
|
|
1313
|
+
IntroBanner: { key: "IntroBanner", component: Je },
|
|
1314
|
+
DownloadFileBright: {
|
|
1315
|
+
key: "DownloadFileBright",
|
|
1316
|
+
component: Xe
|
|
1317
|
+
},
|
|
1318
|
+
FormDefault: {
|
|
1319
|
+
key: "FormDefault",
|
|
1320
|
+
component: me
|
|
1321
|
+
},
|
|
1322
|
+
Header: { key: "Header", component: Zt },
|
|
1323
|
+
Footer: { key: "Footer", component: Rt }
|
|
1324
|
+
}, ua = {
|
|
1325
|
+
MainBanner: st.component_props,
|
|
1326
|
+
Banner: it.component_props,
|
|
1327
|
+
CardImageList: lt.component_props,
|
|
1328
|
+
Stepper: ct.component_props,
|
|
1329
|
+
Segments: dt.component_props,
|
|
1330
|
+
VideoFull: pt.component_props,
|
|
1331
|
+
VideoList: mt.component_props,
|
|
1332
|
+
VideoListMini: ut.component_props,
|
|
1333
|
+
ContentCardList: ft.component_props,
|
|
1334
|
+
CardIconList: ht.component_props,
|
|
1335
|
+
MultiCards: gt.component_props,
|
|
1336
|
+
Partners: xt.component_props,
|
|
1337
|
+
PartnersColors: bt.component_props,
|
|
1338
|
+
WarningCard: yt.component_props,
|
|
1339
|
+
Faq: wt.component_props,
|
|
1340
|
+
DownloadFileBanner: vt.component_props,
|
|
1341
|
+
DownloadFileHalf: kt.component_props,
|
|
1342
|
+
DownloadFileFull: Ct.component_props,
|
|
1343
|
+
DownloadFileMini: Dt.component_props,
|
|
1344
|
+
InstructionList: Nt.component_props,
|
|
1345
|
+
PreviewList: Lt.component_props,
|
|
1346
|
+
SwiperList: _t.component_props,
|
|
1347
|
+
AnimatedSwiper: Bt.component_props,
|
|
1348
|
+
InfoBannerList: St.component_props,
|
|
1349
|
+
TasksBannerList: Ft.component_props,
|
|
1350
|
+
VideoMainBanner: Mt.component_props,
|
|
1351
|
+
EmptyBox: Vt.component_props,
|
|
1352
|
+
PromoPoster: It.component_props,
|
|
1353
|
+
CardImageSecondaryList: Ht.component_props,
|
|
1354
|
+
CardInfoTable: Tt.component_props,
|
|
1355
|
+
StandartTable: Pt.component_props,
|
|
1356
|
+
IntroBanner: Gt.component_props,
|
|
1357
|
+
DownloadFileBright: Wt.component_props,
|
|
1358
|
+
FormDefault: rr
|
|
1359
|
+
}, fa = {
|
|
1360
|
+
title: "Предупреждающая карточка",
|
|
1361
|
+
description: "Компонент для отображения предупреждающей информации в виде карточки с иконкой, заголовком и описанием. Используется для привлечения внимания к важной информации или предупреждениям.",
|
|
1362
|
+
types: [U.cards],
|
|
1363
|
+
propsToEdit: te
|
|
1364
|
+
};
|
|
1365
|
+
export {
|
|
1366
|
+
ua as A,
|
|
1367
|
+
me as F,
|
|
1368
|
+
q as W,
|
|
1369
|
+
ma as a,
|
|
1370
|
+
Jt as b,
|
|
1371
|
+
Ut as c,
|
|
1372
|
+
rr as d,
|
|
1373
|
+
nr as e,
|
|
1374
|
+
pa as f,
|
|
1375
|
+
pe as g,
|
|
1376
|
+
da as i,
|
|
1377
|
+
te as p,
|
|
1378
|
+
tr as r,
|
|
1379
|
+
fa as w
|
|
1380
|
+
};
|