mimir-ui-kit 1.38.12 → 1.38.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- ._container_1pfd2_3{--pagination-active: #e5e5e5;display:flex;gap:var(--mimir-space-2xl);justify-content:center;margin:0 auto}._container_1pfd2_3:not(:last-child){margin-bottom:0 auto var(--mimir-space-xl)}@media (max-width: 767.9px){._container_1pfd2_3{gap:var(--mimir-space-xs)}}._container_1pfd2_3 ._pagination-button_1pfd2_18{display:flex;align-items:center;justify-content:center;width:40px;height:40px;color:var(--black-100);font-weight:var(--mimir-font-weight-text-regular);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_1pfd2_3 ._pagination-button_1pfd2_18:active{background-color:var(--pagination-active)}._container_1pfd2_3 ._pagination-button_1pfd2_18:focus-visible,._container_1pfd2_3 ._pagination-button_1pfd2_18:hover{color:var(--sapphire-normal);-webkit-text-decoration:none;text-decoration:none}._container_1pfd2_3 ._pagination-button_1pfd2_18._is-active_1pfd2_39{background-color:var(--pagination-active)}._container_1pfd2_3 ._ellipsis_1pfd2_42{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}
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 _ } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as N, useState as v, useEffect as A } from "react";
4
- import { FIRST_PAGE_NUMBER as u, DEFAULT_PER_PAGE as E } from "./constants.js";
5
- import { useWindowSize as x } from "../../hooks/useWindowSize/index.js";
6
- import { MergedButton as g } from "../MergedButton/MergedButton.js";
7
- import '../../assets/Pagination.css';const j = "_container_1pfd2_3", w = "_ellipsis_1pfd2_42", C = {
8
- container: j,
9
- "pagination-button": "_pagination-button_1pfd2_18",
10
- "is-active": "_is-active_1pfd2_39",
11
- ellipsis: w
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
- g,
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
- g,
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
- }, k = () => /* @__PURE__ */ i(
51
- g,
50
+ }, _ = () => /* @__PURE__ */ i(
51
+ h,
52
52
  {
53
53
  buttons: [
54
54
  {
55
55
  children: "...",
56
56
  variant: "transparent",
57
- className: _(C["pagination-button"], C.ellipsis)
57
+ className: C(g["pagination-button"], g.ellipsis)
58
58
  }
59
59
  ]
60
60
  }
61
- ), h = ({
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: _(C["pagination-button"], {
76
- [C["is-active"]]: a
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
- h,
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 = E,
108
+ perPage: a = A,
109
109
  currentPageNumber: r = u,
110
110
  onChange: e
111
- } = t, [c, d] = v(r), l = Math.ceil(s / a), { width: b } = x(), p = b <= 650 ? 2 : 4;
112
- let m = 0, f = 0;
113
- return A(() => {
114
- d(r);
115
- }, [r]), c <= p ? (m = u, f = Math.min(
116
- u + p,
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 - p ? (m = l - p, f = l) : (m = c - p / 2, f = c + p / 2), s <= a ? null : /* @__PURE__ */ P(
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: _(C.container, o),
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: d
130
+ setCurrentPage: m
131
131
  }
132
132
  ),
133
- m > u && /* @__PURE__ */ i(
134
- h,
133
+ d > u && /* @__PURE__ */ i(
134
+ b,
135
135
  {
136
136
  newPageNumber: u,
137
137
  currentPageNumber: c,
138
138
  onClick: e,
139
- setCurrentPage: d
139
+ setCurrentPage: m
140
140
  }
141
141
  ),
142
- m > u + 1 && /* @__PURE__ */ i(k, {}),
142
+ d > u + 1 && /* @__PURE__ */ i(_, {}),
143
143
  R({
144
- start: m,
145
- end: f,
144
+ start: d,
145
+ end: p,
146
146
  currentPageNumber: c,
147
- setCurrentPage: d,
147
+ setCurrentPage: m,
148
148
  onClick: e
149
149
  }),
150
- f < l - 1 && /* @__PURE__ */ i(k, {}),
151
- f < l && /* @__PURE__ */ i(
152
- h,
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: d,
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: d,
164
+ setCurrentPage: m,
165
165
  lastPageNumber: l,
166
166
  onClick: e
167
167
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.38.12",
4
+ "version": "1.38.13",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {