mimir-ui-kit 1.43.28 → 1.44.1
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-IzZ6B9kw.js +232 -0
- package/dist/assets/Avatar.css +1 -1
- package/dist/assets/Chip.css +1 -1
- package/dist/assets/CopyText.css +1 -0
- package/dist/assets/Counter.css +1 -0
- package/dist/assets/DropdownSelect.css +1 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/assets/TabTrail.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +41 -37
- package/dist/components/Avatar/constants.d.ts +5 -0
- package/dist/components/Avatar/constants.js +3 -2
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar/index.js +5 -4
- package/dist/components/Avatar/types.d.ts +3 -1
- package/dist/components/Chip/Chip.d.ts +5 -1
- package/dist/components/Chip/Chip.js +45 -36
- package/dist/components/Chip/constants.d.ts +5 -1
- package/dist/components/Chip/constants.js +3 -3
- package/dist/components/CopyText/CopyText.d.ts +3 -0
- package/dist/components/CopyText/CopyText.js +96 -0
- package/dist/components/CopyText/index.d.ts +2 -0
- package/dist/components/CopyText/index.js +4 -0
- package/dist/components/CopyText/types.d.ts +32 -0
- package/dist/components/DatePicker/DatePicker.d.ts +19 -0
- package/dist/components/DatePicker/DatePicker.js +149 -134
- package/dist/components/DatePicker/DatePickerModal.js +1 -1
- package/dist/components/DatePicker/MonthPickerModal.js +1 -1
- package/dist/components/DatePicker/YearPickerModal.js +1 -1
- package/dist/components/DatePicker/constants.d.ts +6 -0
- package/dist/components/DatePicker/constants.js +13 -12
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/index.js +3 -1
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +3 -0
- package/dist/components/DropdownSelect/DropdownSelect.js +115 -0
- package/dist/components/DropdownSelect/constants.d.ts +5 -0
- package/dist/components/DropdownSelect/constants.js +4 -0
- package/dist/components/DropdownSelect/index.d.ts +3 -0
- package/dist/components/DropdownSelect/index.js +6 -0
- package/dist/components/DropdownSelect/types.d.ts +56 -0
- package/dist/components/Input/Input.d.ts +5 -0
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/constants.d.ts +6 -0
- package/dist/components/Input/constants.js +4 -3
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputPassword/InputPassword.js +1 -1
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/MultiSelectSearch/MultiSelectSearch.js +1 -1
- package/dist/components/MultiSelectSearch/utils.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +1 -1
- package/dist/components/Pagination/Counter/Counter.d.ts +9 -0
- package/dist/components/Pagination/Counter/Counter.js +28 -0
- package/dist/components/Pagination/Pagination.d.ts +17 -0
- package/dist/components/Pagination/Pagination.js +167 -126
- package/dist/components/Pagination/constants.d.ts +6 -0
- package/dist/components/Pagination/constants.js +5 -3
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/Pagination/index.js +4 -2
- package/dist/components/SelectSearch/SelectSearch.d.ts +2 -1
- package/dist/components/SelectSearch/SelectSearch.js +193 -187
- package/dist/components/SelectSearch/constants.d.ts +6 -0
- package/dist/components/SelectSearch/constants.js +7 -5
- package/dist/components/SelectSearch/index.d.ts +1 -1
- package/dist/components/SelectSearch/index.js +5 -4
- package/dist/components/SelectSearch/types.d.ts +6 -1
- package/dist/components/SelectSearch/utils.js +1 -1
- package/dist/components/TabTrail/TabTrail.d.ts +16 -0
- package/dist/components/TabTrail/TabTrail.js +257 -220
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/index.d.ts +8 -4
- package/dist/components/index.js +178 -166
- package/dist/index.js +203 -191
- package/dist/styles.module-B3lX7mJq.js +31 -0
- package/package.json +1 -1
- package/dist/Input-BU_6U1CW.js +0 -227
- package/dist/styles.module-Cuqm31CO.js +0 -28
@@ -1,6 +1,7 @@
|
|
1
|
-
import { Avatar as
|
2
|
-
import { EAvatarSize as e } from "./constants.js";
|
1
|
+
import { Avatar as t } from "./Avatar.js";
|
2
|
+
import { EAvatarSize as e, EAvatarVariant as v } from "./constants.js";
|
3
3
|
export {
|
4
|
-
|
5
|
-
e as EAvatarSize
|
4
|
+
t as Avatar,
|
5
|
+
e as EAvatarSize,
|
6
|
+
v as EAvatarVariant
|
6
7
|
};
|
@@ -1,10 +1,12 @@
|
|
1
|
-
import { EAvatarSize } from './constants';
|
1
|
+
import { EAvatarSize, EAvatarVariant } from './constants';
|
2
2
|
|
3
3
|
export type TAvatarSize = `${EAvatarSize}` | EAvatarSize;
|
4
|
+
export type TAvatarVariant = `${EAvatarVariant}` | EAvatarVariant;
|
4
5
|
export type TAvatarProps = {
|
5
6
|
size?: TAvatarSize;
|
6
7
|
className?: string;
|
7
8
|
notificationsCount?: number;
|
8
9
|
src?: string;
|
9
10
|
alt?: string;
|
11
|
+
variant?: TAvatarVariant;
|
10
12
|
};
|
@@ -30,5 +30,9 @@ export type TProps = {
|
|
30
30
|
* Обработчик для кнопки закрытия
|
31
31
|
*/
|
32
32
|
children?: ReactNode;
|
33
|
+
/**
|
34
|
+
* Квадратные границы
|
35
|
+
*/
|
36
|
+
squareBorder?: boolean;
|
33
37
|
};
|
34
|
-
export declare const Chip: ({ size, variant, className, disabled, withAction, children, onClose }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element;
|
38
|
+
export declare const Chip: ({ size, variant, className, disabled, withAction, children, onClose, squareBorder }: PropsWithChildren<TProps>) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,44 +1,53 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import { EChipSize as
|
4
|
-
import { Button as
|
5
|
-
import '../../assets/Chip.css';const
|
6
|
-
chip:
|
7
|
-
"with-action": "_with-
|
8
|
-
disabled:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
1
|
+
import { jsxs as c, jsx as m } from "react/jsx-runtime";
|
2
|
+
import { c as h } from "../../index-DIxK0V-G.js";
|
3
|
+
import { EChipSize as p, EChipVariant as g } from "./constants.js";
|
4
|
+
import { Button as d } from "../Button/Button.js";
|
5
|
+
import '../../assets/Chip.css';const u = "_chip_mrr0l_2", w = "_disabled_mrr0l_40", x = "_squareBorder_mrr0l_50", B = "_xs_mrr0l_54", f = "_s_mrr0l_50", y = "_sm_mrr0l_70", C = "_m_mrr0l_78", b = "_sapphire_mrr0l_86", q = "_citrine_mrr0l_95", N = "_asphalt_mrr0l_104", j = "_gray_mrr0l_113", E = "_white_mrr0l_122", S = "_green_mrr0l_131", r = {
|
6
|
+
chip: u,
|
7
|
+
"with-action": "_with-action_mrr0l_18",
|
8
|
+
disabled: w,
|
9
|
+
squareBorder: x,
|
10
|
+
xs: B,
|
11
|
+
s: f,
|
12
|
+
sm: y,
|
13
|
+
m: C,
|
14
|
+
sapphire: b,
|
15
|
+
citrine: q,
|
16
|
+
asphalt: N,
|
17
|
+
gray: j,
|
18
|
+
white: E,
|
19
|
+
green: S,
|
20
|
+
"green-light": "_green-light_mrr0l_140",
|
21
|
+
"orange-light": "_orange-light_mrr0l_163",
|
22
|
+
"yellow-light": "_yellow-light_mrr0l_178"
|
23
|
+
}, M = ({
|
24
|
+
size: _ = p.M,
|
25
|
+
variant: e = g.Sapphire,
|
26
|
+
className: t,
|
27
|
+
disabled: i,
|
28
|
+
withAction: s,
|
29
|
+
children: l,
|
30
|
+
onClose: o,
|
31
|
+
squareBorder: a = !1
|
26
32
|
}) => {
|
27
|
-
const n =
|
28
|
-
|
29
|
-
|
33
|
+
const n = h(
|
34
|
+
r.chip,
|
35
|
+
t,
|
30
36
|
{
|
31
|
-
[
|
32
|
-
[
|
37
|
+
[r["with-action"]]: s,
|
38
|
+
[r.disabled]: i
|
33
39
|
},
|
34
|
-
|
35
|
-
|
40
|
+
r[e],
|
41
|
+
r[_],
|
42
|
+
{
|
43
|
+
[r.squareBorder]: a
|
44
|
+
}
|
36
45
|
);
|
37
|
-
return /* @__PURE__ */
|
38
|
-
|
39
|
-
|
46
|
+
return /* @__PURE__ */ c("div", { className: n, children: [
|
47
|
+
l,
|
48
|
+
s && /* @__PURE__ */ m(d, { isIconButton: !0, iconName: "Close16px", onClick: o, clear: !0 })
|
40
49
|
] });
|
41
50
|
};
|
42
51
|
export {
|
43
|
-
|
52
|
+
M as Chip
|
44
53
|
};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
export declare enum EChipSize {
|
2
2
|
XS = "xs",
|
3
3
|
S = "s",
|
4
|
+
SM = "sm",
|
4
5
|
M = "m"
|
5
6
|
}
|
6
7
|
export declare enum EChipVariant {
|
@@ -9,5 +10,8 @@ export declare enum EChipVariant {
|
|
9
10
|
Asphalt = "asphalt",
|
10
11
|
Gray = "gray",
|
11
12
|
White = "white",
|
12
|
-
Green = "green"
|
13
|
+
Green = "green",
|
14
|
+
GreenLight = "green-light",
|
15
|
+
OrangeLight = "orange-light",
|
16
|
+
YellowLight = "yellow-light"
|
13
17
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
var
|
1
|
+
var g = /* @__PURE__ */ ((e) => (e.XS = "xs", e.S = "s", e.SM = "sm", e.M = "m", e))(g || {}), r = /* @__PURE__ */ ((e) => (e.Sapphire = "sapphire", e.Citrine = "citrine", e.Asphalt = "asphalt", e.Gray = "gray", e.White = "white", e.Green = "green", e.GreenLight = "green-light", e.OrangeLight = "orange-light", e.YellowLight = "yellow-light", e))(r || {});
|
2
2
|
export {
|
3
|
-
|
4
|
-
|
3
|
+
g as EChipSize,
|
4
|
+
r as EChipVariant
|
5
5
|
};
|
@@ -0,0 +1,96 @@
|
|
1
|
+
import { jsxs as x, jsx as d } from "react/jsx-runtime";
|
2
|
+
import { c as r } from "../../index-DIxK0V-G.js";
|
3
|
+
import { forwardRef as P, useState as i, useCallback as t } from "react";
|
4
|
+
import { Icon as U } from "../../icons/Icon.js";
|
5
|
+
import '../../assets/CopyText.css';const j = "_wrapper_l1onk_2", E = "_container_l1onk_7", H = "_disabled_l1onk_14", L = "_hovered_l1onk_18", R = "_text_l1onk_22", q = "_pressed_l1onk_25", z = "_icon_l1onk_29", B = "_visible_l1onk_39", G = "_toast_l1onk_48", J = "_fadeOut_l1onk_65", e = {
|
6
|
+
wrapper: j,
|
7
|
+
container: E,
|
8
|
+
disabled: H,
|
9
|
+
hovered: L,
|
10
|
+
text: R,
|
11
|
+
pressed: q,
|
12
|
+
icon: z,
|
13
|
+
visible: B,
|
14
|
+
toast: G,
|
15
|
+
"slide-in": "_slide-in_l1onk_1",
|
16
|
+
fadeOut: J,
|
17
|
+
"slide-out": "_slide-out_l1onk_1"
|
18
|
+
}, N = 200, K = P(
|
19
|
+
(T, b) => {
|
20
|
+
const {
|
21
|
+
text: a,
|
22
|
+
className: k,
|
23
|
+
onCopy: n,
|
24
|
+
showToast: _ = !0,
|
25
|
+
toastDuration: p = 2e3,
|
26
|
+
toastText: w = "Скопировано в буфер обмена",
|
27
|
+
disabled: s = !1,
|
28
|
+
...M
|
29
|
+
} = T, [u, f] = i(!1), [o, m] = i(!1), [y, h] = i(!1), [C, l] = i(!1), v = t(async () => {
|
30
|
+
if (!s)
|
31
|
+
try {
|
32
|
+
if (await navigator.clipboard.writeText(a), _) {
|
33
|
+
h(!0), l(!1);
|
34
|
+
const c = Math.max(
|
35
|
+
p - N,
|
36
|
+
0
|
37
|
+
);
|
38
|
+
setTimeout(() => {
|
39
|
+
l(!0), setTimeout(() => {
|
40
|
+
h(!1), l(!1);
|
41
|
+
}, N);
|
42
|
+
}, c);
|
43
|
+
}
|
44
|
+
n == null || n(a);
|
45
|
+
} catch (c) {
|
46
|
+
console.error("Failed to copy text:", c);
|
47
|
+
}
|
48
|
+
}, [a, n, _, p, s]), O = t(() => {
|
49
|
+
s || f(!0);
|
50
|
+
}, [s]), I = t(() => {
|
51
|
+
f(!1);
|
52
|
+
}, []), D = t(() => {
|
53
|
+
s || m(!0);
|
54
|
+
}, [s]), S = t(() => {
|
55
|
+
!s && o && (m(!1), v());
|
56
|
+
}, [s, o, v]), g = r(e.container, k, {
|
57
|
+
[e.disabled]: s,
|
58
|
+
[e.hovered]: u,
|
59
|
+
[e.pressed]: o
|
60
|
+
}), A = r(e.text, {
|
61
|
+
[e.pressed]: o
|
62
|
+
}), F = r(e.icon, {
|
63
|
+
[e.pressed]: o,
|
64
|
+
[e.visible]: u
|
65
|
+
});
|
66
|
+
return /* @__PURE__ */ x("div", { ref: b, className: e.wrapper, ...M, children: [
|
67
|
+
/* @__PURE__ */ x(
|
68
|
+
"div",
|
69
|
+
{
|
70
|
+
className: g,
|
71
|
+
onMouseEnter: O,
|
72
|
+
onMouseLeave: I,
|
73
|
+
onMouseDown: D,
|
74
|
+
onMouseUp: S,
|
75
|
+
children: [
|
76
|
+
/* @__PURE__ */ d("span", { className: A, children: a }),
|
77
|
+
/* @__PURE__ */ d(U, { iconName: "CopyClipboard16px", className: F })
|
78
|
+
]
|
79
|
+
}
|
80
|
+
),
|
81
|
+
y && /* @__PURE__ */ d(
|
82
|
+
"div",
|
83
|
+
{
|
84
|
+
className: r(e.toast, {
|
85
|
+
[e.fadeOut]: C
|
86
|
+
}),
|
87
|
+
children: w
|
88
|
+
}
|
89
|
+
)
|
90
|
+
] });
|
91
|
+
}
|
92
|
+
);
|
93
|
+
K.displayName = "CopyText";
|
94
|
+
export {
|
95
|
+
K as CopyText
|
96
|
+
};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { ComponentProps } from 'react';
|
2
|
+
|
3
|
+
export type TProps = ComponentProps<'div'> & {
|
4
|
+
/**
|
5
|
+
* Текст для копирования
|
6
|
+
*/
|
7
|
+
text: string;
|
8
|
+
/**
|
9
|
+
* Класс, применяемый к корневому элементу
|
10
|
+
*/
|
11
|
+
className?: string;
|
12
|
+
/**
|
13
|
+
* Callback, вызываемый при успешном копировании
|
14
|
+
*/
|
15
|
+
onCopy?: (text: string) => void;
|
16
|
+
/**
|
17
|
+
* Показывать ли тост с подтверждением
|
18
|
+
*/
|
19
|
+
showToast?: boolean;
|
20
|
+
/**
|
21
|
+
* Длительность показа тоста в миллисекундах
|
22
|
+
*/
|
23
|
+
toastDuration?: number;
|
24
|
+
/**
|
25
|
+
* Текст в тосте
|
26
|
+
*/
|
27
|
+
toastText?: string;
|
28
|
+
/**
|
29
|
+
* Отключить компонент
|
30
|
+
*/
|
31
|
+
disabled?: boolean;
|
32
|
+
};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { EDatePickerBorderRadius } from './constants';
|
1
2
|
import { TInputProps } from '../Input';
|
2
3
|
|
3
4
|
export type TProps = {
|
@@ -69,6 +70,15 @@ export type TProps = {
|
|
69
70
|
* Диапазон доступных дат [от, до]
|
70
71
|
*/
|
71
72
|
validRange?: [Date | string, Date | string];
|
73
|
+
/**
|
74
|
+
* Управление скруглениями углов компонента
|
75
|
+
* @default 'all'
|
76
|
+
*/
|
77
|
+
borderRadius?: EDatePickerBorderRadius | `${EDatePickerBorderRadius}`;
|
78
|
+
/**
|
79
|
+
* Флаг для растяжки компонента на всю ширину экрана
|
80
|
+
*/
|
81
|
+
full?: boolean;
|
72
82
|
} & TInputProps;
|
73
83
|
export type TDatePickerValue = {
|
74
84
|
value?: string;
|
@@ -147,4 +157,13 @@ export declare const DatePicker: import('react').MemoExoticComponent<import('rea
|
|
147
157
|
* Диапазон доступных дат [от, до]
|
148
158
|
*/
|
149
159
|
validRange?: [Date | string, Date | string];
|
160
|
+
/**
|
161
|
+
* Управление скруглениями углов компонента
|
162
|
+
* @default 'all'
|
163
|
+
*/
|
164
|
+
borderRadius?: EDatePickerBorderRadius | `${EDatePickerBorderRadius}`;
|
165
|
+
/**
|
166
|
+
* Флаг для растяжки компонента на всю ширину экрана
|
167
|
+
*/
|
168
|
+
full?: boolean;
|
150
169
|
} & import('../Input/types').TInputProps & import('../Input').TAdditionalProps & import('react').RefAttributes<HTMLInputElement>>>;
|