mimir-ui-kit 1.38.11 → 1.38.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- ._container_15wir_3{--pagination-active: #e5e5e5;display:flex;gap:var(--mimir-space-2xl);justify-content:center;margin:0 auto}._container_15wir_3:not(:last-child){margin-bottom:0 auto var(--mimir-space-xl)}@media (max-width: 767.9px){._container_15wir_3{gap:var(--mimir-space-xs)}}._container_15wir_3 ._pagination-button_15wir_18{display:flex;align-items:center;justify-content:center;width:40px;height:40px;color:var(--black-100);font-size:var(--mimir-size-text-l);font-family:var(--mimir-font-inter);border-radius:var(--mimir-control-radius);font-feature-settings:"zero"}._container_15wir_3 ._pagination-button_15wir_18:active{background-color:var(--pagination-active)}._container_15wir_3 ._pagination-button_15wir_18:focus-visible,._container_15wir_3 ._pagination-button_15wir_18:hover{color:var(--sapphire-normal);-webkit-text-decoration:none;text-decoration:none}._container_15wir_3 ._pagination-button_15wir_18._is-active_15wir_37{background-color:var(--pagination-active)}._container_15wir_3 ._ellipsis_15wir_40{-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 k } from "../../index-DIxK0V-G.js";
2
+ import { c as C } from "../../index-DIxK0V-G.js";
3
3
  import { forwardRef as N, useState as w, useEffect as v } from "react";
4
4
  import { FIRST_PAGE_NUMBER as u, DEFAULT_PER_PAGE as A } from "./constants.js";
5
5
  import { useWindowSize as E } from "../../hooks/useWindowSize/index.js";
6
- import { MergedButton as _ } from "../MergedButton/MergedButton.js";
7
- import '../../assets/Pagination.css';const x = "_container_15wir_3", j = "_ellipsis_15wir_40", C = {
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
8
  container: x,
9
- "pagination-button": "_pagination-button_15wir_18",
10
- "is-active": "_is-active_15wir_37",
9
+ "pagination-button": "_pagination-button_grwbf_18",
10
+ "is-active": "_is-active_grwbf_39",
11
11
  ellipsis: j
12
12
  }, B = ({ currentPageNumber: t, onClick: n, setCurrentPage: o }) => /* @__PURE__ */ i(
13
- _,
13
+ h,
14
14
  {
15
15
  buttons: [
16
16
  {
@@ -30,50 +30,50 @@ import '../../assets/Pagination.css';const x = "_container_15wir_3", j = "_ellip
30
30
  onClick: o,
31
31
  setCurrentPage: s
32
32
  }) => {
33
- const r = t >= n;
33
+ const a = t >= n;
34
34
  return /* @__PURE__ */ i(
35
- _,
35
+ h,
36
36
  {
37
37
  buttons: [
38
38
  {
39
39
  isIconButton: !0,
40
40
  variant: "white",
41
41
  onClick: () => {
42
- r || (s(t + 1), o(t + 1));
42
+ a || (s(t + 1), o(t + 1));
43
43
  },
44
- disabled: r,
44
+ disabled: a,
45
45
  iconName: "ArrowRight16px"
46
46
  }
47
47
  ]
48
48
  }
49
49
  );
50
- }, g = () => /* @__PURE__ */ i(
51
- _,
50
+ }, _ = () => /* @__PURE__ */ i(
51
+ h,
52
52
  {
53
53
  buttons: [
54
54
  {
55
55
  children: "...",
56
- variant: "gray",
57
- className: C.ellipsis
56
+ variant: "transparent",
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,
65
65
  setCurrentPage: s
66
66
  }) => {
67
- const r = t === n, a = () => {
67
+ const a = t === n, r = () => {
68
68
  s(n), o(n);
69
69
  }, e = n < 10 ? `0${n}` : n;
70
70
  return /* @__PURE__ */ i(
71
71
  "button",
72
72
  {
73
73
  type: "button",
74
- onClick: a,
75
- className: k(C["pagination-button"], {
76
- [C["is-active"]]: r
74
+ onClick: r,
75
+ className: C(g["pagination-button"], {
76
+ [g["is-active"]]: a
77
77
  }),
78
78
  children: e
79
79
  }
@@ -83,43 +83,43 @@ import '../../assets/Pagination.css';const x = "_container_15wir_3", j = "_ellip
83
83
  end: n,
84
84
  currentPageNumber: o,
85
85
  onClick: s,
86
- setCurrentPage: r
86
+ setCurrentPage: a
87
87
  }) => {
88
- const a = [];
88
+ const r = [];
89
89
  for (let e = t; e <= n; e++)
90
- a.push(
90
+ r.push(
91
91
  /* @__PURE__ */ i(
92
- h,
92
+ b,
93
93
  {
94
94
  currentPageNumber: o,
95
- setCurrentPage: r,
95
+ setCurrentPage: a,
96
96
  newPageNumber: e,
97
97
  onClick: s
98
98
  },
99
99
  e
100
100
  )
101
101
  );
102
- return a;
103
- }, T = N(
102
+ return r;
103
+ }, U = N(
104
104
  (t, n) => {
105
105
  const {
106
106
  rootClassName: o,
107
107
  total: s,
108
- perPage: r = A,
109
- currentPageNumber: a = u,
108
+ perPage: a = A,
109
+ currentPageNumber: r = u,
110
110
  onChange: e
111
- } = t, [c, m] = w(a), l = Math.ceil(s / r), { width: b } = E(), d = b <= 650 ? 2 : 4;
112
- let p = 0, f = 0;
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
113
  return v(() => {
114
- m(a);
115
- }, [a]), c <= d ? (p = u, f = Math.min(
116
- u + d,
114
+ m(r);
115
+ }, [r]), c <= f ? (d = u, p = Math.min(
116
+ u + f,
117
117
  l
118
- )) : c > l - d ? (p = l - d, f = l) : (p = c - d / 2, f = c + d / 2), s <= r ? 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: k(C.container, o),
122
+ className: C(g.container, o),
123
123
  ref: n,
124
124
  children: [
125
125
  /* @__PURE__ */ i(
@@ -130,8 +130,8 @@ import '../../assets/Pagination.css';const x = "_container_15wir_3", j = "_ellip
130
130
  setCurrentPage: m
131
131
  }
132
132
  ),
133
- p > u && /* @__PURE__ */ i(
134
- h,
133
+ d > u && /* @__PURE__ */ i(
134
+ b,
135
135
  {
136
136
  newPageNumber: u,
137
137
  currentPageNumber: c,
@@ -139,17 +139,17 @@ import '../../assets/Pagination.css';const x = "_container_15wir_3", j = "_ellip
139
139
  setCurrentPage: m
140
140
  }
141
141
  ),
142
- p > u + 1 && /* @__PURE__ */ i(g, {}),
142
+ d > u + 1 && /* @__PURE__ */ i(_, {}),
143
143
  R({
144
- start: p,
145
- end: f,
144
+ start: d,
145
+ end: p,
146
146
  currentPageNumber: c,
147
147
  setCurrentPage: m,
148
148
  onClick: e
149
149
  }),
150
- f < l - 1 && /* @__PURE__ */ i(g, {}),
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,
@@ -172,5 +172,5 @@ import '../../assets/Pagination.css';const x = "_container_15wir_3", j = "_ellip
172
172
  }
173
173
  );
174
174
  export {
175
- T as Pagination
175
+ U as Pagination
176
176
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mimir-ui-kit",
3
3
  "private": false,
4
- "version": "1.38.11",
4
+ "version": "1.38.13",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {