mimir-ui-kit 1.38.12 → 1.38.14
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._container_grwbf_3{--pagination-active: #e5e5e5;display:flex;gap:var(--mimir-space-2xl);justify-content:center;margin:0 auto}._container_grwbf_3:not(:last-child){margin-bottom:0 auto var(--mimir-space-xl)}@media (max-width: 767.9px){._container_grwbf_3{gap:var(--mimir-space-xs)}}._container_grwbf_3 ._pagination-button_grwbf_18{display:flex;align-items:center;justify-content:center;width:40px;height:40px;color:var(--black-100);font-weight:var(--mimir-font-weight-text-medium);font-size:var(--mimir-size-text-l);font-family:var(--mimir-font-inter);background-color:transparent;border-radius:var(--mimir-control-radius);font-feature-settings:"zero"}._container_grwbf_3 ._pagination-button_grwbf_18:active{background-color:var(--pagination-active)}._container_grwbf_3 ._pagination-button_grwbf_18:focus-visible,._container_grwbf_3 ._pagination-button_grwbf_18:hover{color:var(--sapphire-normal);-webkit-text-decoration:none;text-decoration:none}._container_grwbf_3 ._pagination-button_grwbf_18._is-active_grwbf_39{background-color:var(--pagination-active)}._container_grwbf_3 ._ellipsis_grwbf_42{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
import { jsxs as P, jsx as i } from "react/jsx-runtime";
|
2
|
-
import { c as
|
3
|
-
import { forwardRef as N, useState as
|
4
|
-
import { FIRST_PAGE_NUMBER as u, DEFAULT_PER_PAGE as
|
5
|
-
import { useWindowSize as
|
6
|
-
import { MergedButton as
|
7
|
-
import '../../assets/Pagination.css';const
|
8
|
-
container:
|
9
|
-
"pagination-button": "_pagination-
|
10
|
-
"is-active": "_is-
|
11
|
-
ellipsis:
|
2
|
+
import { c as C } from "../../index-DIxK0V-G.js";
|
3
|
+
import { forwardRef as N, useState as w, useEffect as v } from "react";
|
4
|
+
import { FIRST_PAGE_NUMBER as u, DEFAULT_PER_PAGE as A } from "./constants.js";
|
5
|
+
import { useWindowSize as E } from "../../hooks/useWindowSize/index.js";
|
6
|
+
import { MergedButton as h } from "../MergedButton/MergedButton.js";
|
7
|
+
import '../../assets/Pagination.css';const x = "_container_grwbf_3", j = "_ellipsis_grwbf_42", g = {
|
8
|
+
container: x,
|
9
|
+
"pagination-button": "_pagination-button_grwbf_18",
|
10
|
+
"is-active": "_is-active_grwbf_39",
|
11
|
+
ellipsis: j
|
12
12
|
}, B = ({ currentPageNumber: t, onClick: n, setCurrentPage: o }) => /* @__PURE__ */ i(
|
13
|
-
|
13
|
+
h,
|
14
14
|
{
|
15
15
|
buttons: [
|
16
16
|
{
|
@@ -32,7 +32,7 @@ import '../../assets/Pagination.css';const j = "_container_1pfd2_3", w = "_ellip
|
|
32
32
|
}) => {
|
33
33
|
const a = t >= n;
|
34
34
|
return /* @__PURE__ */ i(
|
35
|
-
|
35
|
+
h,
|
36
36
|
{
|
37
37
|
buttons: [
|
38
38
|
{
|
@@ -47,18 +47,18 @@ import '../../assets/Pagination.css';const j = "_container_1pfd2_3", w = "_ellip
|
|
47
47
|
]
|
48
48
|
}
|
49
49
|
);
|
50
|
-
},
|
51
|
-
|
50
|
+
}, _ = () => /* @__PURE__ */ i(
|
51
|
+
h,
|
52
52
|
{
|
53
53
|
buttons: [
|
54
54
|
{
|
55
55
|
children: "...",
|
56
56
|
variant: "transparent",
|
57
|
-
className:
|
57
|
+
className: C(g["pagination-button"], g.ellipsis)
|
58
58
|
}
|
59
59
|
]
|
60
60
|
}
|
61
|
-
),
|
61
|
+
), b = ({
|
62
62
|
currentPageNumber: t,
|
63
63
|
newPageNumber: n,
|
64
64
|
onClick: o,
|
@@ -72,8 +72,8 @@ import '../../assets/Pagination.css';const j = "_container_1pfd2_3", w = "_ellip
|
|
72
72
|
{
|
73
73
|
type: "button",
|
74
74
|
onClick: r,
|
75
|
-
className:
|
76
|
-
[
|
75
|
+
className: C(g["pagination-button"], {
|
76
|
+
[g["is-active"]]: a
|
77
77
|
}),
|
78
78
|
children: e
|
79
79
|
}
|
@@ -89,7 +89,7 @@ import '../../assets/Pagination.css';const j = "_container_1pfd2_3", w = "_ellip
|
|
89
89
|
for (let e = t; e <= n; e++)
|
90
90
|
r.push(
|
91
91
|
/* @__PURE__ */ i(
|
92
|
-
|
92
|
+
b,
|
93
93
|
{
|
94
94
|
currentPageNumber: o,
|
95
95
|
setCurrentPage: a,
|
@@ -105,21 +105,21 @@ import '../../assets/Pagination.css';const j = "_container_1pfd2_3", w = "_ellip
|
|
105
105
|
const {
|
106
106
|
rootClassName: o,
|
107
107
|
total: s,
|
108
|
-
perPage: a =
|
108
|
+
perPage: a = A,
|
109
109
|
currentPageNumber: r = u,
|
110
110
|
onChange: e
|
111
|
-
} = t, [c,
|
112
|
-
let
|
113
|
-
return
|
114
|
-
|
115
|
-
}, [r]), c <=
|
116
|
-
u +
|
111
|
+
} = t, [c, m] = w(r), l = Math.ceil(s / a), { width: k } = E(), f = k <= 650 ? 2 : 4;
|
112
|
+
let d = 0, p = 0;
|
113
|
+
return v(() => {
|
114
|
+
m(r);
|
115
|
+
}, [r]), c <= f ? (d = u, p = Math.min(
|
116
|
+
u + f,
|
117
117
|
l
|
118
|
-
)) : c > l -
|
118
|
+
)) : c > l - f ? (d = l - f, p = l) : (d = c - f / 2, p = c + f / 2), s <= a ? null : /* @__PURE__ */ P(
|
119
119
|
"nav",
|
120
120
|
{
|
121
121
|
"aria-label": "Постраничная навигация",
|
122
|
-
className:
|
122
|
+
className: C(g.container, o),
|
123
123
|
ref: n,
|
124
124
|
children: [
|
125
125
|
/* @__PURE__ */ i(
|
@@ -127,33 +127,33 @@ import '../../assets/Pagination.css';const j = "_container_1pfd2_3", w = "_ellip
|
|
127
127
|
{
|
128
128
|
currentPageNumber: c,
|
129
129
|
onClick: e,
|
130
|
-
setCurrentPage:
|
130
|
+
setCurrentPage: m
|
131
131
|
}
|
132
132
|
),
|
133
|
-
|
134
|
-
|
133
|
+
d > u && /* @__PURE__ */ i(
|
134
|
+
b,
|
135
135
|
{
|
136
136
|
newPageNumber: u,
|
137
137
|
currentPageNumber: c,
|
138
138
|
onClick: e,
|
139
|
-
setCurrentPage:
|
139
|
+
setCurrentPage: m
|
140
140
|
}
|
141
141
|
),
|
142
|
-
|
142
|
+
d > u + 1 && /* @__PURE__ */ i(_, {}),
|
143
143
|
R({
|
144
|
-
start:
|
145
|
-
end:
|
144
|
+
start: d,
|
145
|
+
end: p,
|
146
146
|
currentPageNumber: c,
|
147
|
-
setCurrentPage:
|
147
|
+
setCurrentPage: m,
|
148
148
|
onClick: e
|
149
149
|
}),
|
150
|
-
|
151
|
-
|
152
|
-
|
150
|
+
p < l - 1 && /* @__PURE__ */ i(_, {}),
|
151
|
+
p < l && /* @__PURE__ */ i(
|
152
|
+
b,
|
153
153
|
{
|
154
154
|
newPageNumber: l,
|
155
155
|
currentPageNumber: c,
|
156
|
-
setCurrentPage:
|
156
|
+
setCurrentPage: m,
|
157
157
|
onClick: e
|
158
158
|
}
|
159
159
|
),
|
@@ -161,7 +161,7 @@ import '../../assets/Pagination.css';const j = "_container_1pfd2_3", w = "_ellip
|
|
161
161
|
I,
|
162
162
|
{
|
163
163
|
currentPageNumber: c,
|
164
|
-
setCurrentPage:
|
164
|
+
setCurrentPage: m,
|
165
165
|
lastPageNumber: l,
|
166
166
|
onClick: e
|
167
167
|
}
|
@@ -50,6 +50,18 @@ type TProps = SwiperProps & {
|
|
50
50
|
* Дополнительные классы для картинок
|
51
51
|
*/
|
52
52
|
imageClassName?: string;
|
53
|
+
/**
|
54
|
+
* Дополнительные классы для навигации
|
55
|
+
*/
|
56
|
+
navigationClassName?: string;
|
57
|
+
/**
|
58
|
+
* Дополнительные классы для нижней панели
|
59
|
+
*/
|
60
|
+
sliderBottomPanelClassName?: string;
|
61
|
+
/**
|
62
|
+
* Дополнительные классы для описания слайдов
|
63
|
+
*/
|
64
|
+
descriptionsClassName?: string;
|
53
65
|
/**
|
54
66
|
* Контент для слайдера.
|
55
67
|
*/
|
@@ -59,5 +71,5 @@ type TProps = SwiperProps & {
|
|
59
71
|
*/
|
60
72
|
images?: TSlideImage[];
|
61
73
|
};
|
62
|
-
export default function Slider({ images, children, onSlideClick, swiperClassName, slideClassName, imageClassName, progressBarPosition, isFullPaginationWidth, needNavigation, leftDescription, rightDescription, delay, ...props }: TProps): import("react/jsx-runtime").JSX.Element;
|
74
|
+
export default function Slider({ images, children, onSlideClick, swiperClassName, slideClassName, imageClassName, navigationClassName, sliderBottomPanelClassName, descriptionsClassName, progressBarPosition, isFullPaginationWidth, needNavigation, leftDescription, rightDescription, delay, ...props }: TProps): import("react/jsx-runtime").JSX.Element;
|
63
75
|
export {};
|