mimir-ui-kit 1.42.1 → 1.43.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/ProgressBar-COdzy3fY.js +67 -0
- package/dist/assets/CardTrail.css +1 -1
- package/dist/assets/MultiSelectSearch.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/assets/Switcher.css +1 -1
- package/dist/assets/TabTrail.css +1 -1
- package/dist/assets/hooks.css +1 -0
- package/dist/{combobox-Dv6-ANkb.js → combobox-fIVOzEhl.js} +6 -6
- package/dist/components/Accordion/Accordion.d.ts +6 -0
- package/dist/components/Accordion/Accordion.js +202 -182
- package/dist/components/AnchorLink/Link.d.ts +2 -0
- package/dist/components/AnchorLink/Link.js +54 -42
- package/dist/components/CardTrail/CardTrail.js +47 -46
- package/dist/components/CardTrail/utils.d.ts +0 -1
- package/dist/components/CardTrail/utils.js +7 -8
- package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
- package/dist/components/DatePicker/DatePicker.d.ts +32 -0
- package/dist/components/DatePicker/DatePicker.js +125 -111
- package/dist/components/DatePicker/DatePickerModal.d.ts +5 -1
- package/dist/components/DatePicker/DatePickerModal.js +97 -75
- package/dist/components/DatePicker/MonthPickerModal.d.ts +5 -1
- package/dist/components/DatePicker/MonthPickerModal.js +96 -58
- package/dist/components/DatePicker/YearPickerModal.d.ts +5 -1
- package/dist/components/DatePicker/YearPickerModal.js +75 -57
- package/dist/components/Drawer/Drawer.d.ts +7 -1
- package/dist/components/Drawer/Drawer.js +122 -106
- package/dist/components/Drawer/hooks.d.ts +9 -0
- package/dist/components/Drawer/hooks.js +24 -0
- package/dist/components/Dropdown/Dropdown.d.ts +18 -1
- package/dist/components/Dropdown/Dropdown.js +361 -343
- package/dist/components/Dropdown/constants.d.ts +11 -0
- package/dist/components/Dropdown/constants.js +5 -0
- package/dist/components/Dropdown/hooks.d.ts +19 -0
- package/dist/components/Dropdown/hooks.js +11 -0
- package/dist/components/Dropdown/index.d.ts +1 -0
- package/dist/components/Dropdown/index.js +5 -2
- package/dist/components/Image/Image.d.ts +16 -0
- package/dist/components/Image/Image.js +65 -37
- package/dist/components/MultiSelectSearch/MultiSelectSearch.d.ts +8 -1
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +461 -302
- package/dist/components/MultiSelectSearch/constants.d.ts +6 -0
- package/dist/components/MultiSelectSearch/constants.js +7 -5
- package/dist/components/MultiSelectSearch/index.d.ts +1 -1
- package/dist/components/MultiSelectSearch/index.js +5 -4
- package/dist/components/MultiSelectSearch/types.d.ts +33 -1
- package/dist/components/MultiSelectSearch/utils.d.ts +1 -0
- package/dist/components/MultiSelectSearch/utils.js +31 -17
- package/dist/components/Pagination/Pagination.d.ts +23 -0
- package/dist/components/Pagination/Pagination.js +137 -99
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/SelectSearch/SelectSearch.d.ts +8 -1
- package/dist/components/SelectSearch/SelectSearch.js +381 -220
- package/dist/components/SelectSearch/constants.d.ts +6 -0
- package/dist/components/SelectSearch/constants.js +3 -2
- package/dist/components/SelectSearch/index.d.ts +1 -1
- package/dist/components/SelectSearch/index.js +5 -4
- package/dist/components/SelectSearch/types.d.ts +32 -1
- package/dist/components/SelectSearch/utils.d.ts +2 -0
- package/dist/components/SelectSearch/utils.js +28 -14
- package/dist/components/Switcher/Switcher.js +66 -59
- package/dist/components/Switcher/types.d.ts +1 -0
- package/dist/components/TabTrail/TabTrail.d.ts +9 -0
- package/dist/components/TabTrail/TabTrail.js +198 -190
- package/dist/components/Toasts/ProgressBar.d.ts +4 -2
- package/dist/components/Toasts/ProgressBar.js +1 -1
- package/dist/components/Toasts/Toast.d.ts +5 -1
- package/dist/components/Toasts/Toast.js +59 -44
- package/dist/components/Toasts/ToastList.js +1 -1
- package/dist/components/Toasts/ToastsProvider.js +1 -1
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.js +154 -149
- package/dist/{field-BP5-U1Nr.js → field-BLi5834s.js} +2 -2
- package/dist/{focus-management-Dp2_vbQ3.js → focus-management-BAl0GmRk.js} +1 -1
- package/dist/{hidden-Dn4lM6EL.js → hidden-CkTYbiNM.js} +1 -1
- package/dist/hooks/useTimer/index.d.ts +2 -1
- package/dist/hooks/useTimer/index.js +55 -41
- package/dist/hooks-HgN6Yauq.js +117 -0
- package/dist/index.js +182 -177
- package/dist/{keyboard-CUMsrFX1.js → keyboard-wis2TUql.js} +2 -2
- package/dist/{label-DOlEWXBl.js → label-BmphTIGY.js} +2 -2
- package/dist/{open-closed-CkTbpRyi.js → open-closed-CJijMeI2.js} +1 -1
- package/dist/{portal-C_u5auU1.js → portal-BnEqSZwo.js} +2 -2
- package/dist/{use-active-press-BVQqDQ3V.js → use-active-press-CnDeVvQq.js} +1 -1
- package/dist/{use-is-mounted-D7cq4xsa.js → use-is-mounted-MBU4fiLr.js} +1 -1
- package/package.json +3 -1
- package/dist/ProgressBar-DEFs1tWq.js +0 -55
- package/dist/assets/Dropdown.css +0 -1
- package/dist/components/Pagination/types.d.ts +0 -0
@@ -5,3 +5,9 @@ export declare enum EMultiSelectSearchSize {
|
|
5
5
|
export declare const MOBILE_BREAKPOINT = 767;
|
6
6
|
export declare const MOBILE_MENU_HEIGHT = 264;
|
7
7
|
export declare const DESKTOP_MENU_HEIGHT = 320;
|
8
|
+
export declare enum ELoadingIndicatorPlacement {
|
9
|
+
Input = "input",
|
10
|
+
Dropdown = "dropdown",
|
11
|
+
Both = "both",
|
12
|
+
None = "none"
|
13
|
+
}
|
@@ -1,8 +1,10 @@
|
|
1
|
-
var
|
2
|
-
const _ = 767,
|
1
|
+
var p = /* @__PURE__ */ ((o) => (o.M = "m", o.L = "l", o))(p || {});
|
2
|
+
const _ = 767, B = 264, E = 320;
|
3
|
+
var r = /* @__PURE__ */ ((o) => (o.Input = "input", o.Dropdown = "dropdown", o.Both = "both", o.None = "none", o))(r || {});
|
3
4
|
export {
|
4
|
-
|
5
|
-
|
5
|
+
E as DESKTOP_MENU_HEIGHT,
|
6
|
+
r as ELoadingIndicatorPlacement,
|
7
|
+
p as EMultiSelectSearchSize,
|
6
8
|
_ as MOBILE_BREAKPOINT,
|
7
|
-
|
9
|
+
B as MOBILE_MENU_HEIGHT
|
8
10
|
};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
export { MultiSelectSearch } from './MultiSelectSearch';
|
2
2
|
export type { TMultiSelectSearchProps, TMultiSelectOption } from './types';
|
3
|
-
export { EMultiSelectSearchSize } from './constants';
|
3
|
+
export { EMultiSelectSearchSize, ELoadingIndicatorPlacement } from './constants';
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { MultiSelectSearch as
|
2
|
-
import { EMultiSelectSearchSize as
|
1
|
+
import { MultiSelectSearch as r } from "./MultiSelectSearch.js";
|
2
|
+
import { ELoadingIndicatorPlacement as o, EMultiSelectSearchSize as a } from "./constants.js";
|
3
3
|
export {
|
4
|
-
|
5
|
-
|
4
|
+
o as ELoadingIndicatorPlacement,
|
5
|
+
a as EMultiSelectSearchSize,
|
6
|
+
r as MultiSelectSearch
|
6
7
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
|
-
import { EMultiSelectSearchSize } from './constants';
|
2
|
+
import { ELoadingIndicatorPlacement, EMultiSelectSearchSize } from './constants';
|
3
3
|
import { EChipVariant } from '../Chip';
|
4
4
|
import { TInputProps } from '../Input';
|
5
5
|
|
@@ -7,9 +7,12 @@ export type TMultiSelectOption = {
|
|
7
7
|
name: string;
|
8
8
|
id: number | string;
|
9
9
|
bottom?: ReactNode;
|
10
|
+
isGroupHeader?: boolean;
|
11
|
+
originalValue?: string;
|
10
12
|
[index: string]: unknown;
|
11
13
|
};
|
12
14
|
export type TMenuPlacement = 'top' | 'bottom';
|
15
|
+
export type TLoadingIndicatorPlacement = 'input' | 'dropdown' | 'none';
|
13
16
|
export type TMultiSelectSearchProps = Pick<TInputProps, 'withClearButton' | 'variant'> & {
|
14
17
|
/**
|
15
18
|
* Текущее выбранное значение.
|
@@ -69,4 +72,33 @@ export type TMultiSelectSearchProps = Pick<TInputProps, 'withClearButton' | 'var
|
|
69
72
|
autoPlacement?: boolean;
|
70
73
|
/** Функция обратного вызова, срабатывающая при открытии и закрытии выпадающего списка */
|
71
74
|
onIsOpen?: (value: boolean) => void;
|
75
|
+
/**
|
76
|
+
* Текст, отображаемый при отсутствии опций для выбора
|
77
|
+
*/
|
78
|
+
noOptionsText?: string | ReactNode;
|
79
|
+
/**
|
80
|
+
* Текст, отображаемый при отсутствии результатов поиска
|
81
|
+
*/
|
82
|
+
noMatchText?: string | ReactNode;
|
83
|
+
/**
|
84
|
+
* Функция обратного вызова, вызываемая при открытии выпадающего списка
|
85
|
+
* Можно использовать для загрузки данных
|
86
|
+
*/
|
87
|
+
loadOnOpen?: () => void;
|
88
|
+
/**
|
89
|
+
* Флаг состояния загрузки
|
90
|
+
*/
|
91
|
+
loading?: boolean;
|
92
|
+
/**
|
93
|
+
* Положение индикатора загрузки
|
94
|
+
*/
|
95
|
+
loadingIndicatorPlacement?: ELoadingIndicatorPlacement | `${ELoadingIndicatorPlacement}`;
|
96
|
+
/**
|
97
|
+
* Ключ объекта TMultiSelectOption, по которому нужно группировать элементы
|
98
|
+
*/
|
99
|
+
groupBy?: string;
|
100
|
+
/**
|
101
|
+
* Функция для получения заголовка группы из значения группировки
|
102
|
+
*/
|
103
|
+
getGroupTitle?: (groupValue: string) => string;
|
72
104
|
};
|
@@ -9,3 +9,4 @@ export declare const joinSelectedItems: (items: TMultiSelectOption[], displayVal
|
|
9
9
|
export declare const MULTISELECT_OPEN_EVENT = "multiselectOpen";
|
10
10
|
export declare const dispatchMultiselectOpen: (id: string) => void;
|
11
11
|
export declare const shouldShowMenuOnTop: (selectRef: React.RefObject<HTMLDivElement>, size: EMultiSelectSearchSize) => boolean;
|
12
|
+
export declare const prepareGroupedItems: (items: TMultiSelectOption[], groupBy: string, getGroupTitle: (value: string) => string) => TMultiSelectOption[];
|
@@ -1,28 +1,42 @@
|
|
1
|
-
import { EMultiSelectSearchSize as
|
1
|
+
import { EMultiSelectSearchSize as i, MOBILE_MENU_HEIGHT as c, DESKTOP_MENU_HEIGHT as a } from "./constants.js";
|
2
2
|
import "../../Input-BU_6U1CW.js";
|
3
|
-
import { EInputSize as
|
3
|
+
import { EInputSize as u } from "../Input/constants.js";
|
4
4
|
const m = (t) => {
|
5
5
|
switch (t) {
|
6
|
-
case
|
7
|
-
return
|
8
|
-
case
|
9
|
-
return
|
6
|
+
case i.M:
|
7
|
+
return u.M;
|
8
|
+
case i.L:
|
9
|
+
return u.L;
|
10
10
|
default:
|
11
|
-
return
|
11
|
+
return u.M;
|
12
12
|
}
|
13
|
-
},
|
14
|
-
window.dispatchEvent(new CustomEvent(
|
15
|
-
},
|
13
|
+
}, E = (t, e) => t ? e === i.L ? "DropdownArrowUp24px" : "DropdownArrowUp16px" : e === i.L ? "DropdownArrowDown24px" : "DropdownArrowBottom16px", f = (t, e) => t && t.length > 0 ? t.map((r) => r[e]).join(", ") : "", g = (t, e) => t.map((r) => r[e]).join(", "), d = "multiselectOpen", S = (t) => {
|
14
|
+
window.dispatchEvent(new CustomEvent(d, { detail: t }));
|
15
|
+
}, I = (t, e) => {
|
16
16
|
if (!t.current) return !1;
|
17
|
-
const
|
18
|
-
return
|
17
|
+
const r = t.current.getBoundingClientRect(), o = window.innerHeight, s = e === i.M ? c : a, p = o - r.bottom, n = r.top;
|
18
|
+
return p >= s ? !1 : n > p;
|
19
|
+
}, M = (t, e, r) => {
|
20
|
+
if (!t.length || !e) return t;
|
21
|
+
const o = [], s = /* @__PURE__ */ new Set();
|
22
|
+
for (const p of t) {
|
23
|
+
const n = String(p[e] || "Без группы");
|
24
|
+
s.has(n) || (s.add(n), o.push({
|
25
|
+
id: `group-header-${n}`,
|
26
|
+
name: r(n),
|
27
|
+
isGroupHeader: !0,
|
28
|
+
originalValue: n
|
29
|
+
})), o.push(p);
|
30
|
+
}
|
31
|
+
return o;
|
19
32
|
};
|
20
33
|
export {
|
21
|
-
|
34
|
+
d as MULTISELECT_OPEN_EVENT,
|
22
35
|
S as dispatchMultiselectOpen,
|
23
|
-
|
24
|
-
|
25
|
-
|
36
|
+
E as getDropdownArrowIcon,
|
37
|
+
f as getInitialInputValue,
|
38
|
+
g as joinSelectedItems,
|
26
39
|
m as mapSizeToInputSize,
|
27
|
-
|
40
|
+
M as prepareGroupedItems,
|
41
|
+
I as shouldShowMenuOnTop
|
28
42
|
};
|
@@ -2,18 +2,21 @@ export type TBackProps = {
|
|
2
2
|
currentPageNumber: number;
|
3
3
|
onClick: (nextPage: number) => void;
|
4
4
|
setCurrentPage: (nextPage: number) => void;
|
5
|
+
disabled?: boolean;
|
5
6
|
};
|
6
7
|
export type TNextProps = {
|
7
8
|
currentPageNumber: number;
|
8
9
|
lastPageNumber: number;
|
9
10
|
onClick: (nextPage: number) => void;
|
10
11
|
setCurrentPage: (nextPage: number) => void;
|
12
|
+
disabled?: boolean;
|
11
13
|
};
|
12
14
|
export type TItemProps = {
|
13
15
|
currentPageNumber: number;
|
14
16
|
newPageNumber: number;
|
15
17
|
onClick: (pageNumber: number) => void;
|
16
18
|
setCurrentPage: (pageNumber: number) => void;
|
19
|
+
disabled?: boolean;
|
17
20
|
};
|
18
21
|
export type TProps = {
|
19
22
|
/**
|
@@ -36,5 +39,25 @@ export type TProps = {
|
|
36
39
|
* Текущая страница
|
37
40
|
*/
|
38
41
|
currentPageNumber?: number;
|
42
|
+
/**
|
43
|
+
* Отключение пагинации
|
44
|
+
*/
|
45
|
+
disabled?: boolean;
|
46
|
+
/**
|
47
|
+
* Скрыть кнопку "Назад"
|
48
|
+
*/
|
49
|
+
hidePrevButton?: boolean;
|
50
|
+
/**
|
51
|
+
* Скрыть кнопку "Вперед"
|
52
|
+
*/
|
53
|
+
hideNextButton?: boolean;
|
54
|
+
/**
|
55
|
+
* Количество страниц по обе стороны от текущей страницы
|
56
|
+
*/
|
57
|
+
siblingCount?: number;
|
58
|
+
/**
|
59
|
+
* Количество страниц, отображаемых в начале и конце
|
60
|
+
*/
|
61
|
+
boundaryCount?: number;
|
39
62
|
};
|
40
63
|
export declare const Pagination: import('react').ForwardRefExoticComponent<TProps & import('react').RefAttributes<HTMLElement>>;
|
@@ -1,172 +1,210 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import { forwardRef as
|
4
|
-
import { FIRST_PAGE_NUMBER as
|
5
|
-
import { useWindowSize as
|
6
|
-
import { MergedButton as
|
7
|
-
import '../../assets/Pagination.css';const
|
8
|
-
|
9
|
-
"
|
10
|
-
|
11
|
-
ellipsis:
|
12
|
-
|
13
|
-
|
1
|
+
import { jsxs as k, jsx as a, Fragment as x } from "react/jsx-runtime";
|
2
|
+
import { c as P } from "../../index-DIxK0V-G.js";
|
3
|
+
import { forwardRef as M, useState as R, useEffect as S } from "react";
|
4
|
+
import { FIRST_PAGE_NUMBER as m, DEFAULT_PER_PAGE as j } from "./constants.js";
|
5
|
+
import { useWindowSize as $ } from "../../hooks/useWindowSize/index.js";
|
6
|
+
import { MergedButton as v } from "../MergedButton/MergedButton.js";
|
7
|
+
import '../../assets/Pagination.css';const F = "_container_uqdck_27", L = "_ellipsis_uqdck_42", G = "_disabled_uqdck_47", C = {
|
8
|
+
"pagination-button": "_pagination-button_uqdck_2",
|
9
|
+
"is-active": "_is-active_uqdck_23",
|
10
|
+
container: F,
|
11
|
+
ellipsis: L,
|
12
|
+
disabled: G
|
13
|
+
}, T = ({
|
14
|
+
currentPageNumber: t,
|
15
|
+
onClick: n,
|
16
|
+
setCurrentPage: c,
|
17
|
+
disabled: o
|
18
|
+
}) => /* @__PURE__ */ a(
|
19
|
+
v,
|
14
20
|
{
|
15
21
|
buttons: [
|
16
22
|
{
|
17
23
|
isIconButton: !0,
|
18
24
|
variant: "white",
|
19
25
|
onClick: () => {
|
20
|
-
t !==
|
26
|
+
t !== m && (c(t - 1), n(t - 1));
|
21
27
|
},
|
22
28
|
iconName: "ArrowLeft16px",
|
23
|
-
disabled: t ===
|
29
|
+
disabled: o || t === m,
|
24
30
|
"data-testid": "back-button"
|
25
31
|
}
|
26
32
|
]
|
27
33
|
}
|
28
|
-
),
|
34
|
+
), U = ({
|
29
35
|
currentPageNumber: t,
|
30
36
|
lastPageNumber: n,
|
31
|
-
onClick:
|
32
|
-
setCurrentPage:
|
37
|
+
onClick: c,
|
38
|
+
setCurrentPage: o,
|
39
|
+
disabled: r
|
33
40
|
}) => {
|
34
41
|
const s = t >= n;
|
35
|
-
return /* @__PURE__ */
|
36
|
-
|
42
|
+
return /* @__PURE__ */ a(
|
43
|
+
v,
|
37
44
|
{
|
38
45
|
buttons: [
|
39
46
|
{
|
40
47
|
isIconButton: !0,
|
41
48
|
variant: "white",
|
42
49
|
onClick: () => {
|
43
|
-
s || (
|
50
|
+
s || (o(t + 1), c(t + 1));
|
44
51
|
},
|
45
|
-
disabled: s,
|
52
|
+
disabled: r || s,
|
46
53
|
iconName: "ArrowRight16px",
|
47
54
|
"data-testid": "next-button"
|
48
55
|
}
|
49
56
|
]
|
50
57
|
}
|
51
58
|
);
|
52
|
-
},
|
53
|
-
|
59
|
+
}, B = () => /* @__PURE__ */ a(
|
60
|
+
v,
|
54
61
|
{
|
55
62
|
buttons: [
|
56
63
|
{
|
57
64
|
children: "...",
|
58
65
|
variant: "transparent",
|
59
|
-
className:
|
66
|
+
className: P(C["pagination-button"], C.ellipsis)
|
60
67
|
}
|
61
68
|
]
|
62
69
|
}
|
63
|
-
),
|
70
|
+
), N = ({
|
64
71
|
currentPageNumber: t,
|
65
72
|
newPageNumber: n,
|
66
|
-
onClick:
|
67
|
-
setCurrentPage:
|
73
|
+
onClick: c,
|
74
|
+
setCurrentPage: o,
|
75
|
+
disabled: r
|
68
76
|
}) => {
|
69
|
-
const s = t === n,
|
70
|
-
|
77
|
+
const s = t === n, i = () => {
|
78
|
+
r || (o(n), c(n));
|
71
79
|
}, e = n < 10 ? `0${n}` : n;
|
72
|
-
return /* @__PURE__ */
|
80
|
+
return /* @__PURE__ */ a(
|
73
81
|
"button",
|
74
82
|
{
|
75
83
|
"data-testid": `pagination-button-${e}`,
|
76
84
|
type: "button",
|
77
|
-
onClick:
|
78
|
-
|
79
|
-
|
85
|
+
onClick: i,
|
86
|
+
disabled: r,
|
87
|
+
className: P(C["pagination-button"], {
|
88
|
+
[C["is-active"]]: s
|
80
89
|
}),
|
81
90
|
children: e
|
82
91
|
}
|
83
92
|
);
|
84
|
-
},
|
93
|
+
}, z = ({
|
85
94
|
start: t,
|
86
95
|
end: n,
|
87
|
-
currentPageNumber:
|
88
|
-
onClick:
|
89
|
-
setCurrentPage:
|
96
|
+
currentPageNumber: c,
|
97
|
+
onClick: o,
|
98
|
+
setCurrentPage: r,
|
99
|
+
disabled: s
|
90
100
|
}) => {
|
91
|
-
const
|
101
|
+
const i = [];
|
92
102
|
for (let e = t; e <= n; e++)
|
93
|
-
|
94
|
-
/* @__PURE__ */
|
95
|
-
|
103
|
+
i.push(
|
104
|
+
/* @__PURE__ */ a(
|
105
|
+
N,
|
96
106
|
{
|
97
|
-
currentPageNumber:
|
98
|
-
setCurrentPage:
|
107
|
+
currentPageNumber: c,
|
108
|
+
setCurrentPage: r,
|
99
109
|
newPageNumber: e,
|
100
|
-
onClick:
|
110
|
+
onClick: o,
|
111
|
+
disabled: s
|
101
112
|
},
|
102
113
|
e
|
103
114
|
)
|
104
115
|
);
|
105
|
-
return
|
106
|
-
},
|
116
|
+
return i;
|
117
|
+
}, Q = M(
|
107
118
|
(t, n) => {
|
108
119
|
const {
|
109
|
-
rootClassName:
|
110
|
-
total:
|
111
|
-
perPage:
|
112
|
-
currentPageNumber:
|
113
|
-
onChange:
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
120
|
+
rootClassName: c,
|
121
|
+
total: o,
|
122
|
+
perPage: r = j,
|
123
|
+
currentPageNumber: s = m,
|
124
|
+
onChange: i,
|
125
|
+
disabled: e = !1,
|
126
|
+
hidePrevButton: E = !1,
|
127
|
+
hideNextButton: y = !1,
|
128
|
+
siblingCount: A,
|
129
|
+
boundaryCount: l = 1
|
130
|
+
} = t, [u, g] = R(s), d = Math.ceil(o / r), { width: q } = $(), w = q <= 650 ? 1 : 2, h = A !== void 0 ? A : w;
|
131
|
+
let b = 0, p = 0;
|
132
|
+
return S(() => {
|
133
|
+
g(s);
|
134
|
+
}, [s]), u <= l + h + 1 ? (b = m, p = Math.min(
|
135
|
+
l + h * 2 + 1,
|
136
|
+
d
|
137
|
+
)) : u >= d - l - h ? (b = Math.max(
|
138
|
+
d - l - h * 2,
|
139
|
+
m
|
140
|
+
), p = d) : (b = u - h, p = u + h), o <= r ? null : /* @__PURE__ */ k(
|
122
141
|
"nav",
|
123
142
|
{
|
124
143
|
"aria-label": "Постраничная навигация",
|
125
|
-
className:
|
144
|
+
className: P(C.container, c, {
|
145
|
+
[C.disabled]: e
|
146
|
+
}),
|
126
147
|
ref: n,
|
127
148
|
children: [
|
128
|
-
/* @__PURE__ */
|
129
|
-
|
130
|
-
{
|
131
|
-
currentPageNumber: c,
|
132
|
-
onClick: e,
|
133
|
-
setCurrentPage: d
|
134
|
-
}
|
135
|
-
),
|
136
|
-
p > u && /* @__PURE__ */ i(
|
137
|
-
C,
|
149
|
+
!E && /* @__PURE__ */ a(
|
150
|
+
T,
|
138
151
|
{
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
152
|
+
currentPageNumber: u,
|
153
|
+
onClick: i,
|
154
|
+
setCurrentPage: g,
|
155
|
+
disabled: e
|
143
156
|
}
|
144
157
|
),
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
158
|
+
b > m && /* @__PURE__ */ k(x, { children: [
|
159
|
+
Array.from({ length: l }).map((I, _) => {
|
160
|
+
const f = m + _;
|
161
|
+
return f >= b ? null : /* @__PURE__ */ a(
|
162
|
+
N,
|
163
|
+
{
|
164
|
+
newPageNumber: f,
|
165
|
+
currentPageNumber: u,
|
166
|
+
onClick: i,
|
167
|
+
setCurrentPage: g,
|
168
|
+
disabled: e
|
169
|
+
},
|
170
|
+
`boundary-start-${f}`
|
171
|
+
);
|
172
|
+
}),
|
173
|
+
b > l + m && /* @__PURE__ */ a(B, {})
|
174
|
+
] }),
|
175
|
+
z({
|
176
|
+
start: b,
|
177
|
+
end: p,
|
178
|
+
currentPageNumber: u,
|
179
|
+
setCurrentPage: g,
|
180
|
+
onClick: i,
|
181
|
+
disabled: e
|
152
182
|
}),
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
183
|
+
p < d && /* @__PURE__ */ k(x, { children: [
|
184
|
+
p < d - l && /* @__PURE__ */ a(B, {}),
|
185
|
+
Array.from({ length: l }).map((I, _) => {
|
186
|
+
const f = d - l + 1 + _;
|
187
|
+
return f <= p ? null : /* @__PURE__ */ a(
|
188
|
+
N,
|
189
|
+
{
|
190
|
+
newPageNumber: f,
|
191
|
+
currentPageNumber: u,
|
192
|
+
onClick: i,
|
193
|
+
setCurrentPage: g,
|
194
|
+
disabled: e
|
195
|
+
},
|
196
|
+
`boundary-end-${f}`
|
197
|
+
);
|
198
|
+
})
|
199
|
+
] }),
|
200
|
+
!y && /* @__PURE__ */ a(
|
201
|
+
U,
|
165
202
|
{
|
166
|
-
currentPageNumber:
|
167
|
-
setCurrentPage:
|
168
|
-
lastPageNumber:
|
169
|
-
onClick:
|
203
|
+
currentPageNumber: u,
|
204
|
+
setCurrentPage: g,
|
205
|
+
lastPageNumber: d,
|
206
|
+
onClick: i,
|
207
|
+
disabled: e
|
170
208
|
}
|
171
209
|
)
|
172
210
|
]
|
@@ -175,5 +213,5 @@ import '../../assets/Pagination.css';const j = "_container_12l37_2", w = "_ellip
|
|
175
213
|
}
|
176
214
|
);
|
177
215
|
export {
|
178
|
-
|
216
|
+
Q as Pagination
|
179
217
|
};
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsxs as ee, jsx as S, Fragment as _e } from "react/jsx-runtime";
|
2
|
-
import { K as M, w as ke, a as oe, z as te, U as ie, b as Oe, T as we, j as ye, u as Pe, I as Ee, G as Te, p as De } from "../../label-
|
3
|
-
import { W as V, y as W, o as L, H as K, s as ne, n as se, $ as le, b as de, D as ue, a as Ce, u as Ge, c as F } from "../../keyboard-
|
2
|
+
import { K as M, w as ke, a as oe, z as te, U as ie, b as Oe, T as we, j as ye, u as Pe, I as Ee, G as Te, p as De } from "../../label-BmphTIGY.js";
|
3
|
+
import { W as V, y as W, o as L, H as K, s as ne, n as se, $ as le, b as de, D as ue, a as Ce, u as Ge, c as F } from "../../keyboard-wis2TUql.js";
|
4
4
|
import E, { createContext as ce, useId as q, useReducer as xe, useRef as B, useMemo as T, useCallback as ze, useContext as pe, forwardRef as Fe } from "react";
|
5
5
|
import { u as Ne } from "../../use-by-comparator-CVuf9KBq.js";
|
6
6
|
import { r as fe } from "../../bugs-diTMAGNw.js";
|
7
|
-
import { P as re, F as j, T as ae, _ as Ae } from "../../focus-management-
|
7
|
+
import { P as re, F as j, T as ae, _ as Ae } from "../../focus-management-BAl0GmRk.js";
|
8
8
|
import { c as H } from "../../index-DIxK0V-G.js";
|
9
9
|
import '../../assets/RadioGroup.css';var Ie = ((e) => (e[e.RegisterOption = 0] = "RegisterOption", e[e.UnregisterOption = 1] = "UnregisterOption", e))(Ie || {});
|
10
10
|
let Se = { 0(e, r) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ESelectSearchSize } from './constants';
|
1
|
+
import { ELoadingIndicatorPlacement, ESelectSearchSize } from './constants';
|
2
2
|
import { TSelectOption } from './types';
|
3
3
|
|
4
4
|
export declare const SelectSearch: import('react').ForwardRefExoticComponent<Pick<import('../Input').TInputProps, "variant" | "withClearButton"> & {
|
@@ -19,4 +19,11 @@ export declare const SelectSearch: import('react').ForwardRefExoticComponent<Pic
|
|
19
19
|
disableInput?: boolean;
|
20
20
|
autocomplete?: "on" | "off";
|
21
21
|
immediate?: boolean;
|
22
|
+
noOptionsText?: string | import('react').ReactNode;
|
23
|
+
noMatchText?: string | import('react').ReactNode;
|
24
|
+
loadOnOpen?: () => void;
|
25
|
+
loading?: boolean;
|
26
|
+
loadingIndicatorPlacement?: ELoadingIndicatorPlacement | `${ELoadingIndicatorPlacement}`;
|
27
|
+
groupBy?: string;
|
28
|
+
getGroupTitle?: (groupValue: string) => string;
|
22
29
|
} & import('react').RefAttributes<HTMLElement>>;
|