mimir-ui-kit 1.14.4 → 1.14.7
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +62 -62
- package/dist/SelectSearchOption-snHM9uZX.js +3796 -0
- package/dist/assets/Image.css +1 -0
- package/dist/assets/SelectSearch.css +1 -1
- package/dist/assets/SelectSearchOption.css +1 -0
- package/dist/assets/Tag.css +1 -1
- package/dist/components/Image/Image.d.ts +12 -0
- package/dist/components/Image/Image.js +42 -15
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/SelectSearch/SelectSearch.d.ts +7 -12
- package/dist/components/SelectSearch/SelectSearch.js +681 -3792
- package/dist/components/SelectSearch/constants.d.ts +2 -2
- package/dist/components/SelectSearch/constants.js +1 -1
- package/dist/components/SelectSearch/index.d.ts +2 -1
- package/dist/components/SelectSearch/types.d.ts +40 -0
- package/dist/components/SelectSearch/types.js +1 -0
- package/dist/components/SelectSearchOption/SelectSearchOption.d.ts +10 -0
- package/dist/components/SelectSearchOption/SelectSearchOption.js +8 -0
- package/dist/components/SelectSearchOption/index.d.ts +2 -0
- package/dist/components/SelectSearchOption/index.js +4 -0
- package/dist/components/Slider/Slider.d.ts +2 -0
- package/dist/components/Slider/Slider.js +4 -2
- package/dist/components/Tag/Tag.js +6 -6
- package/dist/components/Uploader/Uploader.d.ts +4 -4
- package/dist/components/Uploader/Uploader.js +5 -4
- package/dist/components/Uploader/constants.d.ts +1 -1
- package/dist/components/Uploader/constants.js +1 -1
- package/dist/components/Uploader/index.d.ts +1 -1
- package/dist/components/UploaderPhotos/UploaderPhotos.d.ts +3 -3
- package/dist/components/UploaderPhotos/UploaderPhotos.js +2 -2
- package/dist/components/UploaderPhotos/index.d.ts +1 -1
- package/dist/components/index.d.ts +8 -2
- package/dist/components/index.js +8 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +2 -1
- package/dist/hooks/useMediaQuery/constants.d.ts +10 -0
- package/dist/hooks/useMediaQuery/constants.js +13 -1
- package/dist/hooks/useMediaQuery/index.d.ts +1 -1
- package/dist/hooks/useMediaQuery/index.js +2 -1
- package/dist/index.js +10 -2
- package/package.json +130 -128
@@ -0,0 +1 @@
|
|
1
|
+
._picture_9zemz_2,._image_9zemz_3{display:block;width:100%;height:auto}._loading_9zemz_9{filter:blur(20px);transition:.3s filter ease}
|
@@ -1 +1 @@
|
|
1
|
-
._select-
|
1
|
+
._select-search_1c0m8_2{position:relative}._container_1c0m8_6{display:block;gap:var(--select-search-gap);align-items:center;justify-content:space-between;height:var(--select-search-height);background-color:var(--black-5);border-radius:var(--select-search-radius)}._container-open_1c0m8_15{border-bottom:1px solid var(--citrine-100)}._full_1c0m8_19{width:100%}._selector-icon-open_1c0m8_23{transform:rotate(180deg)}._button_1c0m8_27{position:absolute;top:0;right:0;display:flex;align-items:center;margin:var(--select-search-btn-space);background:none;border:none;cursor:pointer}._options_1c0m8_39{position:absolute;top:100%;z-index:10;width:100%;height:-webkit-max-content;height:-moz-max-content;height:max-content;max-height:var(--select-search-options-height-desktop);overflow-y:auto;font-size:var(--size-text-l);background:var(--white);border-radius:0 0 var(--select-search-radius) var(--select-search-radius);box-shadow:var(--box-shadow-select-search)}._options_1c0m8_39::-webkit-scrollbar{width:2px}._options_1c0m8_39::-webkit-scrollbar-thumb{background-color:var(--black-80);border-radius:2px}._options_1c0m8_39::-webkit-scrollbar-track{background-color:var(--white)}@media (max-width: 600px){._options_1c0m8_39{max-height:var(--select-search-options-height-mobile)}}._no-options_1c0m8_68{padding:var(--select-search-option-space);color:var(--black-80)}._m_1c0m8_73{--select-search-height: var(--select-search-height-l);--select-search-space: var(--space-xss) var(--space-m);--select-search-radius: var(--control-radius);--select-search-gap: var(--space-2xs);--select-search-btn-space: var(--space-m) var(--space-m) var(--space-m) var(--space-xs);--select-search-option-space: var(--space-2s) var(--space-m)}._l_1c0m8_83{--select-search-height: var(--select-search-height-xxl);--select-search-space: var(--space-xss) var(--space-m);--select-search-radius: var(--control-radius-s);--select-search-gap: var(--space-xs);--select-search-btn-space: var(--space-l) var(--space-m) var(--space-l) var(--space-xs);--select-search-option-space: var(--space-2l) var(--space-m)}._list_1c0m8_93{height:100%}._list_1c0m8_93::-webkit-scrollbar{width:2px}._list_1c0m8_93::-webkit-scrollbar-thumb{background-color:var(--black-80);border-radius:2px}._list_1c0m8_93::-webkit-scrollbar-track{background-color:var(--white)}._custom-input-class_1c0m8_107{width:100%!important}._custom-input-class_1c0m8_107:last-child{padding-right:var(--space-4xl)}
|
@@ -0,0 +1 @@
|
|
1
|
+
._option_5wfzg_2{display:flex;height:100%;padding:var(--select-search-option-space);cursor:pointer;transition:background-color .2s ease-in-out}._option-active_5wfzg_9{background-color:var(--black-5)}._option-inner_5wfzg_12{display:flex;gap:var(--space-m);align-items:center;align-self:center;justify-content:space-between;width:100%}._selected-icon_5wfzg_21 path{fill:var(--sapphire-100)}._m_5wfzg_25{--select-search-gap: var(--space-2xs);--select-search-option-space: var(--space-2s) var(--space-m)}._l_5wfzg_30{--select-search-gap: var(--space-xs);--select-search-option-space: var(--space-2l) var(--space-m)}
|
package/dist/assets/Tag.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._container_ok6fq_2{display:flex;align-items:center;justify-content:center;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;color:var(--sapphire-normal);border:none;border:1px solid var(--sapphire-normal);border-top-left-radius:var(--control-radius-s);border-bottom-right-radius:var(--control-radius-s);transform:skew(-23.48deg)}._container_ok6fq_2:hover{color:var(--sapphire-hover);border-color:var(--sapphire-hover)}._container_ok6fq_2:active{color:var(--white);background-color:var(--sapphire-normal)}._container_ok6fq_2:focus{box-shadow:0 0 4px 0 var(--box-shadow-focus)}._container_ok6fq_2._disabled_ok6fq_25{color:var(--white);background-color:var(--disabled);border-color:var(--disabled)}._container_ok6fq_2 ._inner_ok6fq_30{display:inline-block;font-weight:var(--font-weight-text-regular);font-size:var(--size-text-l);font-family:var(--inter-font-family);line-height:var(--line-height-text-s1);transform:skew(23.48deg)}._container_ok6fq_2._M_ok6fq_38{height:40px;padding:0 15px}._container_ok6fq_2._S_ok6fq_42{height:32px;padding:0 11px}._container_ok6fq_2._S_ok6fq_42 ._inner_ok6fq_30{font-size:var(--size-text-m);line-height:16px}._container_ok6fq_2._XS_ok6fq_50{height:26px;padding:0 8px}._container_ok6fq_2._XS_ok6fq_50 ._inner_ok6fq_30{font-size:var(--size-text-s);line-height:20px}
|
@@ -5,6 +5,10 @@ type TProps = ComponentProps<'img'> & {
|
|
5
5
|
* Дополнительный класс к компоненту
|
6
6
|
*/
|
7
7
|
className?: string;
|
8
|
+
/**
|
9
|
+
* Дополнительный класс к контейнеру picture
|
10
|
+
*/
|
11
|
+
pictureClassName?: string;
|
8
12
|
/**
|
9
13
|
* Компонент, который буде показываться, пока идет загрузка изображения
|
10
14
|
*/
|
@@ -13,6 +17,14 @@ type TProps = ComponentProps<'img'> & {
|
|
13
17
|
* Компонент, который буде показываться, если произошла ошибка при загрузке изображения
|
14
18
|
*/
|
15
19
|
errorFallback?: ReactElement;
|
20
|
+
/**
|
21
|
+
* Изображение для десктопной версии
|
22
|
+
*/
|
23
|
+
desktopImage?: string;
|
24
|
+
/**
|
25
|
+
* Изображение для мобильной версии
|
26
|
+
*/
|
27
|
+
mobileImage?: string;
|
16
28
|
};
|
17
29
|
/**
|
18
30
|
* Компонент для отображения изображения с возможность показа загрузки и ошибки
|
@@ -1,10 +1,23 @@
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
2
|
+
import { c as classNames } from "../../index-CweZ_OcN.js";
|
2
3
|
import { memo, useState, useLayoutEffect } from "react";
|
4
|
+
import { EMediaQuery, EMinMediaQuery } from "../../hooks/useMediaQuery/constants.js";
|
5
|
+
import '../../assets/Image.css';const picture = "_picture_9zemz_2";
|
6
|
+
const image = "_image_9zemz_3";
|
7
|
+
const loading = "_loading_9zemz_9";
|
8
|
+
const cls = {
|
9
|
+
picture,
|
10
|
+
image,
|
11
|
+
loading
|
12
|
+
};
|
3
13
|
const AppImage = memo((props) => {
|
4
14
|
const {
|
5
15
|
className,
|
6
16
|
src,
|
7
17
|
alt = "image",
|
18
|
+
desktopImage,
|
19
|
+
mobileImage,
|
20
|
+
pictureClassName,
|
8
21
|
errorFallback,
|
9
22
|
fallback,
|
10
23
|
...otherProps
|
@@ -13,7 +26,7 @@ const AppImage = memo((props) => {
|
|
13
26
|
const [hasError, setHasError] = useState(false);
|
14
27
|
useLayoutEffect(() => {
|
15
28
|
const img = new Image();
|
16
|
-
img.src = src ?? "";
|
29
|
+
img.src = src ?? desktopImage ?? mobileImage ?? "";
|
17
30
|
img.onload = () => {
|
18
31
|
setIsLoading(false);
|
19
32
|
};
|
@@ -21,26 +34,40 @@ const AppImage = memo((props) => {
|
|
21
34
|
setIsLoading(false);
|
22
35
|
setHasError(true);
|
23
36
|
};
|
24
|
-
}, [src]);
|
37
|
+
}, [src, desktopImage, mobileImage]);
|
25
38
|
if (isLoading && fallback) {
|
26
39
|
return fallback;
|
27
40
|
}
|
28
41
|
if (hasError && errorFallback) {
|
29
42
|
return errorFallback;
|
30
43
|
}
|
31
|
-
return /* @__PURE__ */
|
32
|
-
"
|
44
|
+
return /* @__PURE__ */ jsxs(
|
45
|
+
"picture",
|
33
46
|
{
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
47
|
+
className: classNames(cls.picture, pictureClassName, {
|
48
|
+
[cls.loading]: isLoading
|
49
|
+
}),
|
50
|
+
children: [
|
51
|
+
mobileImage && /* @__PURE__ */ jsx("source", { srcSet: mobileImage, media: EMediaQuery.S }),
|
52
|
+
desktopImage && /* @__PURE__ */ jsx("source", { srcSet: desktopImage, media: EMinMediaQuery.S }),
|
53
|
+
/* @__PURE__ */ jsx(
|
54
|
+
"img",
|
55
|
+
{
|
56
|
+
...otherProps,
|
57
|
+
style: {
|
58
|
+
display: "block",
|
59
|
+
filter: `${isLoading ? "blur(20px)" : ""}`,
|
60
|
+
transition: ".3s filter ease"
|
61
|
+
},
|
62
|
+
className: classNames(cls.image, className, {
|
63
|
+
[cls.loading]: isLoading
|
64
|
+
}),
|
65
|
+
loading: "lazy",
|
66
|
+
src,
|
67
|
+
alt
|
68
|
+
}
|
69
|
+
)
|
70
|
+
]
|
44
71
|
}
|
45
72
|
);
|
46
73
|
});
|
@@ -1,15 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import { FixedSizeListProps } from 'react-window';
|
2
|
+
import { TSelectSearchProps } from './types';
|
3
|
+
import { SelectSearchOptionProps } from '../SelectSearchOption';
|
2
4
|
|
3
|
-
export type
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
export type TSelectSearchProps = {
|
8
|
-
items: TSelectSearchItem[];
|
9
|
-
value?: TSelectSearchItem | null;
|
10
|
-
onChange?: (value: TSelectSearchItem | null) => void;
|
11
|
-
placeholder?: string;
|
12
|
-
size?: ESelectSearchSize;
|
13
|
-
full?: boolean;
|
5
|
+
export type SelectSearchFilterOption = SelectSearchOptionProps & {
|
6
|
+
key: React.Key | null;
|
7
|
+
children: React.ReactNode;
|
14
8
|
};
|
9
|
+
export type VirtualizedFixedSizeListProps = Omit<FixedSizeListProps, 'children' | 'itemCount'>;
|
15
10
|
export declare const SelectSearch: import('react').ForwardRefExoticComponent<TSelectSearchProps & import('react').RefAttributes<HTMLElement>>;
|