mimir-ui-kit 1.43.10 → 1.43.11
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/Input-CGZoshMl.js +224 -0
- package/dist/assets/Accordion.css +1 -1
- package/dist/assets/AccordionItem.css +1 -1
- package/dist/assets/Avatar.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/CarBodyButton.css +1 -0
- package/dist/assets/CheckboxMimir.css +1 -1
- package/dist/assets/Chip.css +1 -1
- package/dist/assets/Drawer.css +1 -1
- package/dist/assets/GosZnak.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputPassword.css +1 -1
- package/dist/assets/InputRangeSlider.css +1 -1
- package/dist/assets/Link.css +1 -1
- package/dist/assets/ListFiles.css +1 -1
- package/dist/assets/ListPhotos.css +1 -1
- package/dist/assets/MessageShortReply.css +1 -1
- package/dist/assets/MiniButton.css +1 -0
- package/dist/assets/MultiSelectSearch.css +1 -1
- package/dist/assets/NotificationBadge.css +1 -1
- package/dist/assets/OtpInput.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/RoundButton.css +1 -0
- package/dist/assets/ScrollWrapper.css +1 -0
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/assets/hooks.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/Accordion/Accordion.d.ts +10 -3
- package/dist/components/Accordion/Accordion.js +286 -212
- package/dist/components/Accordion/AccordionItem/AccordionItem.js +3 -3
- package/dist/components/Accordion/constants.d.ts +0 -4
- package/dist/components/Accordion/constants.js +4 -5
- package/dist/components/AnchorLink/Link.js +21 -20
- package/dist/components/Avatar/Avatar.js +26 -26
- package/dist/components/Button/Button.js +110 -87
- package/dist/components/Button/constants.d.ts +8 -2
- package/dist/components/Button/constants.js +6 -5
- package/dist/components/CarBodyButton/CarBodyButton.d.ts +26 -0
- package/dist/components/CarBodyButton/CarBodyButton.js +40 -0
- package/dist/components/CarBodyButton/index.d.ts +1 -0
- package/dist/components/CarBodyButton/index.js +4 -0
- package/dist/components/CheckboxMimir/CheckboxMimir.d.ts +2 -0
- package/dist/components/CheckboxMimir/CheckboxMimir.js +37 -35
- package/dist/components/Chip/Chip.js +17 -17
- package/dist/components/DatePicker/DatePicker.d.ts +8 -0
- package/dist/components/DatePicker/DatePicker.js +182 -169
- package/dist/components/DatePicker/DatePickerModal.js +134 -98
- package/dist/components/DatePicker/MonthPickerModal.js +115 -95
- package/dist/components/DatePicker/YearPickerModal.js +109 -89
- package/dist/components/DatePicker/constants.d.ts +1 -0
- package/dist/components/DatePicker/constants.js +1 -1
- package/dist/components/DatePicker/hooks.d.ts +2 -1
- package/dist/components/DatePicker/hooks.js +12 -12
- package/dist/components/Drawer/Drawer.js +172 -138
- package/dist/components/Drawer/ScrollWrapper/ScrollWrapper.d.ts +11 -0
- package/dist/components/Drawer/ScrollWrapper/ScrollWrapper.js +27 -0
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/Dropdown/hooks.js +1 -1
- package/dist/components/GosZnak/GosZnak.js +47 -38
- package/dist/components/GosZnak/utils.d.ts +6 -0
- package/dist/components/GosZnak/utils.js +15 -0
- package/dist/components/Input/Input.d.ts +4 -0
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.js +38 -42
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/InputRangeSlider/InputRangeSlider.js +159 -139
- package/dist/components/InputRangeSlider/constants.d.ts +5 -0
- package/dist/components/InputRangeSlider/constants.js +11 -6
- package/dist/components/ListFiles/ListFiles.js +41 -39
- package/dist/components/ListPhotos/ListPhotos.js +17 -18
- package/dist/components/MessageShortReply/MessageShortReply.js +34 -34
- package/dist/components/{InputClearButton/ClearButton.d.ts → MiniButton/MiniButton.d.ts} +17 -8
- package/dist/components/MiniButton/MiniButton.js +44 -0
- package/dist/components/MiniButton/constants.d.ts +9 -0
- package/dist/components/MiniButton/constants.js +5 -0
- package/dist/components/MiniButton/index.d.ts +4 -0
- package/dist/components/MiniButton/index.js +6 -0
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +153 -152
- package/dist/components/MultiSelectSearch/constants.d.ts +1 -0
- package/dist/components/MultiSelectSearch/constants.js +7 -7
- package/dist/components/MultiSelectSearch/utils.d.ts +1 -1
- package/dist/components/MultiSelectSearch/utils.js +18 -16
- package/dist/components/NotificationBadge/NotificationBadge.js +49 -33
- package/dist/components/NotificationBadge/constants.d.ts +9 -2
- package/dist/components/NotificationBadge/constants.js +3 -2
- package/dist/components/NotificationBadge/types.d.ts +11 -1
- package/dist/components/NotificationBadge/utils.d.ts +8 -0
- package/dist/components/NotificationBadge/utils.js +4 -0
- package/dist/components/OtpInput/OtpInput.js +44 -40
- package/dist/components/OtpInput/constants.d.ts +4 -0
- package/dist/components/OtpInput/constants.js +6 -4
- package/dist/components/OtpInput/index.d.ts +1 -0
- package/dist/components/OtpInput/index.js +2 -0
- package/dist/components/Pagination/Pagination.js +23 -23
- package/dist/components/RoundButton/RoundButton.d.ts +82 -0
- package/dist/components/RoundButton/RoundButton.js +69 -0
- package/dist/components/RoundButton/constants.d.ts +11 -0
- package/dist/components/RoundButton/constants.js +5 -0
- package/dist/components/RoundButton/index.d.ts +2 -0
- package/dist/components/RoundButton/index.js +7 -0
- package/dist/components/RoundButton/types.d.ts +20 -0
- package/dist/components/SelectSearch/SelectSearch.js +241 -241
- package/dist/components/SelectSearch/utils.d.ts +1 -1
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/Slider/Slider.d.ts +1 -5
- package/dist/components/Slider/Slider.js +34 -36
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +55 -51
- package/dist/hooks-Cd4Ez6_j.js +117 -0
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/components/16px/DropdownArrowDown16px.js +23 -0
- package/dist/icons/components/24px/EyeClosed24px.js +65 -0
- package/dist/icons/components/Avito.js +36 -13
- package/dist/icons/components/Site.js +13 -36
- package/dist/icons/components/index.js +564 -591
- package/dist/{index-C2dQUuc9.js → index-DrVFMaBi.js} +1184 -1346
- package/dist/index.js +73 -69
- package/dist/styles.module-BfkM1-KJ.js +32 -0
- package/package.json +1 -1
- package/dist/Input-BU_6U1CW.js +0 -227
- package/dist/assets/ClearButton.css +0 -1
- package/dist/components/InputClearButton/ClearButton.js +0 -41
- package/dist/components/InputClearButton/constants.d.ts +0 -8
- package/dist/components/InputClearButton/constants.js +0 -5
- package/dist/components/InputClearButton/index.d.ts +0 -4
- package/dist/components/InputClearButton/index.js +0 -6
- package/dist/hooks-HgN6Yauq.js +0 -117
- package/dist/icons/components/64px/AdvancePaymentDiscount64px.js +0 -59
- package/dist/icons/components/64px/AtsVendors64px.js +0 -37
- package/dist/icons/components/64px/ButtonOn64px.js +0 -31
- package/dist/icons/components/64px/BuyoutAuto64px.js +0 -45
- package/dist/icons/components/64px/CarAssistance64px.js +0 -44
- package/dist/icons/components/64px/CarDelivery64px.js +0 -37
- package/dist/icons/components/64px/CarSearchReturn64px.js +0 -45
- package/dist/icons/components/64px/CarService64px.js +0 -37
- package/dist/icons/components/64px/Case64px.js +0 -33
- package/dist/icons/components/64px/CoatOfArms64px.js +0 -149
- package/dist/icons/components/64px/CoffeeCup64px.js +0 -44
- package/dist/icons/components/64px/Cup64px.js +0 -38
- package/dist/icons/components/64px/ExpertAdvice64px.js +0 -40
- package/dist/icons/components/64px/Fines64px.js +0 -88
- package/dist/icons/components/64px/Fuel64px.js +0 -38
- package/dist/icons/components/64px/GazprombankIcon24px.js +0 -21
- package/dist/icons/components/64px/Kasko64px.js +0 -44
- package/dist/icons/components/64px/LegalSupport64px.js +0 -58
- package/dist/icons/components/64px/Microphone64px.js +0 -37
- package/dist/icons/components/64px/Money64px.js +0 -60
- package/dist/icons/components/64px/PaymentSchedule64px.js +0 -39
- package/dist/icons/components/64px/PersonalManager64px.js +0 -100
- package/dist/icons/components/64px/PreApproval64px.js +0 -44
- package/dist/icons/components/64px/Questions64px.js +0 -37
- package/dist/icons/components/64px/SupportGeography64px.js +0 -51
- package/dist/icons/components/64px/Timer64px.js +0 -45
- package/dist/icons/components/64px/Twogis64px.js +0 -51
- package/dist/icons/components/64px/Vehicles64px.js +0 -45
- package/dist/icons/components/64px/Workplace64px.js +0 -38
- package/dist/styles.module-Cuqm31CO.js +0 -28
@@ -1,41 +1,43 @@
|
|
1
|
-
import { EMultiSelectSearchSize as
|
2
|
-
import "../../Input-
|
1
|
+
import { EMultiSelectSearchSize as o, MOBILE_MENU_HEIGHT as c, DESKTOP_MENU_HEIGHT as a } from "./constants.js";
|
2
|
+
import "../../Input-CGZoshMl.js";
|
3
3
|
import { EInputSize as u } from "../Input/constants.js";
|
4
4
|
const m = (t) => {
|
5
5
|
switch (t) {
|
6
|
-
case
|
6
|
+
case o.M:
|
7
7
|
return u.M;
|
8
|
-
case
|
8
|
+
case o.L:
|
9
9
|
return u.L;
|
10
|
+
case o.S:
|
11
|
+
return u.S;
|
10
12
|
default:
|
11
13
|
return u.M;
|
12
14
|
}
|
13
|
-
}, E = (t, e) => t ? e ===
|
15
|
+
}, E = (t, e) => t ? e === o.L ? "DropdownArrowUp24px" : "DropdownArrowUp16px" : e === o.L ? "DropdownArrowDown24px" : "DropdownArrowBottom16px", S = (t, e) => t && t.length > 0 ? t.map((r) => r[e]).join(", ") : "", f = (t, e) => t.map((r) => r[e]).join(", "), d = "multiselectOpen", g = (t) => {
|
14
16
|
window.dispatchEvent(new CustomEvent(d, { detail: t }));
|
15
17
|
}, I = (t, e) => {
|
16
18
|
if (!t.current) return !1;
|
17
|
-
const r = t.current.getBoundingClientRect(),
|
18
|
-
return
|
19
|
+
const r = t.current.getBoundingClientRect(), p = window.innerHeight, i = e === o.M ? c : a, s = p - r.bottom, n = r.top;
|
20
|
+
return s >= i ? !1 : n > s;
|
19
21
|
}, M = (t, e, r) => {
|
20
22
|
if (!t.length || !e) return t;
|
21
|
-
const
|
22
|
-
for (const
|
23
|
-
const n = String(
|
24
|
-
|
23
|
+
const p = [], i = /* @__PURE__ */ new Set();
|
24
|
+
for (const s of t) {
|
25
|
+
const n = String(s[e] || "Без группы");
|
26
|
+
i.has(n) || (i.add(n), p.push({
|
25
27
|
id: `group-header-${n}`,
|
26
28
|
name: r(n),
|
27
29
|
isGroupHeader: !0,
|
28
30
|
originalValue: n
|
29
|
-
})),
|
31
|
+
})), p.push(s);
|
30
32
|
}
|
31
|
-
return
|
33
|
+
return p;
|
32
34
|
};
|
33
35
|
export {
|
34
36
|
d as MULTISELECT_OPEN_EVENT,
|
35
|
-
|
37
|
+
g as dispatchMultiselectOpen,
|
36
38
|
E as getDropdownArrowIcon,
|
37
|
-
|
38
|
-
|
39
|
+
S as getInitialInputValue,
|
40
|
+
f as joinSelectedItems,
|
39
41
|
m as mapSizeToInputSize,
|
40
42
|
M as prepareGroupedItems,
|
41
43
|
I as shouldShowMenuOnTop
|
@@ -1,36 +1,52 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { c as
|
3
|
-
import { ENotificationBadgeSize as
|
4
|
-
import
|
5
|
-
|
6
|
-
"notification-badge
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
2
|
+
import { c as s } from "../../index-DIxK0V-G.js";
|
3
|
+
import { ENotificationBadgeSize as l, ENotificationBadgeVariant as d } from "./constants.js";
|
4
|
+
import { formatCount as g } from "./utils.js";
|
5
|
+
import '../../assets/NotificationBadge.css';const m = "_gray_1uvpe_23", b = "_white_1uvpe_26", u = "_sapphire_1uvpe_29", v = "_citrine_1uvpe_32", h = "_asphalt_1uvpe_35", p = "_m_1uvpe_39", x = "_s_1uvpe_29", y = "_xs_1uvpe_55", a = {
|
6
|
+
"notification-badge": "_notification-badge_1uvpe_2",
|
7
|
+
"notification-badge-absolute": "_notification-badge-absolute_1uvpe_16",
|
8
|
+
"notification-badge-disabled": "_notification-badge-disabled_1uvpe_19",
|
9
|
+
gray: m,
|
10
|
+
white: b,
|
11
|
+
sapphire: u,
|
12
|
+
citrine: v,
|
13
|
+
asphalt: h,
|
14
|
+
m: p,
|
15
|
+
s: x,
|
16
|
+
xs: y,
|
17
|
+
"notification-badge-small-font": "_notification-badge-small-font_1uvpe_63"
|
18
|
+
}, E = ({
|
19
|
+
count: i,
|
20
|
+
position: t,
|
21
|
+
absolute: _,
|
22
|
+
size: c = l.M,
|
23
|
+
variant: n = d.Citrine,
|
24
|
+
disabled: o = !1
|
25
|
+
}) => {
|
26
|
+
const e = g(i), f = typeof e == "string";
|
27
|
+
return /* @__PURE__ */ r(
|
28
|
+
"div",
|
29
|
+
{
|
30
|
+
className: s(
|
31
|
+
a["notification-badge"],
|
32
|
+
{
|
33
|
+
[a["notification-badge-absolute"]]: _,
|
34
|
+
[a["notification-badge-disabled"]]: o,
|
35
|
+
[a["notification-badge-small-font"]]: f
|
36
|
+
},
|
37
|
+
a[c],
|
38
|
+
a[n]
|
39
|
+
),
|
40
|
+
style: {
|
41
|
+
top: t == null ? void 0 : t.top,
|
42
|
+
right: t == null ? void 0 : t.right,
|
43
|
+
bottom: t == null ? void 0 : t.bottom,
|
44
|
+
left: t == null ? void 0 : t.left
|
22
45
|
},
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
right: a == null ? void 0 : a.right,
|
28
|
-
bottom: a == null ? void 0 : a.bottom,
|
29
|
-
left: a == null ? void 0 : a.left
|
30
|
-
},
|
31
|
-
children: e
|
32
|
-
}
|
33
|
-
);
|
46
|
+
children: e
|
47
|
+
}
|
48
|
+
);
|
49
|
+
};
|
34
50
|
export {
|
35
|
-
|
51
|
+
E as NotificationBadge
|
36
52
|
};
|
@@ -1,5 +1,12 @@
|
|
1
1
|
export declare enum ENotificationBadgeSize {
|
2
|
+
XS = "xs",
|
2
3
|
S = "s",
|
3
|
-
M = "m"
|
4
|
-
|
4
|
+
M = "m"
|
5
|
+
}
|
6
|
+
export declare enum ENotificationBadgeVariant {
|
7
|
+
Sapphire = "sapphire",
|
8
|
+
Citrine = "citrine",
|
9
|
+
Asphalt = "asphalt",
|
10
|
+
White = "white",
|
11
|
+
Gray = "gray"
|
5
12
|
}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
var
|
1
|
+
var p = /* @__PURE__ */ ((r) => (r.XS = "xs", r.S = "s", r.M = "m", r))(p || {}), h = /* @__PURE__ */ ((r) => (r.Sapphire = "sapphire", r.Citrine = "citrine", r.Asphalt = "asphalt", r.White = "white", r.Gray = "gray", r))(h || {});
|
2
2
|
export {
|
3
|
-
|
3
|
+
p as ENotificationBadgeSize,
|
4
|
+
h as ENotificationBadgeVariant
|
4
5
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ENotificationBadgeSize } from './constants';
|
1
|
+
import { ENotificationBadgeSize, ENotificationBadgeVariant } from './constants';
|
2
2
|
|
3
3
|
export type TNotificationBadgeProps = {
|
4
4
|
/**
|
@@ -20,6 +20,16 @@ export type TNotificationBadgeProps = {
|
|
20
20
|
absolute?: boolean;
|
21
21
|
/**
|
22
22
|
* Размер NotificationBadge.
|
23
|
+
* 'xs' | 's' | 'm'
|
23
24
|
*/
|
24
25
|
size?: `${ENotificationBadgeSize}` | ENotificationBadgeSize;
|
26
|
+
/**
|
27
|
+
* Вариант кнопки загрузки файла.
|
28
|
+
* 'gray' | 'white' | 'sapphire' | 'citrine' | 'asphalt';
|
29
|
+
*/
|
30
|
+
variant?: `${ENotificationBadgeVariant}` | ENotificationBadgeVariant;
|
31
|
+
/**
|
32
|
+
* Выключен ли NotificationBadge или нет
|
33
|
+
*/
|
34
|
+
disabled?: boolean;
|
25
35
|
};
|
@@ -1,62 +1,66 @@
|
|
1
|
-
import { jsx as r, jsxs as
|
2
|
-
import { c as
|
1
|
+
import { jsx as r, jsxs as E } from "react/jsx-runtime";
|
2
|
+
import { c as l } from "../../index-DIxK0V-G.js";
|
3
3
|
import { forwardRef as P, useImperativeHandle as R, Fragment as T } from "react";
|
4
4
|
import { ITEMS_PER_SEPARATOR as v, DEFAULT_VALUE_LENGTH as y } from "./constants.js";
|
5
|
-
import { useOTPInput as
|
6
|
-
import { I as
|
7
|
-
import '../../assets/OtpInput.css';const
|
8
|
-
otp:
|
9
|
-
"input-wrapper": "_input-
|
10
|
-
input:
|
11
|
-
|
12
|
-
|
5
|
+
import { useOTPInput as A } from "./hooks.js";
|
6
|
+
import { I as C } from "../../Input-CGZoshMl.js";
|
7
|
+
import '../../assets/OtpInput.css';const F = "_otp_1ljg8_2", L = "_input_1ljg8_8", O = "_l_1ljg8_17", D = "_m_1ljg8_22", S = "_separator_1ljg8_27", a = {
|
8
|
+
otp: F,
|
9
|
+
"input-wrapper": "_input-wrapper_1ljg8_8",
|
10
|
+
input: L,
|
11
|
+
l: O,
|
12
|
+
m: D,
|
13
|
+
separator: S
|
14
|
+
}, x = P(
|
13
15
|
({
|
14
|
-
value:
|
15
|
-
valueLength:
|
16
|
-
needSeparator:
|
16
|
+
value: u = "",
|
17
|
+
valueLength: c = y,
|
18
|
+
needSeparator: _ = !0,
|
17
19
|
onChange: i,
|
18
|
-
className:
|
19
|
-
|
20
|
-
|
20
|
+
className: d,
|
21
|
+
size: o,
|
22
|
+
...f
|
23
|
+
}, h) => {
|
21
24
|
const {
|
22
|
-
data: { inputRefs:
|
23
|
-
handlers: { handleChange:
|
24
|
-
} =
|
25
|
+
data: { inputRefs: p, valueItems: s },
|
26
|
+
handlers: { handleChange: g, handleFocus: I, handleKeyDown: j, handlePaste: w }
|
27
|
+
} = A({
|
25
28
|
onChange: i,
|
26
|
-
value:
|
27
|
-
valueLength:
|
29
|
+
value: u,
|
30
|
+
valueLength: c
|
28
31
|
});
|
29
|
-
return R(
|
32
|
+
return R(h, () => ({
|
30
33
|
focus: () => {
|
31
|
-
var
|
32
|
-
(
|
34
|
+
var n;
|
35
|
+
(n = p.current[0]) == null || n.focus();
|
33
36
|
}
|
34
|
-
})), /* @__PURE__ */ r("div", { className:
|
35
|
-
const
|
36
|
-
return /* @__PURE__ */
|
37
|
+
})), /* @__PURE__ */ r("div", { className: l(a.otp, d, a[o ?? ""]), children: s.map((n, e) => {
|
38
|
+
const m = e + 1, N = _ && m % v === 0 && m !== s.length;
|
39
|
+
return /* @__PURE__ */ E(T, { children: [
|
37
40
|
/* @__PURE__ */ r(
|
38
|
-
|
41
|
+
C,
|
39
42
|
{
|
40
|
-
ref: (t) =>
|
43
|
+
ref: (t) => p.current[e] = t,
|
41
44
|
type: "text",
|
42
45
|
inputMode: "numeric",
|
43
46
|
autoComplete: "one-time-code",
|
44
47
|
pattern: "\\d{1}",
|
45
48
|
maxLength: 1,
|
46
|
-
value:
|
47
|
-
className:
|
48
|
-
wrapperClassName:
|
49
|
-
onChange: (t) =>
|
50
|
-
onKeyDown: (t) =>
|
49
|
+
value: n,
|
50
|
+
className: a.input,
|
51
|
+
wrapperClassName: a["input-wrapper"],
|
52
|
+
onChange: (t) => g(t, e),
|
53
|
+
onKeyDown: (t) => j(t, e),
|
51
54
|
onFocus: (t) => I(t, e),
|
52
|
-
onPaste:
|
53
|
-
|
55
|
+
onPaste: w,
|
56
|
+
size: o,
|
57
|
+
...f
|
54
58
|
}
|
55
59
|
),
|
56
|
-
|
60
|
+
N && /* @__PURE__ */ r(
|
57
61
|
"span",
|
58
62
|
{
|
59
|
-
className:
|
63
|
+
className: l(a.separator),
|
60
64
|
"data-testid": "separator"
|
61
65
|
}
|
62
66
|
)
|
@@ -64,7 +68,7 @@ import '../../assets/OtpInput.css';const C = "_otp_1ncuz_2", F = "_input_1ncuz_1
|
|
64
68
|
}) });
|
65
69
|
}
|
66
70
|
);
|
67
|
-
|
71
|
+
x.displayName = "OtpInput";
|
68
72
|
export {
|
69
|
-
|
73
|
+
x as OtpInput
|
70
74
|
};
|
@@ -1,6 +1,8 @@
|
|
1
|
-
const
|
1
|
+
const T = new RegExp(/^\d+$/), _ = 6, n = 3;
|
2
|
+
var R = /* @__PURE__ */ ((E) => (E.L = "l", E.M = "m", E))(R || {});
|
2
3
|
export {
|
3
|
-
|
4
|
-
|
5
|
-
|
4
|
+
_ as DEFAULT_VALUE_LENGTH,
|
5
|
+
R as EOtpInputSize,
|
6
|
+
n as ITEMS_PER_SEPARATOR,
|
7
|
+
T as RE_DIGIT
|
6
8
|
};
|
@@ -4,16 +4,16 @@ import { forwardRef as M, useState as R, useEffect as S } from "react";
|
|
4
4
|
import { FIRST_PAGE_NUMBER as m, DEFAULT_PER_PAGE as j } from "./constants.js";
|
5
5
|
import { useWindowSize as $ } from "../../hooks/useWindowSize/index.js";
|
6
6
|
import { MergedButton as v } from "../MergedButton/MergedButton.js";
|
7
|
-
import '../../assets/Pagination.css';const F = "
|
8
|
-
"pagination-button": "_pagination-
|
9
|
-
"is-active": "_is-
|
7
|
+
import '../../assets/Pagination.css';const F = "_container_iq51m_30", L = "_ellipsis_iq51m_45", G = "_disabled_iq51m_50", C = {
|
8
|
+
"pagination-button": "_pagination-button_iq51m_2",
|
9
|
+
"is-active": "_is-active_iq51m_26",
|
10
10
|
container: F,
|
11
11
|
ellipsis: L,
|
12
12
|
disabled: G
|
13
13
|
}, T = ({
|
14
14
|
currentPageNumber: t,
|
15
15
|
onClick: n,
|
16
|
-
setCurrentPage:
|
16
|
+
setCurrentPage: l,
|
17
17
|
disabled: o
|
18
18
|
}) => /* @__PURE__ */ a(
|
19
19
|
v,
|
@@ -23,7 +23,7 @@ import '../../assets/Pagination.css';const F = "_container_uqdck_27", L = "_elli
|
|
23
23
|
isIconButton: !0,
|
24
24
|
variant: "white",
|
25
25
|
onClick: () => {
|
26
|
-
t !== m && (
|
26
|
+
t !== m && (l(t - 1), n(t - 1));
|
27
27
|
},
|
28
28
|
iconName: "ArrowLeft16px",
|
29
29
|
disabled: o || t === m,
|
@@ -34,7 +34,7 @@ import '../../assets/Pagination.css';const F = "_container_uqdck_27", L = "_elli
|
|
34
34
|
), U = ({
|
35
35
|
currentPageNumber: t,
|
36
36
|
lastPageNumber: n,
|
37
|
-
onClick:
|
37
|
+
onClick: l,
|
38
38
|
setCurrentPage: o,
|
39
39
|
disabled: r
|
40
40
|
}) => {
|
@@ -47,7 +47,7 @@ import '../../assets/Pagination.css';const F = "_container_uqdck_27", L = "_elli
|
|
47
47
|
isIconButton: !0,
|
48
48
|
variant: "white",
|
49
49
|
onClick: () => {
|
50
|
-
s || (o(t + 1),
|
50
|
+
s || (o(t + 1), l(t + 1));
|
51
51
|
},
|
52
52
|
disabled: r || s,
|
53
53
|
iconName: "ArrowRight16px",
|
@@ -70,12 +70,12 @@ import '../../assets/Pagination.css';const F = "_container_uqdck_27", L = "_elli
|
|
70
70
|
), N = ({
|
71
71
|
currentPageNumber: t,
|
72
72
|
newPageNumber: n,
|
73
|
-
onClick:
|
73
|
+
onClick: l,
|
74
74
|
setCurrentPage: o,
|
75
75
|
disabled: r
|
76
76
|
}) => {
|
77
77
|
const s = t === n, i = () => {
|
78
|
-
r || (o(n),
|
78
|
+
r || (o(n), l(n));
|
79
79
|
}, e = n < 10 ? `0${n}` : n;
|
80
80
|
return /* @__PURE__ */ a(
|
81
81
|
"button",
|
@@ -93,7 +93,7 @@ import '../../assets/Pagination.css';const F = "_container_uqdck_27", L = "_elli
|
|
93
93
|
}, z = ({
|
94
94
|
start: t,
|
95
95
|
end: n,
|
96
|
-
currentPageNumber:
|
96
|
+
currentPageNumber: l,
|
97
97
|
onClick: o,
|
98
98
|
setCurrentPage: r,
|
99
99
|
disabled: s
|
@@ -104,7 +104,7 @@ import '../../assets/Pagination.css';const F = "_container_uqdck_27", L = "_elli
|
|
104
104
|
/* @__PURE__ */ a(
|
105
105
|
N,
|
106
106
|
{
|
107
|
-
currentPageNumber:
|
107
|
+
currentPageNumber: l,
|
108
108
|
setCurrentPage: r,
|
109
109
|
newPageNumber: e,
|
110
110
|
onClick: o,
|
@@ -117,7 +117,7 @@ import '../../assets/Pagination.css';const F = "_container_uqdck_27", L = "_elli
|
|
117
117
|
}, Q = M(
|
118
118
|
(t, n) => {
|
119
119
|
const {
|
120
|
-
rootClassName:
|
120
|
+
rootClassName: l,
|
121
121
|
total: o,
|
122
122
|
perPage: r = j,
|
123
123
|
currentPageNumber: s = m,
|
@@ -126,22 +126,22 @@ import '../../assets/Pagination.css';const F = "_container_uqdck_27", L = "_elli
|
|
126
126
|
hidePrevButton: E = !1,
|
127
127
|
hideNextButton: y = !1,
|
128
128
|
siblingCount: A,
|
129
|
-
boundaryCount:
|
129
|
+
boundaryCount: c = 1
|
130
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
131
|
let b = 0, p = 0;
|
132
132
|
return S(() => {
|
133
133
|
g(s);
|
134
|
-
}, [s]), u <=
|
135
|
-
|
134
|
+
}, [s]), u <= c + h + 1 ? (b = m, p = Math.min(
|
135
|
+
c + h * 2 + 1,
|
136
136
|
d
|
137
|
-
)) : u >= d -
|
138
|
-
d -
|
137
|
+
)) : u >= d - c - h ? (b = Math.max(
|
138
|
+
d - c - h * 2,
|
139
139
|
m
|
140
140
|
), p = d) : (b = u - h, p = u + h), o <= r ? null : /* @__PURE__ */ k(
|
141
141
|
"nav",
|
142
142
|
{
|
143
143
|
"aria-label": "Постраничная навигация",
|
144
|
-
className: P(C.container,
|
144
|
+
className: P(C.container, l, {
|
145
145
|
[C.disabled]: e
|
146
146
|
}),
|
147
147
|
ref: n,
|
@@ -156,7 +156,7 @@ import '../../assets/Pagination.css';const F = "_container_uqdck_27", L = "_elli
|
|
156
156
|
}
|
157
157
|
),
|
158
158
|
b > m && /* @__PURE__ */ k(x, { children: [
|
159
|
-
Array.from({ length:
|
159
|
+
Array.from({ length: c }).map((I, _) => {
|
160
160
|
const f = m + _;
|
161
161
|
return f >= b ? null : /* @__PURE__ */ a(
|
162
162
|
N,
|
@@ -170,7 +170,7 @@ import '../../assets/Pagination.css';const F = "_container_uqdck_27", L = "_elli
|
|
170
170
|
`boundary-start-${f}`
|
171
171
|
);
|
172
172
|
}),
|
173
|
-
b >
|
173
|
+
b > c + m && /* @__PURE__ */ a(B, {})
|
174
174
|
] }),
|
175
175
|
z({
|
176
176
|
start: b,
|
@@ -181,9 +181,9 @@ import '../../assets/Pagination.css';const F = "_container_uqdck_27", L = "_elli
|
|
181
181
|
disabled: e
|
182
182
|
}),
|
183
183
|
p < d && /* @__PURE__ */ k(x, { children: [
|
184
|
-
p < d -
|
185
|
-
Array.from({ length:
|
186
|
-
const f = d -
|
184
|
+
p < d - c && /* @__PURE__ */ a(B, {}),
|
185
|
+
Array.from({ length: c }).map((I, _) => {
|
186
|
+
const f = d - c + 1 + _;
|
187
187
|
return f <= p ? null : /* @__PURE__ */ a(
|
188
188
|
N,
|
189
189
|
{
|
@@ -0,0 +1,82 @@
|
|
1
|
+
import { ComponentProps } from 'react';
|
2
|
+
import { TCommonButtonProps } from './types';
|
3
|
+
import { TIcon } from '../../icons';
|
4
|
+
|
5
|
+
export type TProps = TCommonButtonProps & ComponentProps<'button'> & {
|
6
|
+
/**
|
7
|
+
* Класс, применяемый к корневому элементу кнопки.
|
8
|
+
*/
|
9
|
+
className?: string;
|
10
|
+
/**
|
11
|
+
* Класс, применяемый к иконке.
|
12
|
+
*/
|
13
|
+
iconButtonClassName?: string;
|
14
|
+
/**
|
15
|
+
* Флаг, указывающий, отключена ли кнопка.
|
16
|
+
*/
|
17
|
+
disabled?: boolean;
|
18
|
+
/**
|
19
|
+
* Флаг, отключащий абсолютно все модификации кнопки (variant, size).
|
20
|
+
*/
|
21
|
+
clear?: boolean;
|
22
|
+
/**
|
23
|
+
* Идентификатор формы, к которой привязана кнопка.
|
24
|
+
*/
|
25
|
+
formId?: string;
|
26
|
+
};
|
27
|
+
/**
|
28
|
+
* Компонент кнопки, c закруглеными краями.
|
29
|
+
*/
|
30
|
+
export declare const RoundButton: import('react').ForwardRefExoticComponent<(Omit<import('./types').TButtonRoundProps & {
|
31
|
+
isIconButton: true;
|
32
|
+
iconName: TIcon;
|
33
|
+
leftIcon?: never;
|
34
|
+
rightIcon?: never;
|
35
|
+
} & import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
|
36
|
+
/**
|
37
|
+
* Класс, применяемый к корневому элементу кнопки.
|
38
|
+
*/
|
39
|
+
className?: string;
|
40
|
+
/**
|
41
|
+
* Класс, применяемый к иконке.
|
42
|
+
*/
|
43
|
+
iconButtonClassName?: string;
|
44
|
+
/**
|
45
|
+
* Флаг, указывающий, отключена ли кнопка.
|
46
|
+
*/
|
47
|
+
disabled?: boolean;
|
48
|
+
/**
|
49
|
+
* Флаг, отключащий абсолютно все модификации кнопки (variant, size).
|
50
|
+
*/
|
51
|
+
clear?: boolean;
|
52
|
+
/**
|
53
|
+
* Идентификатор формы, к которой привязана кнопка.
|
54
|
+
*/
|
55
|
+
formId?: string;
|
56
|
+
}, "ref"> | Omit<import('./types').TButtonRoundProps & {
|
57
|
+
isIconButton?: false;
|
58
|
+
iconName?: never;
|
59
|
+
leftIcon?: import('react').ReactNode;
|
60
|
+
rightIcon?: import('react').ReactNode;
|
61
|
+
} & import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
|
62
|
+
/**
|
63
|
+
* Класс, применяемый к корневому элементу кнопки.
|
64
|
+
*/
|
65
|
+
className?: string;
|
66
|
+
/**
|
67
|
+
* Класс, применяемый к иконке.
|
68
|
+
*/
|
69
|
+
iconButtonClassName?: string;
|
70
|
+
/**
|
71
|
+
* Флаг, указывающий, отключена ли кнопка.
|
72
|
+
*/
|
73
|
+
disabled?: boolean;
|
74
|
+
/**
|
75
|
+
* Флаг, отключащий абсолютно все модификации кнопки (variant, size).
|
76
|
+
*/
|
77
|
+
clear?: boolean;
|
78
|
+
/**
|
79
|
+
* Идентификатор формы, к которой привязана кнопка.
|
80
|
+
*/
|
81
|
+
formId?: string;
|
82
|
+
}, "ref">) & import('react').RefAttributes<HTMLButtonElement>>;
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import { jsxs as N, jsx as s } from "react/jsx-runtime";
|
2
|
+
import { c as k } from "../../index-DIxK0V-G.js";
|
3
|
+
import { forwardRef as g } from "react";
|
4
|
+
import { ERoundButtonVariant as x } from "./constants.js";
|
5
|
+
import { Icon as B } from "../../icons/Icon.js";
|
6
|
+
import '../../assets/RoundButton.css';const y = "_button_1wqe3_2", I = "_clear_1wqe3_42", v = "_black_1wqe3_66", R = "_gray_1wqe3_76", j = "_white_1wqe3_86", C = "_xs_1wqe3_96", z = "_s_1wqe3_105", E = "_m_1wqe3_114", P = "_l_1wqe3_123", V = "_disabled_1wqe3_137", t = {
|
7
|
+
button: y,
|
8
|
+
clear: I,
|
9
|
+
"button-form": "_button-form_1wqe3_54",
|
10
|
+
black: v,
|
11
|
+
gray: R,
|
12
|
+
white: j,
|
13
|
+
xs: C,
|
14
|
+
s: z,
|
15
|
+
m: E,
|
16
|
+
l: P,
|
17
|
+
"right_block-wrap": "_right_block-wrap_1wqe3_132",
|
18
|
+
disabled: V,
|
19
|
+
"icon-button": "_icon-button_1wqe3_149"
|
20
|
+
}, A = g(
|
21
|
+
(a, r) => {
|
22
|
+
const {
|
23
|
+
size: _ = "m",
|
24
|
+
variant: n = x.Black,
|
25
|
+
clear: o,
|
26
|
+
isIconButton: c = !1,
|
27
|
+
iconName: l,
|
28
|
+
children: i,
|
29
|
+
className: m,
|
30
|
+
iconButtonClassName: b,
|
31
|
+
formId: d,
|
32
|
+
type: u = "button",
|
33
|
+
rightIcon: w,
|
34
|
+
leftIcon: f,
|
35
|
+
disabled: e,
|
36
|
+
...p
|
37
|
+
} = a, q = {
|
38
|
+
[t.disabled]: e && !o,
|
39
|
+
[t.clear]: o,
|
40
|
+
[t["icon-button"]]: c,
|
41
|
+
[t[n]]: !!n && !o
|
42
|
+
}, h = k(
|
43
|
+
m,
|
44
|
+
t.button,
|
45
|
+
q,
|
46
|
+
o ? [] : [t["button-form"], t[_]]
|
47
|
+
);
|
48
|
+
return /* @__PURE__ */ N(
|
49
|
+
"button",
|
50
|
+
{
|
51
|
+
type: u,
|
52
|
+
form: d,
|
53
|
+
...p,
|
54
|
+
disabled: e,
|
55
|
+
ref: r,
|
56
|
+
className: h,
|
57
|
+
children: [
|
58
|
+
/* @__PURE__ */ s("div", { className: t["left_block-wrap"], children: f }),
|
59
|
+
c ? /* @__PURE__ */ s(B, { iconName: l, className: b }) : i,
|
60
|
+
/* @__PURE__ */ s("div", { className: t["right_block-wrap"], children: w })
|
61
|
+
]
|
62
|
+
}
|
63
|
+
);
|
64
|
+
}
|
65
|
+
);
|
66
|
+
A.displayName = "roundButton";
|
67
|
+
export {
|
68
|
+
A as RoundButton
|
69
|
+
};
|