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
@@ -0,0 +1,5 @@
|
|
1
|
+
var t = /* @__PURE__ */ ((T) => (T.TOP = "top", T.BOTTOM = "bottom", T.LEFT = "left", T.RIGHT = "right", T))(t || {}), r = /* @__PURE__ */ ((T) => (T.START = "start", T.END = "end", T.CENTER = "", T))(r || {});
|
2
|
+
export {
|
3
|
+
r as EDropdownAlign,
|
4
|
+
t as EDropdownPlacement
|
5
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { RefObject } from 'react';
|
2
|
+
|
3
|
+
export declare const ANIMATION_DELAY = 300;
|
4
|
+
export declare const POSITION_THRESHOLD = 5;
|
5
|
+
export declare const ALIGNMENT_THRESHOLD = 10;
|
6
|
+
export declare const DEBOUNCE_DELAY = 10;
|
7
|
+
type UseDropdownPositionProps = {
|
8
|
+
buttonRef: RefObject<HTMLButtonElement>;
|
9
|
+
panelRef: RefObject<HTMLDivElement>;
|
10
|
+
initialPosition: string;
|
11
|
+
isOpen: boolean;
|
12
|
+
arrow?: boolean;
|
13
|
+
variant?: 'default' | 'black';
|
14
|
+
};
|
15
|
+
export declare const useDropdownPosition: ({ buttonRef, panelRef, initialPosition, isOpen, arrow, variant }: UseDropdownPositionProps) => {
|
16
|
+
getArrowClasses: () => string;
|
17
|
+
getPositionClass: () => string;
|
18
|
+
};
|
19
|
+
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import "../../index-DIxK0V-G.js";
|
2
|
+
import "react";
|
3
|
+
import "./constants.js";
|
4
|
+
import { a as r, A, D as N, P as O, u as i } from "../../hooks-HgN6Yauq.js";
|
5
|
+
export {
|
6
|
+
r as ALIGNMENT_THRESHOLD,
|
7
|
+
A as ANIMATION_DELAY,
|
8
|
+
N as DEBOUNCE_DELAY,
|
9
|
+
O as POSITION_THRESHOLD,
|
10
|
+
i as useDropdownPosition
|
11
|
+
};
|
@@ -1,4 +1,7 @@
|
|
1
|
-
import { Dropdown as
|
1
|
+
import { Dropdown as n } from "./Dropdown.js";
|
2
|
+
import { EDropdownAlign as e, EDropdownPlacement as d } from "./constants.js";
|
2
3
|
export {
|
3
|
-
|
4
|
+
n as Dropdown,
|
5
|
+
e as EDropdownAlign,
|
6
|
+
d as EDropdownPlacement
|
4
7
|
};
|
@@ -25,6 +25,22 @@ type TProps = ComponentProps<'img'> & {
|
|
25
25
|
* Изображение для мобильной версии
|
26
26
|
*/
|
27
27
|
mobileImage?: string;
|
28
|
+
/**
|
29
|
+
* Изображение для Retina (2x) десктопной версии
|
30
|
+
*/
|
31
|
+
desktopImage2x?: string;
|
32
|
+
/**
|
33
|
+
* Изображение для Retina (2x) мобильной версии
|
34
|
+
*/
|
35
|
+
mobileImage2x?: string;
|
36
|
+
/**
|
37
|
+
* Изображение для Super Retina (3x) десктопной версии
|
38
|
+
*/
|
39
|
+
desktopImage3x?: string;
|
40
|
+
/**
|
41
|
+
* Изображение для Super Retina (3x) мобильной версии
|
42
|
+
*/
|
43
|
+
mobileImage3x?: string;
|
28
44
|
};
|
29
45
|
/**
|
30
46
|
* Компонент для отображения изображения с возможность показа загрузки и ошибки
|
@@ -1,49 +1,77 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import { memo as
|
4
|
-
import { EMediaQuery as
|
5
|
-
import '../../assets/Image.css';const
|
6
|
-
picture:
|
7
|
-
image:
|
8
|
-
loading:
|
9
|
-
},
|
1
|
+
import { jsxs as M, jsx as m } from "react/jsx-runtime";
|
2
|
+
import { c as S } from "../../index-DIxK0V-G.js";
|
3
|
+
import { memo as j, useState as _, useLayoutEffect as Q } from "react";
|
4
|
+
import { EMediaQuery as $, EMinMediaQuery as w } from "../../hooks/useMediaQuery/constants.js";
|
5
|
+
import '../../assets/Image.css';const z = "_picture_1hx49_2", A = "_image_1hx49_3", C = "_loading_1hx49_10", a = {
|
6
|
+
picture: z,
|
7
|
+
image: A,
|
8
|
+
loading: C
|
9
|
+
}, q = j((h) => {
|
10
10
|
const {
|
11
|
-
className:
|
12
|
-
src:
|
13
|
-
alt:
|
14
|
-
desktopImage:
|
15
|
-
mobileImage:
|
16
|
-
pictureClassName:
|
17
|
-
errorFallback:
|
18
|
-
fallback:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
11
|
+
className: b,
|
12
|
+
src: o,
|
13
|
+
alt: k = "image",
|
14
|
+
desktopImage: r,
|
15
|
+
mobileImage: s,
|
16
|
+
pictureClassName: E,
|
17
|
+
errorFallback: l,
|
18
|
+
fallback: n,
|
19
|
+
desktopImage2x: g,
|
20
|
+
mobileImage2x: u,
|
21
|
+
desktopImage3x: d,
|
22
|
+
mobileImage3x: p,
|
23
|
+
...N
|
24
|
+
} = h, [t, f] = _(!0), [y, L] = _(!1);
|
25
|
+
if (Q(() => {
|
26
|
+
const e = new Image();
|
27
|
+
e.src = o ?? r ?? s ?? "", e.onload = () => {
|
28
|
+
f(!1);
|
29
|
+
}, e.onerror = () => {
|
30
|
+
f(!1), L(!0);
|
27
31
|
};
|
28
|
-
}, [
|
32
|
+
}, [o, r, s]), t && n)
|
33
|
+
return n;
|
34
|
+
if (y && l)
|
35
|
+
return l;
|
36
|
+
const i = (e, x, I) => {
|
37
|
+
let c = e;
|
38
|
+
return x && (c += `, ${x} 2x`), I && (c += `, ${I} 3x`), c;
|
39
|
+
};
|
40
|
+
return /* @__PURE__ */ M(
|
29
41
|
"picture",
|
30
42
|
{
|
31
|
-
className:
|
32
|
-
[
|
43
|
+
className: S(a.picture, E, {
|
44
|
+
[a.loading]: t
|
33
45
|
}),
|
34
46
|
children: [
|
35
|
-
|
36
|
-
|
37
|
-
|
47
|
+
s && /* @__PURE__ */ m(
|
48
|
+
"source",
|
49
|
+
{
|
50
|
+
srcSet: i(s, u, p),
|
51
|
+
media: $.XS1
|
52
|
+
}
|
53
|
+
),
|
54
|
+
r && /* @__PURE__ */ m(
|
55
|
+
"source",
|
56
|
+
{
|
57
|
+
srcSet: i(r, g, d),
|
58
|
+
media: w.S
|
59
|
+
}
|
60
|
+
),
|
61
|
+
/* @__PURE__ */ m(
|
38
62
|
"img",
|
39
63
|
{
|
40
|
-
...
|
41
|
-
className:
|
42
|
-
[
|
64
|
+
...N,
|
65
|
+
className: S(a.image, b, {
|
66
|
+
[a.loading]: t
|
43
67
|
}),
|
44
68
|
loading: "lazy",
|
45
|
-
|
46
|
-
|
69
|
+
srcSet: i(
|
70
|
+
o ?? "",
|
71
|
+
g ?? u,
|
72
|
+
d ?? p
|
73
|
+
),
|
74
|
+
alt: k
|
47
75
|
}
|
48
76
|
)
|
49
77
|
]
|
@@ -51,5 +79,5 @@ import '../../assets/Image.css';const b = "_picture_1hx49_2", k = "_image_1hx49_
|
|
51
79
|
);
|
52
80
|
});
|
53
81
|
export {
|
54
|
-
|
82
|
+
q as AppImage
|
55
83
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { EMultiSelectSearchSize } from './constants';
|
1
|
+
import { ELoadingIndicatorPlacement, EMultiSelectSearchSize } from './constants';
|
2
2
|
import { TMultiSelectOption } from './types';
|
3
3
|
|
4
4
|
export declare const MultiSelectSearch: import('react').ForwardRefExoticComponent<Pick<import('../Input').TInputProps, "variant" | "withClearButton"> & {
|
@@ -23,4 +23,11 @@ export declare const MultiSelectSearch: import('react').ForwardRefExoticComponen
|
|
23
23
|
id?: string;
|
24
24
|
autoPlacement?: boolean;
|
25
25
|
onIsOpen?: (value: boolean) => void;
|
26
|
+
noOptionsText?: string | import('react').ReactNode;
|
27
|
+
noMatchText?: string | import('react').ReactNode;
|
28
|
+
loadOnOpen?: () => void;
|
29
|
+
loading?: boolean;
|
30
|
+
loadingIndicatorPlacement?: ELoadingIndicatorPlacement | `${ELoadingIndicatorPlacement}`;
|
31
|
+
groupBy?: string;
|
32
|
+
getGroupTitle?: (groupValue: string) => string;
|
26
33
|
} & import('react').RefAttributes<HTMLElement>>;
|