mimir-ui-kit 1.65.6 → 1.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AnchorLink/Link.d.ts +2 -0
- package/dist/components/AnchorLink/Link.js +49 -45
- package/dist/components/MergedButton/MergedButton.d.ts +6 -1
- package/dist/components/MergedButton/MergedButton.js +61 -51
- package/dist/components/OtpInput/OtpInput.d.ts +9 -0
- package/dist/components/OtpInput/OtpInput.js +76 -60
- package/dist/components/OtpInput/utils.d.ts +2 -0
- package/dist/components/OtpInput/utils.js +9 -0
- package/dist/components/Pagination/Pagination.d.ts +8 -0
- package/dist/components/Pagination/Pagination.js +209 -176
- package/dist/components/Slider/Slider.d.ts +5 -1
- package/dist/components/Slider/Slider.js +100 -99
- package/dist/components/Timer/Timer.d.ts +7 -1
- package/dist/components/Timer/Timer.js +31 -18
- package/dist/components/UploaderFiles/UploaderFiles.js +33 -31
- package/dist/components/UploaderFiles/types.d.ts +1 -0
- package/dist/components/UploaderPhotos/UploaderPhotos.d.ts +1 -0
- package/dist/components/UploaderPhotos/UploaderPhotos.js +32 -30
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/16px/Like16px.js +30 -0
- package/dist/icons/components/index.js +400 -399
- package/dist/{index-CQCTAWGm.js → index-BBLWWBmN.js} +1115 -1109
- package/package.json +1 -1
|
@@ -1,244 +1,277 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { FIRST_PAGE_NUMBER as
|
|
5
|
-
import { PaginationDateButton as
|
|
6
|
-
import { useWindowSize as
|
|
7
|
-
import { MergedButton as
|
|
8
|
-
import '../../assets/Pagination.css';const
|
|
1
|
+
import { jsxs as y, jsx as s, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import { c as S } from "../../index-DIxK0V-G.js";
|
|
3
|
+
import { forwardRef as z, useState as O, useEffect as V } from "react";
|
|
4
|
+
import { FIRST_PAGE_NUMBER as g, DEFAULT_PER_PAGE as W } from "./constants.js";
|
|
5
|
+
import { PaginationDateButton as p } from "./PaginationDateButton/PaginationDateButton.js";
|
|
6
|
+
import { useWindowSize as q } from "../../hooks/useWindowSize/index.js";
|
|
7
|
+
import { MergedButton as j } from "../MergedButton/MergedButton.js";
|
|
8
|
+
import '../../assets/Pagination.css';const H = "_container_1b4hk_27", J = "_ellipsis_1b4hk_48", K = "_disabled_1b4hk_53", P = {
|
|
9
9
|
"pagination-button": "_pagination-button_1b4hk_2",
|
|
10
10
|
"is-active": "_is-active_1b4hk_23",
|
|
11
|
-
container:
|
|
11
|
+
container: H,
|
|
12
12
|
"container--date-mode": "_container--date-mode_1b4hk_37",
|
|
13
|
-
ellipsis:
|
|
14
|
-
disabled:
|
|
15
|
-
},
|
|
16
|
-
currentPageNumber:
|
|
13
|
+
ellipsis: J,
|
|
14
|
+
disabled: K
|
|
15
|
+
}, Q = ({
|
|
16
|
+
currentPageNumber: r,
|
|
17
17
|
onClick: e,
|
|
18
|
-
setCurrentPage:
|
|
19
|
-
disabled:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
18
|
+
setCurrentPage: m,
|
|
19
|
+
disabled: b,
|
|
20
|
+
dataTestIdReactMap: t
|
|
21
|
+
}) => {
|
|
22
|
+
const n = () => {
|
|
23
|
+
r !== g && (m(r - 1), e(r - 1));
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ s(
|
|
26
|
+
j,
|
|
27
|
+
{
|
|
28
|
+
dataTestIdReactMap: {
|
|
29
|
+
btn: t == null ? void 0 : t.backBtn,
|
|
30
|
+
buttons: t == null ? void 0 : t.backButtons
|
|
31
|
+
},
|
|
32
|
+
buttons: [
|
|
33
|
+
{
|
|
34
|
+
isIconButton: !0,
|
|
35
|
+
variant: "white",
|
|
36
|
+
onClick: n,
|
|
37
|
+
iconName: "ArrowLeft16px",
|
|
38
|
+
disabled: b || r === g,
|
|
39
|
+
"data-testid": "back-button"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}, X = ({
|
|
45
|
+
currentPageNumber: r,
|
|
38
46
|
lastPageNumber: e,
|
|
39
|
-
onClick:
|
|
40
|
-
setCurrentPage:
|
|
41
|
-
disabled:
|
|
47
|
+
onClick: m,
|
|
48
|
+
setCurrentPage: b,
|
|
49
|
+
disabled: t,
|
|
50
|
+
dataTestIdReactMap: n
|
|
42
51
|
}) => {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
52
|
+
const i = r >= e, u = () => {
|
|
53
|
+
i || (b(r + 1), m(r + 1));
|
|
54
|
+
};
|
|
55
|
+
return /* @__PURE__ */ s(
|
|
56
|
+
j,
|
|
46
57
|
{
|
|
58
|
+
dataTestIdReactMap: {
|
|
59
|
+
btn: n == null ? void 0 : n.nextBtn,
|
|
60
|
+
buttons: n == null ? void 0 : n.nextButtons
|
|
61
|
+
},
|
|
47
62
|
buttons: [
|
|
48
63
|
{
|
|
49
64
|
isIconButton: !0,
|
|
50
65
|
variant: "white",
|
|
51
|
-
onClick:
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
disabled: r || t,
|
|
66
|
+
onClick: u,
|
|
67
|
+
disabled: t || i,
|
|
55
68
|
iconName: "ArrowRight16px",
|
|
56
69
|
"data-testid": "next-button"
|
|
57
70
|
}
|
|
58
71
|
]
|
|
59
72
|
}
|
|
60
73
|
);
|
|
61
|
-
},
|
|
62
|
-
|
|
74
|
+
}, L = () => /* @__PURE__ */ s(
|
|
75
|
+
j,
|
|
63
76
|
{
|
|
64
77
|
buttons: [
|
|
65
78
|
{
|
|
66
79
|
children: "...",
|
|
67
80
|
variant: "transparent",
|
|
68
|
-
className:
|
|
81
|
+
className: S(P["pagination-button"], P.ellipsis)
|
|
69
82
|
}
|
|
70
83
|
]
|
|
71
84
|
}
|
|
72
|
-
),
|
|
73
|
-
currentPageNumber:
|
|
85
|
+
), w = ({
|
|
86
|
+
currentPageNumber: r,
|
|
74
87
|
newPageNumber: e,
|
|
75
|
-
onClick:
|
|
76
|
-
setCurrentPage:
|
|
77
|
-
disabled:
|
|
78
|
-
pageData:
|
|
79
|
-
|
|
88
|
+
onClick: m,
|
|
89
|
+
setCurrentPage: b,
|
|
90
|
+
disabled: t,
|
|
91
|
+
pageData: n,
|
|
92
|
+
dataTestIdReactMap: i,
|
|
93
|
+
isDateMode: u = !1
|
|
80
94
|
}) => {
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
return
|
|
85
|
-
|
|
95
|
+
const N = r === e, B = () => {
|
|
96
|
+
t || (b(e), m(e));
|
|
97
|
+
}, l = e < 10 ? `0${e}` : e;
|
|
98
|
+
return u && n ? /* @__PURE__ */ s(
|
|
99
|
+
p,
|
|
86
100
|
{
|
|
87
|
-
testId: `pagination-button-${
|
|
88
|
-
disabled:
|
|
89
|
-
isActive:
|
|
90
|
-
onClick:
|
|
91
|
-
date:
|
|
101
|
+
testId: `pagination-button-${l}`,
|
|
102
|
+
disabled: t,
|
|
103
|
+
isActive: N,
|
|
104
|
+
onClick: B,
|
|
105
|
+
date: n.date,
|
|
92
106
|
counterProps: {
|
|
93
|
-
value:
|
|
94
|
-
variant:
|
|
95
|
-
color:
|
|
96
|
-
backgroundColor:
|
|
107
|
+
value: n.count ?? 0,
|
|
108
|
+
variant: n.counterVariant,
|
|
109
|
+
color: n.counterColor,
|
|
110
|
+
backgroundColor: n.counterBackgroundColor
|
|
97
111
|
}
|
|
98
112
|
}
|
|
99
|
-
) : /* @__PURE__ */
|
|
113
|
+
) : /* @__PURE__ */ s(
|
|
100
114
|
"button",
|
|
101
115
|
{
|
|
102
|
-
"data-testid":
|
|
116
|
+
"data-testid-react": `${i == null ? void 0 : i.paginationBtn}-${l}`,
|
|
117
|
+
"data-testid": `pagination-button-${l}`,
|
|
103
118
|
type: "button",
|
|
104
|
-
onClick:
|
|
105
|
-
disabled:
|
|
106
|
-
className:
|
|
107
|
-
[
|
|
119
|
+
onClick: B,
|
|
120
|
+
disabled: t,
|
|
121
|
+
className: S(P["pagination-button"], {
|
|
122
|
+
[P["is-active"]]: N
|
|
108
123
|
}),
|
|
109
|
-
children:
|
|
124
|
+
children: l
|
|
110
125
|
}
|
|
111
126
|
);
|
|
112
|
-
},
|
|
113
|
-
start:
|
|
127
|
+
}, Y = ({
|
|
128
|
+
start: r,
|
|
114
129
|
end: e,
|
|
115
|
-
currentPageNumber:
|
|
116
|
-
onClick:
|
|
117
|
-
setCurrentPage:
|
|
118
|
-
disabled:
|
|
119
|
-
pagesData:
|
|
120
|
-
isDateMode:
|
|
130
|
+
currentPageNumber: m,
|
|
131
|
+
onClick: b,
|
|
132
|
+
setCurrentPage: t,
|
|
133
|
+
disabled: n,
|
|
134
|
+
pagesData: i,
|
|
135
|
+
isDateMode: u,
|
|
136
|
+
dataTestIdReactMap: N
|
|
121
137
|
}) => {
|
|
122
|
-
const
|
|
123
|
-
for (let
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
|
|
138
|
+
const B = [];
|
|
139
|
+
for (let l = r; l <= e; l++) {
|
|
140
|
+
const c = i == null ? void 0 : i[l - 1];
|
|
141
|
+
B.push(
|
|
142
|
+
/* @__PURE__ */ s(
|
|
143
|
+
w,
|
|
128
144
|
{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
145
|
+
dataTestIdReactMap: N,
|
|
146
|
+
currentPageNumber: m,
|
|
147
|
+
setCurrentPage: t,
|
|
148
|
+
newPageNumber: l,
|
|
149
|
+
onClick: b,
|
|
150
|
+
disabled: n,
|
|
151
|
+
pageData: c,
|
|
152
|
+
isDateMode: u
|
|
136
153
|
},
|
|
137
|
-
|
|
154
|
+
l
|
|
138
155
|
)
|
|
139
156
|
);
|
|
140
157
|
}
|
|
141
|
-
return
|
|
142
|
-
},
|
|
143
|
-
(
|
|
158
|
+
return B;
|
|
159
|
+
}, nn = z(
|
|
160
|
+
(r, e) => {
|
|
144
161
|
const {
|
|
145
|
-
rootClassName:
|
|
146
|
-
total:
|
|
147
|
-
perPage:
|
|
148
|
-
currentPageNumber:
|
|
149
|
-
onChange:
|
|
150
|
-
disabled:
|
|
151
|
-
hidePrevButton:
|
|
152
|
-
hideNextButton:
|
|
153
|
-
siblingCount:
|
|
154
|
-
boundaryCount:
|
|
155
|
-
isDateMode:
|
|
156
|
-
pagesData:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
162
|
+
rootClassName: m,
|
|
163
|
+
total: b,
|
|
164
|
+
perPage: t = W,
|
|
165
|
+
currentPageNumber: n = g,
|
|
166
|
+
onChange: i,
|
|
167
|
+
disabled: u = !1,
|
|
168
|
+
hidePrevButton: N = !1,
|
|
169
|
+
hideNextButton: B = !1,
|
|
170
|
+
siblingCount: l,
|
|
171
|
+
boundaryCount: c = 1,
|
|
172
|
+
isDateMode: E = !1,
|
|
173
|
+
pagesData: _,
|
|
174
|
+
dataTestIdReactMap: o
|
|
175
|
+
} = r, [f, v] = O(n), h = Math.ceil(b / t), { width: G } = q(), U = G <= 650 ? 1 : 2, A = l !== void 0 ? l : U;
|
|
176
|
+
let C = 0, x = 0;
|
|
177
|
+
return V(() => {
|
|
178
|
+
v(n);
|
|
179
|
+
}, [n]), f <= c + A + 1 ? (C = g, x = Math.min(
|
|
180
|
+
c + A * 2 + 1,
|
|
181
|
+
h
|
|
182
|
+
)) : f >= h - c - A ? (C = Math.max(
|
|
183
|
+
h - c - A * 2,
|
|
184
|
+
g
|
|
185
|
+
), x = h) : (C = f - A, x = f + A), b <= t ? null : /* @__PURE__ */ y(
|
|
168
186
|
"nav",
|
|
169
187
|
{
|
|
188
|
+
"data-testid-react": o == null ? void 0 : o.pagination,
|
|
170
189
|
"aria-label": "Постраничная навигация",
|
|
171
|
-
className:
|
|
172
|
-
[
|
|
173
|
-
[
|
|
190
|
+
className: S(P.container, m, {
|
|
191
|
+
[P.disabled]: u,
|
|
192
|
+
[P["container--date-mode"]]: E
|
|
174
193
|
}),
|
|
175
194
|
ref: e,
|
|
176
195
|
children: [
|
|
177
|
-
!
|
|
178
|
-
|
|
196
|
+
!N && /* @__PURE__ */ s(
|
|
197
|
+
Q,
|
|
179
198
|
{
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
199
|
+
dataTestIdReactMap: {
|
|
200
|
+
backBtn: o == null ? void 0 : o.backBtn,
|
|
201
|
+
backButtons: o == null ? void 0 : o.backButtons
|
|
202
|
+
},
|
|
203
|
+
currentPageNumber: f,
|
|
204
|
+
onClick: i,
|
|
205
|
+
setCurrentPage: v,
|
|
206
|
+
disabled: u
|
|
184
207
|
}
|
|
185
208
|
),
|
|
186
|
-
|
|
187
|
-
Array.from({ length:
|
|
188
|
-
const
|
|
189
|
-
return
|
|
190
|
-
|
|
209
|
+
C > g && /* @__PURE__ */ y(F, { children: [
|
|
210
|
+
Array.from({ length: c }).map((a, $) => {
|
|
211
|
+
const k = g + $;
|
|
212
|
+
return k >= C ? null : /* @__PURE__ */ s(
|
|
213
|
+
w,
|
|
191
214
|
{
|
|
192
|
-
newPageNumber:
|
|
193
|
-
currentPageNumber:
|
|
194
|
-
onClick:
|
|
195
|
-
setCurrentPage:
|
|
196
|
-
disabled:
|
|
197
|
-
pageData:
|
|
198
|
-
isDateMode:
|
|
215
|
+
newPageNumber: k,
|
|
216
|
+
currentPageNumber: f,
|
|
217
|
+
onClick: i,
|
|
218
|
+
setCurrentPage: v,
|
|
219
|
+
disabled: u,
|
|
220
|
+
pageData: _ == null ? void 0 : _[k - 1],
|
|
221
|
+
isDateMode: E
|
|
199
222
|
},
|
|
200
|
-
`boundary-start-${
|
|
223
|
+
`boundary-start-${k}`
|
|
201
224
|
);
|
|
202
225
|
}),
|
|
203
|
-
|
|
226
|
+
C > c + g && /* @__PURE__ */ s(L, {})
|
|
204
227
|
] }),
|
|
205
|
-
|
|
206
|
-
start:
|
|
207
|
-
end:
|
|
208
|
-
currentPageNumber:
|
|
209
|
-
setCurrentPage:
|
|
210
|
-
onClick:
|
|
211
|
-
disabled:
|
|
212
|
-
pagesData:
|
|
213
|
-
isDateMode:
|
|
228
|
+
Y({
|
|
229
|
+
start: C,
|
|
230
|
+
end: x,
|
|
231
|
+
currentPageNumber: f,
|
|
232
|
+
setCurrentPage: v,
|
|
233
|
+
onClick: i,
|
|
234
|
+
disabled: u,
|
|
235
|
+
pagesData: _,
|
|
236
|
+
isDateMode: E,
|
|
237
|
+
dataTestIdReactMap: {
|
|
238
|
+
paginationBtn: o == null ? void 0 : o.paginationBtn
|
|
239
|
+
}
|
|
214
240
|
}),
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
Array.from({ length:
|
|
218
|
-
const
|
|
219
|
-
return
|
|
220
|
-
|
|
241
|
+
x < h && /* @__PURE__ */ y(F, { children: [
|
|
242
|
+
x < h - c && /* @__PURE__ */ s(L, {}),
|
|
243
|
+
Array.from({ length: c }).map((a, $) => {
|
|
244
|
+
const k = h - c + 1 + $;
|
|
245
|
+
return k <= x ? null : /* @__PURE__ */ s(
|
|
246
|
+
w,
|
|
221
247
|
{
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
248
|
+
dataTestIdReactMap: {
|
|
249
|
+
paginationBtn: o == null ? void 0 : o.paginationBtn
|
|
250
|
+
},
|
|
251
|
+
newPageNumber: k,
|
|
252
|
+
currentPageNumber: f,
|
|
253
|
+
onClick: i,
|
|
254
|
+
setCurrentPage: v,
|
|
255
|
+
disabled: u,
|
|
256
|
+
pageData: _ == null ? void 0 : _[k - 1],
|
|
257
|
+
isDateMode: E
|
|
229
258
|
},
|
|
230
|
-
`boundary-end-${
|
|
259
|
+
`boundary-end-${k}`
|
|
231
260
|
);
|
|
232
261
|
})
|
|
233
262
|
] }),
|
|
234
|
-
!
|
|
235
|
-
|
|
263
|
+
!B && /* @__PURE__ */ s(
|
|
264
|
+
X,
|
|
236
265
|
{
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
266
|
+
dataTestIdReactMap: {
|
|
267
|
+
nextBtn: o == null ? void 0 : o.nextBtn,
|
|
268
|
+
nextButtons: o == null ? void 0 : o.nextButtons
|
|
269
|
+
},
|
|
270
|
+
currentPageNumber: f,
|
|
271
|
+
setCurrentPage: v,
|
|
272
|
+
lastPageNumber: h,
|
|
273
|
+
onClick: i,
|
|
274
|
+
disabled: u
|
|
242
275
|
}
|
|
243
276
|
)
|
|
244
277
|
]
|
|
@@ -247,5 +280,5 @@ import '../../assets/Pagination.css';const U = "_container_1b4hk_27", z = "_elli
|
|
|
247
280
|
}
|
|
248
281
|
);
|
|
249
282
|
export {
|
|
250
|
-
|
|
283
|
+
nn as Pagination
|
|
251
284
|
};
|
|
@@ -27,6 +27,10 @@ type TProps = SwiperProps & {
|
|
|
27
27
|
* Показывать стрелки навигации и количество слайдов.
|
|
28
28
|
*/
|
|
29
29
|
needNavigation?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Показывать количество слайдов.
|
|
32
|
+
*/
|
|
33
|
+
needSlidesCount?: boolean;
|
|
30
34
|
/**
|
|
31
35
|
* Приостанавливать автопрокрутку при наведении на слайдер.
|
|
32
36
|
*/
|
|
@@ -92,5 +96,5 @@ type TProps = SwiperProps & {
|
|
|
92
96
|
*/
|
|
93
97
|
images?: TSlideImage[];
|
|
94
98
|
};
|
|
95
|
-
export default function Slider({ images, children, gap, onSlideClick, swiperClassName, slideClassName, imageClassName, navigationClassName, navigationContent, sliderBottomPanelClassName, descriptionsClassName, navigationContentClassName, buttonsVariant, progressBarPosition, isFullPaginationWidth, needNavigation, leftDescription, rightDescription, delay, pauseOnMouseEnter, ...props }: TProps): import("react/jsx-runtime").JSX.Element;
|
|
99
|
+
export default function Slider({ images, children, gap, onSlideClick, swiperClassName, slideClassName, imageClassName, navigationClassName, navigationContent, sliderBottomPanelClassName, descriptionsClassName, navigationContentClassName, buttonsVariant, progressBarPosition, isFullPaginationWidth, needNavigation, needSlidesCount, leftDescription, rightDescription, delay, pauseOnMouseEnter, ...props }: TProps): import("react/jsx-runtime").JSX.Element;
|
|
96
100
|
export {};
|