mimir-ui-kit 1.14.5 → 1.15.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +62 -62
- package/dist/ProgressBar-BekX41HR.js +77 -0
- package/dist/SelectSearchOption-snHM9uZX.js +3796 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/ProgressBar2.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/Button/Button.js +29 -29
- 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/Tag/Tag.js +6 -6
- package/dist/components/Timer/Timer.d.ts +1 -1
- package/dist/components/Timer/Timer.js +17 -19
- package/dist/components/Toasts/ProgressBar.d.ts +5 -0
- package/dist/components/Toasts/ProgressBar.js +8 -0
- package/dist/components/Toasts/Toast.d.ts +54 -0
- package/dist/components/Toasts/Toast.js +73 -0
- package/dist/components/Toasts/ToastList.d.ts +10 -0
- package/dist/components/Toasts/ToastList.js +50 -0
- package/dist/components/Toasts/ToastsProvider.d.ts +3 -0
- package/dist/components/Toasts/ToastsProvider.js +46 -0
- package/dist/components/Toasts/constants.d.ts +23 -0
- package/dist/components/Toasts/constants.js +49 -0
- package/dist/components/Toasts/hooks.d.ts +2 -0
- package/dist/components/Toasts/hooks.js +16 -0
- package/dist/components/Toasts/index.d.ts +3 -0
- package/dist/components/Toasts/index.js +9 -0
- package/dist/components/Toasts/store.d.ts +29 -0
- package/dist/components/Toasts/store.js +50 -0
- package/dist/components/Toasts/types.d.ts +5 -0
- package/dist/components/Toasts/types.js +1 -0
- 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 -1
- package/dist/components/index.js +14 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/useCopyToClipboard/index.d.ts +1 -0
- package/dist/hooks/useCopyToClipboard/index.js +4 -0
- package/dist/hooks/useCopyToClipboard/useCopyToClipboard.d.ts +4 -0
- package/dist/hooks/useCopyToClipboard/useCopyToClipboard.js +23 -0
- package/dist/hooks/useTimer/index.d.ts +2 -2
- package/dist/hooks/useTimer/index.js +14 -7
- package/dist/index.js +16 -1
- package/package.json +127 -128
@@ -3,13 +3,13 @@ import { imageTypesArr } from './constants';
|
|
3
3
|
export type TUploader = {
|
4
4
|
/**
|
5
5
|
* Массив разрешенных типов файлов для настройки валидации
|
6
|
-
* 'jpeg' | 'png' | 'tiff'|'gif'|'doc'|'xls'|'pdf'|'docx' |'txt' | 'xlsx'
|
6
|
+
* 'jpeg' | 'jpg' | 'png' | 'tiff' | 'gif' | 'doc' | 'xls' | 'pdf' | 'docx' | 'txt' | 'xlsx'
|
7
7
|
*/
|
8
8
|
filesType: imageTypesArr[];
|
9
9
|
/**
|
10
10
|
* Наименование передаваемого массива файлов
|
11
11
|
*/
|
12
|
-
|
12
|
+
arrayName: string;
|
13
13
|
/**
|
14
14
|
* Функция - callback, которая вызывается при изменении значения и передает имя и новое значение
|
15
15
|
*/
|
@@ -21,10 +21,10 @@ export type TUploader = {
|
|
21
21
|
};
|
22
22
|
export type TUploadValue = {
|
23
23
|
value: TFileItem[];
|
24
|
-
|
24
|
+
arrayName?: string;
|
25
25
|
};
|
26
26
|
export type TFileItem = {
|
27
27
|
id: number;
|
28
28
|
file: File;
|
29
29
|
};
|
30
|
-
export declare function Uploader({ filesType, onChangeValue,
|
30
|
+
export declare function Uploader({ filesType, onChangeValue, arrayName, maxSize }: TUploader): import("react/jsx-runtime").JSX.Element;
|
@@ -9,6 +9,7 @@ import '../../assets/Uploader.css';const cls = {
|
|
9
9
|
};
|
10
10
|
const MIME = {
|
11
11
|
jpeg: "image/jpeg",
|
12
|
+
jpg: "image/jpg",
|
12
13
|
png: "image/png",
|
13
14
|
tiff: "image/tiff",
|
14
15
|
gif: "image/gif",
|
@@ -20,14 +21,14 @@ const MIME = {
|
|
20
21
|
txt: "text/plain",
|
21
22
|
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
22
23
|
};
|
23
|
-
const filesTyps = ["jpeg", "png", "tiff", "gif"];
|
24
|
+
const filesTyps = ["jpeg", "jpg", "png", "tiff", "gif"];
|
24
25
|
const generateId = (min, max) => {
|
25
26
|
return Math.random() * (max - min) + min;
|
26
27
|
};
|
27
28
|
function Uploader({
|
28
29
|
filesType = filesTyps,
|
29
30
|
onChangeValue,
|
30
|
-
|
31
|
+
arrayName,
|
31
32
|
maxSize = 15
|
32
33
|
}) {
|
33
34
|
const idImg = useId();
|
@@ -36,11 +37,11 @@ function Uploader({
|
|
36
37
|
if (e.target.files && e.target.files[0]) {
|
37
38
|
const list = [];
|
38
39
|
Array.from(e.target.files).forEach((el) => {
|
39
|
-
if (filesType.map((
|
40
|
+
if (filesType.map((name) => MIME[name]).includes(el.type) && el.size / 1024 ** 2 <= maxSize) {
|
40
41
|
list.push({ file: el, id: generateId(1, 100) });
|
41
42
|
}
|
42
43
|
});
|
43
|
-
onChangeValue({
|
44
|
+
onChangeValue({ arrayName, value: list });
|
44
45
|
}
|
45
46
|
};
|
46
47
|
const onOpen = () => {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export type imageTypesArr = 'jpeg' | 'png' | 'tiff' | 'gif' | 'doc' | 'xls' | 'pdf' | 'docx' | 'txt' | 'xlsx';
|
1
|
+
export type imageTypesArr = 'jpeg' | 'jpg' | 'png' | 'tiff' | 'gif' | 'doc' | 'xls' | 'pdf' | 'docx' | 'txt' | 'xlsx';
|
2
2
|
export declare const TypeFilesArray: {
|
3
3
|
images: imageTypesArr[];
|
4
4
|
docs: imageTypesArr[];
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export { Uploader } from './Uploader';
|
2
|
-
export type {
|
2
|
+
export type { TUploader, TFileItem, TUploadValue } from './Uploader';
|
@@ -4,13 +4,13 @@ import { TFileItem } from '../Uploader/Uploader';
|
|
4
4
|
export type TUploaderPhotos = {
|
5
5
|
/**
|
6
6
|
* Массив разрешенных типов файлов для настройки валидации
|
7
|
-
* 'jpeg' | 'png' | 'tiff' | 'gif' | 'doc' | 'xls' | 'pdf' |'docx' | 'txt'
|
7
|
+
* 'jpeg' | 'jpg' | 'png' | 'tiff' | 'gif' | 'doc' | 'xls' | 'pdf' |'docx' | 'txt'
|
8
8
|
*/
|
9
9
|
filesType: imageTypesArr[];
|
10
10
|
/**
|
11
11
|
* Наименование передаваемого массива файлов
|
12
12
|
*/
|
13
|
-
|
13
|
+
arrayName: string;
|
14
14
|
/**
|
15
15
|
* Максимальный размер файлов.
|
16
16
|
*/
|
@@ -26,4 +26,4 @@ export type TOnChangePhotosUpdate = {
|
|
26
26
|
type: string;
|
27
27
|
data: TFileItem[] | number;
|
28
28
|
};
|
29
|
-
export declare function UploaderPhotos({ filesType,
|
29
|
+
export declare function UploaderPhotos({ filesType, arrayName, maxSize, onChange }: TUploaderPhotos): import("react/jsx-runtime").JSX.Element;
|
@@ -7,7 +7,7 @@ import '../../assets/UploaderPhotos.css';const cls = {
|
|
7
7
|
};
|
8
8
|
function UploaderPhotos({
|
9
9
|
filesType,
|
10
|
-
|
10
|
+
arrayName,
|
11
11
|
maxSize,
|
12
12
|
onChange
|
13
13
|
}) {
|
@@ -33,7 +33,7 @@ function UploaderPhotos({
|
|
33
33
|
Uploader,
|
34
34
|
{
|
35
35
|
filesType,
|
36
|
-
|
36
|
+
arrayName,
|
37
37
|
maxSize,
|
38
38
|
onChangeValue
|
39
39
|
}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export { UploaderPhotos } from './UploaderPhotos';
|
2
|
-
export type {
|
2
|
+
export type { TUploaderPhotos, TOnChangePhotosUpdate } from './UploaderPhotos';
|
@@ -20,7 +20,9 @@ export { EDrawerPosition } from './Drawer';
|
|
20
20
|
export { Steps, EStepsPrimaryColor, EStepsSecondaryColor, EStepsSize, type TCommonStepsProps } from './Steps';
|
21
21
|
export { Vote, EVoteSize, type TCommonVoteProps } from './Vote';
|
22
22
|
export { SelectSearch, ESelectSearchSize } from './SelectSearch';
|
23
|
-
export type {
|
23
|
+
export type { TSelectSearchProps } from './SelectSearch';
|
24
|
+
export { SelectSearchOption } from './SelectSearchOption';
|
25
|
+
export type { SelectSearchOptionProps } from './SelectSearchOption';
|
24
26
|
export { Switch } from './Switch';
|
25
27
|
export type { TSwitchProps } from './Switch';
|
26
28
|
export { Tag, ETagSize, ETagType } from './Tag';
|
@@ -30,3 +32,8 @@ export type { TAccordionProps, TAccordionItemProps } from './Accordion';
|
|
30
32
|
export { TabTrail, ETabTrailSize } from './TabTrail';
|
31
33
|
export type { TTabTrailProps, TCategoryTab } from './TabTrail';
|
32
34
|
export { Pagination } from './Pagination';
|
35
|
+
export { ToastProvider, useToast, EToastPosition, EToastVariant } from './Toasts';
|
36
|
+
export { UploaderPhotos } from './UploaderPhotos';
|
37
|
+
export type { TUploaderPhotos, TOnChangePhotosUpdate } from './UploaderPhotos';
|
38
|
+
export { Uploader } from './Uploader';
|
39
|
+
export type { TUploadValue, TFileItem } from './Uploader';
|
package/dist/components/index.js
CHANGED
@@ -21,6 +21,7 @@ import { Vote } from "./Vote/Vote.js";
|
|
21
21
|
import { EVoteSize } from "./Vote/constants.js";
|
22
22
|
import { SelectSearch } from "./SelectSearch/SelectSearch.js";
|
23
23
|
import { ESelectSearchSize } from "./SelectSearch/constants.js";
|
24
|
+
import { S } from "../SelectSearchOption-snHM9uZX.js";
|
24
25
|
import { Switch } from "./Switch/Switch.js";
|
25
26
|
import { Tag } from "./Tag/Tag.js";
|
26
27
|
import { ETagSize, ETagType } from "./Tag/constants.js";
|
@@ -31,6 +32,11 @@ import { AccordionItem } from "./Accordion/AccordionItem/AccordionItem.js";
|
|
31
32
|
import { TabTrail } from "./TabTrail/TabTrail.js";
|
32
33
|
import { ETabTrailSize } from "./TabTrail/constants.js";
|
33
34
|
import { Pagination } from "./Pagination/Pagination.js";
|
35
|
+
import { ToastProvider } from "./Toasts/ToastsProvider.js";
|
36
|
+
import { useToast } from "./Toasts/hooks.js";
|
37
|
+
import { EToastPosition, EToastVariant } from "./Toasts/constants.js";
|
38
|
+
import { UploaderPhotos } from "./UploaderPhotos/UploaderPhotos.js";
|
39
|
+
import { Uploader } from "./Uploader/Uploader.js";
|
34
40
|
export {
|
35
41
|
Accordion,
|
36
42
|
AccordionItem,
|
@@ -54,6 +60,8 @@ export {
|
|
54
60
|
ETabTrailSize,
|
55
61
|
ETagSize,
|
56
62
|
ETagType,
|
63
|
+
EToastPosition,
|
64
|
+
EToastVariant,
|
57
65
|
EVoteSize,
|
58
66
|
AppImage as Image,
|
59
67
|
Input,
|
@@ -65,13 +73,18 @@ export {
|
|
65
73
|
Pagination,
|
66
74
|
RadioGroup,
|
67
75
|
SelectSearch,
|
76
|
+
S as SelectSearchOption,
|
68
77
|
Slider,
|
69
78
|
Steps,
|
70
79
|
Switch,
|
71
80
|
TabTrail,
|
72
81
|
Tag,
|
73
82
|
Timer,
|
83
|
+
ToastProvider,
|
84
|
+
Uploader,
|
85
|
+
UploaderPhotos,
|
74
86
|
Vote,
|
75
87
|
getMaskedInputPhoneValue,
|
76
|
-
getUnmaskedInputValue
|
88
|
+
getUnmaskedInputValue,
|
89
|
+
useToast
|
77
90
|
};
|
package/dist/hooks/index.d.ts
CHANGED
package/dist/hooks/index.js
CHANGED
@@ -3,8 +3,10 @@ import { EMediaQuery } from "./useMediaQuery/constants.js";
|
|
3
3
|
import { useLockBodyScroll } from "./useLockBodyScroll/useLockBodyScroll.js";
|
4
4
|
import { useInterval } from "./useInterval/useInterval.js";
|
5
5
|
import { useTimer } from "./useTimer/index.js";
|
6
|
+
import { useCopyToClipboard } from "./useCopyToClipboard/useCopyToClipboard.js";
|
6
7
|
export {
|
7
8
|
EMediaQuery,
|
9
|
+
useCopyToClipboard,
|
8
10
|
useInterval,
|
9
11
|
useLockBodyScroll,
|
10
12
|
useMediaQuery,
|
@@ -0,0 +1 @@
|
|
1
|
+
export { useCopyToClipboard } from './useCopyToClipboard';
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { useState, useCallback } from "react";
|
2
|
+
function useCopyToClipboard() {
|
3
|
+
const [copiedText, setCopiedText] = useState(null);
|
4
|
+
const copy = useCallback(async (text) => {
|
5
|
+
if (!(navigator == null ? void 0 : navigator.clipboard)) {
|
6
|
+
console.warn("Clipboard not supported");
|
7
|
+
return false;
|
8
|
+
}
|
9
|
+
try {
|
10
|
+
await navigator.clipboard.writeText(text);
|
11
|
+
setCopiedText(text);
|
12
|
+
return true;
|
13
|
+
} catch (error) {
|
14
|
+
console.warn("Copy failed", error);
|
15
|
+
setCopiedText(null);
|
16
|
+
return false;
|
17
|
+
}
|
18
|
+
}, []);
|
19
|
+
return [copiedText, copy];
|
20
|
+
}
|
21
|
+
export {
|
22
|
+
useCopyToClipboard
|
23
|
+
};
|
@@ -6,8 +6,8 @@ export type TUseTimerProps = {
|
|
6
6
|
};
|
7
7
|
export declare function useTimer({ expiryTimestamp: expiry, onExpire, autoStart }: TUseTimerProps): {
|
8
8
|
start: () => void;
|
9
|
-
pause: () => void;
|
10
|
-
resume: () => void;
|
9
|
+
pause: (cb?: VoidFunction) => void;
|
10
|
+
resume: (cb?: VoidFunction) => void;
|
11
11
|
restart: (newExpiryTimestamp: number, newAutoStart?: boolean) => void;
|
12
12
|
isRunning: boolean;
|
13
13
|
totalSeconds: number;
|
@@ -27,8 +27,11 @@ function useTimer({
|
|
27
27
|
setIsRunning(false);
|
28
28
|
setDelay(null);
|
29
29
|
}, [onExpire]);
|
30
|
-
const pause = useCallback(() => {
|
31
|
-
setIsRunning(
|
30
|
+
const pause = useCallback((cb) => {
|
31
|
+
setIsRunning(() => {
|
32
|
+
cb == null ? void 0 : cb();
|
33
|
+
return false;
|
34
|
+
});
|
32
35
|
}, []);
|
33
36
|
const restart = useCallback(
|
34
37
|
(newExpiryTimestamp, newAutoStart = true) => {
|
@@ -40,11 +43,15 @@ function useTimer({
|
|
40
43
|
},
|
41
44
|
[]
|
42
45
|
);
|
43
|
-
const resume = useCallback(
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
46
|
+
const resume = useCallback(
|
47
|
+
(cb) => {
|
48
|
+
const time = /* @__PURE__ */ new Date();
|
49
|
+
time.setMilliseconds(time.getMilliseconds() + seconds * 1e3);
|
50
|
+
restart(time.getTime(), true);
|
51
|
+
cb == null ? void 0 : cb();
|
52
|
+
},
|
53
|
+
[seconds, restart]
|
54
|
+
);
|
48
55
|
const start = useCallback(() => {
|
49
56
|
if (didStart) {
|
50
57
|
setSeconds(Time.getSecondsFromExpiry(expiryTimestamp ?? 0, false));
|
package/dist/index.js
CHANGED
@@ -21,6 +21,7 @@ import { Vote } from "./components/Vote/Vote.js";
|
|
21
21
|
import { EVoteSize } from "./components/Vote/constants.js";
|
22
22
|
import { SelectSearch } from "./components/SelectSearch/SelectSearch.js";
|
23
23
|
import { ESelectSearchSize } from "./components/SelectSearch/constants.js";
|
24
|
+
import { S } from "./SelectSearchOption-snHM9uZX.js";
|
24
25
|
import { Switch } from "./components/Switch/Switch.js";
|
25
26
|
import { Tag } from "./components/Tag/Tag.js";
|
26
27
|
import { ETagSize, ETagType } from "./components/Tag/constants.js";
|
@@ -31,11 +32,17 @@ import { AccordionItem } from "./components/Accordion/AccordionItem/AccordionIte
|
|
31
32
|
import { TabTrail } from "./components/TabTrail/TabTrail.js";
|
32
33
|
import { ETabTrailSize } from "./components/TabTrail/constants.js";
|
33
34
|
import { Pagination } from "./components/Pagination/Pagination.js";
|
35
|
+
import { ToastProvider } from "./components/Toasts/ToastsProvider.js";
|
36
|
+
import { useToast } from "./components/Toasts/hooks.js";
|
37
|
+
import { EToastPosition, EToastVariant } from "./components/Toasts/constants.js";
|
38
|
+
import { UploaderPhotos } from "./components/UploaderPhotos/UploaderPhotos.js";
|
39
|
+
import { Uploader } from "./components/Uploader/Uploader.js";
|
34
40
|
import { useMediaQuery } from "./hooks/useMediaQuery/useMediaQuery.js";
|
35
41
|
import { EMediaQuery } from "./hooks/useMediaQuery/constants.js";
|
36
42
|
import { useLockBodyScroll } from "./hooks/useLockBodyScroll/useLockBodyScroll.js";
|
37
43
|
import { useInterval } from "./hooks/useInterval/useInterval.js";
|
38
44
|
import { useTimer } from "./hooks/useTimer/index.js";
|
45
|
+
import { useCopyToClipboard } from "./hooks/useCopyToClipboard/useCopyToClipboard.js";
|
39
46
|
import { Icon } from "./icons/Icon.js";
|
40
47
|
import { formating } from "./utils/index.js";
|
41
48
|
import './assets/index.css';export {
|
@@ -62,6 +69,8 @@ import './assets/index.css';export {
|
|
62
69
|
ETabTrailSize,
|
63
70
|
ETagSize,
|
64
71
|
ETagType,
|
72
|
+
EToastPosition,
|
73
|
+
EToastVariant,
|
65
74
|
EVoteSize,
|
66
75
|
Icon,
|
67
76
|
AppImage as Image,
|
@@ -74,18 +83,24 @@ import './assets/index.css';export {
|
|
74
83
|
Pagination,
|
75
84
|
RadioGroup,
|
76
85
|
SelectSearch,
|
86
|
+
S as SelectSearchOption,
|
77
87
|
Slider,
|
78
88
|
Steps,
|
79
89
|
Switch,
|
80
90
|
TabTrail,
|
81
91
|
Tag,
|
82
92
|
Timer,
|
93
|
+
ToastProvider,
|
94
|
+
Uploader,
|
95
|
+
UploaderPhotos,
|
83
96
|
Vote,
|
84
97
|
formating,
|
85
98
|
getMaskedInputPhoneValue,
|
86
99
|
getUnmaskedInputValue,
|
100
|
+
useCopyToClipboard,
|
87
101
|
useInterval,
|
88
102
|
useLockBodyScroll,
|
89
103
|
useMediaQuery,
|
90
|
-
useTimer
|
104
|
+
useTimer,
|
105
|
+
useToast
|
91
106
|
};
|
package/package.json
CHANGED
@@ -1,128 +1,127 @@
|
|
1
|
-
{
|
2
|
-
"name": "mimir-ui-kit",
|
3
|
-
"private": false,
|
4
|
-
"version": "1.
|
5
|
-
"type": "module",
|
6
|
-
"exports": {
|
7
|
-
".": {
|
8
|
-
"types": "./dist/index.d.ts",
|
9
|
-
"default": "./dist/index.js"
|
10
|
-
},
|
11
|
-
"./components": {
|
12
|
-
"types": "./dist/components/index.d.ts",
|
13
|
-
"default": "./dist/components/index.js"
|
14
|
-
},
|
15
|
-
"./hooks": {
|
16
|
-
"types": "./dist/hooks/index.d.ts",
|
17
|
-
"default": "./dist/hooks/index.js"
|
18
|
-
},
|
19
|
-
"./icons": {
|
20
|
-
"types": "./dist/icons/index.d.ts",
|
21
|
-
"default": "./dist/icons/index.js"
|
22
|
-
},
|
23
|
-
"./styles": {
|
24
|
-
"default": "./dist/assets/index.css"
|
25
|
-
}
|
26
|
-
},
|
27
|
-
"module": "./dist/index.js",
|
28
|
-
"types": "./dist/index.d.ts",
|
29
|
-
"files": [
|
30
|
-
"dist"
|
31
|
-
],
|
32
|
-
"sideEffects": [
|
33
|
-
"**/*.{css,scss}"
|
34
|
-
],
|
35
|
-
"scripts": {
|
36
|
-
"build": "tsc --p ./tsconfig-build.json && vite build",
|
37
|
-
"storybook": "storybook dev -p 6006",
|
38
|
-
"build-storybook": "storybook build",
|
39
|
-
"ts:check": "tsc -b",
|
40
|
-
"lint:fix": "eslint . --ext ts,tsx --fix",
|
41
|
-
"lint:prettier": "npx prettier . --write",
|
42
|
-
"lint:stylelint": "stylelint '**/*.module{.css,.scss}'",
|
43
|
-
"lint:stylelint:fix": "stylelint '**/*.module{.css,.scss}' --fix",
|
44
|
-
"icons": "svgr --expand-props start ./src/icons/svgs",
|
45
|
-
"prepare": "husky",
|
46
|
-
"create-component": "node createComponent.js"
|
47
|
-
},
|
48
|
-
"devDependencies": {
|
49
|
-
"@chromatic-com/storybook": "^1.6.1",
|
50
|
-
"@headlessui/react": "^2.1.2",
|
51
|
-
"@laynezh/vite-plugin-lib-assets": "^0.5.23",
|
52
|
-
"@loadable/component": "^5.15.2",
|
53
|
-
"@storybook/addon-essentials": "^8.2.2",
|
54
|
-
"@storybook/addon-interactions": "^8.2.2",
|
55
|
-
"@storybook/addon-links": "^8.2.2",
|
56
|
-
"@storybook/addon-onboarding": "^8.2.2",
|
57
|
-
"@storybook/blocks": "^8.2.2",
|
58
|
-
"@storybook/builder-vite": "^8.2.2",
|
59
|
-
"@storybook/react": "^8.2.2",
|
60
|
-
"@storybook/react-vite": "^8.2.2",
|
61
|
-
"@storybook/test": "^8.2.2",
|
62
|
-
"@svgr/cli": "^8.1.0",
|
63
|
-
"@svgr/core": "^8.1.0",
|
64
|
-
"@svgr/plugin-svgo": "^8.1.0",
|
65
|
-
"@types/node": "^20.14.10",
|
66
|
-
"@types/react": "^18.3.3",
|
67
|
-
"@types/react-dom": "^18.3.0",
|
68
|
-
"@
|
69
|
-
"@typescript-eslint/
|
70
|
-
"@
|
71
|
-
"
|
72
|
-
"
|
73
|
-
"
|
74
|
-
"
|
75
|
-
"
|
76
|
-
"eslint
|
77
|
-
"eslint-
|
78
|
-
"eslint-plugin-
|
79
|
-
"eslint-plugin-react-
|
80
|
-
"eslint-plugin-
|
81
|
-
"
|
82
|
-
"
|
83
|
-
"
|
84
|
-
"
|
85
|
-
"
|
86
|
-
"
|
87
|
-
"
|
88
|
-
"react
|
89
|
-
"
|
90
|
-
"
|
91
|
-
"
|
92
|
-
"stylelint
|
93
|
-
"stylelint-config-
|
94
|
-
"stylelint-config-
|
95
|
-
"stylelint-
|
96
|
-
"stylelint-
|
97
|
-
"stylelint-
|
98
|
-
"
|
99
|
-
"
|
100
|
-
"
|
101
|
-
"vite
|
102
|
-
"vite-plugin-
|
103
|
-
"vite-plugin-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
"react": "^
|
108
|
-
"react
|
109
|
-
|
110
|
-
|
111
|
-
"
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
"
|
122
|
-
]
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
}
|
1
|
+
{
|
2
|
+
"name": "mimir-ui-kit",
|
3
|
+
"private": false,
|
4
|
+
"version": "1.15.0",
|
5
|
+
"type": "module",
|
6
|
+
"exports": {
|
7
|
+
".": {
|
8
|
+
"types": "./dist/index.d.ts",
|
9
|
+
"default": "./dist/index.js"
|
10
|
+
},
|
11
|
+
"./components": {
|
12
|
+
"types": "./dist/components/index.d.ts",
|
13
|
+
"default": "./dist/components/index.js"
|
14
|
+
},
|
15
|
+
"./hooks": {
|
16
|
+
"types": "./dist/hooks/index.d.ts",
|
17
|
+
"default": "./dist/hooks/index.js"
|
18
|
+
},
|
19
|
+
"./icons": {
|
20
|
+
"types": "./dist/icons/index.d.ts",
|
21
|
+
"default": "./dist/icons/index.js"
|
22
|
+
},
|
23
|
+
"./styles": {
|
24
|
+
"default": "./dist/assets/index.css"
|
25
|
+
}
|
26
|
+
},
|
27
|
+
"module": "./dist/index.js",
|
28
|
+
"types": "./dist/index.d.ts",
|
29
|
+
"files": [
|
30
|
+
"dist"
|
31
|
+
],
|
32
|
+
"sideEffects": [
|
33
|
+
"**/*.{css,scss}"
|
34
|
+
],
|
35
|
+
"scripts": {
|
36
|
+
"build": "tsc --p ./tsconfig-build.json && vite build",
|
37
|
+
"storybook": "storybook dev -p 6006",
|
38
|
+
"build-storybook": "storybook build",
|
39
|
+
"ts:check": "tsc -b",
|
40
|
+
"lint:fix": "eslint . --ext ts,tsx --fix",
|
41
|
+
"lint:prettier": "npx prettier . --write",
|
42
|
+
"lint:stylelint": "stylelint '**/*.module{.css,.scss}'",
|
43
|
+
"lint:stylelint:fix": "stylelint '**/*.module{.css,.scss}' --fix",
|
44
|
+
"icons": "svgr --expand-props start ./src/icons/svgs",
|
45
|
+
"prepare": "husky",
|
46
|
+
"create-component": "node createComponent.js"
|
47
|
+
},
|
48
|
+
"devDependencies": {
|
49
|
+
"@chromatic-com/storybook": "^1.6.1",
|
50
|
+
"@headlessui/react": "^2.1.2",
|
51
|
+
"@laynezh/vite-plugin-lib-assets": "^0.5.23",
|
52
|
+
"@loadable/component": "^5.15.2",
|
53
|
+
"@storybook/addon-essentials": "^8.2.2",
|
54
|
+
"@storybook/addon-interactions": "^8.2.2",
|
55
|
+
"@storybook/addon-links": "^8.2.2",
|
56
|
+
"@storybook/addon-onboarding": "^8.2.2",
|
57
|
+
"@storybook/blocks": "^8.2.2",
|
58
|
+
"@storybook/builder-vite": "^8.2.2",
|
59
|
+
"@storybook/react": "^8.2.2",
|
60
|
+
"@storybook/react-vite": "^8.2.2",
|
61
|
+
"@storybook/test": "^8.2.2",
|
62
|
+
"@svgr/cli": "^8.1.0",
|
63
|
+
"@svgr/core": "^8.1.0",
|
64
|
+
"@svgr/plugin-svgo": "^8.1.0",
|
65
|
+
"@types/node": "^20.14.10",
|
66
|
+
"@types/react": "^18.3.3",
|
67
|
+
"@types/react-dom": "^18.3.0",
|
68
|
+
"@types/react-window": "^1.8.8",
|
69
|
+
"@typescript-eslint/eslint-plugin": "^7.13.1",
|
70
|
+
"@typescript-eslint/parser": "^7.13.1",
|
71
|
+
"@vitejs/plugin-react": "^4.3.1",
|
72
|
+
"autoprefixer": "^10.4.19",
|
73
|
+
"chalk": "4.1.2",
|
74
|
+
"classnames": "^2.5.1",
|
75
|
+
"dotenv": "^16.4.5",
|
76
|
+
"eslint": "^8.57.0",
|
77
|
+
"eslint-config-prettier": "^9.1.0",
|
78
|
+
"eslint-plugin-import": "^2.29.1",
|
79
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
80
|
+
"eslint-plugin-react-refresh": "^0.4.7",
|
81
|
+
"eslint-plugin-storybook": "^0.8.0",
|
82
|
+
"glob": "10.3.10",
|
83
|
+
"husky": "^9.0.11",
|
84
|
+
"lint-staged": "^15.2.7",
|
85
|
+
"p-limit": "^6.1.0",
|
86
|
+
"postcss-preset-env": "^9.6.0",
|
87
|
+
"prettier": "^3.3.3",
|
88
|
+
"react": "^18.3.1",
|
89
|
+
"react-dom": "^18.3.1",
|
90
|
+
"sass": "^1.77.7",
|
91
|
+
"storybook": "^8.2.2",
|
92
|
+
"stylelint": "^16.7.0",
|
93
|
+
"stylelint-config-idiomatic-order": "^10.0.0",
|
94
|
+
"stylelint-config-rational-order": "^0.1.2",
|
95
|
+
"stylelint-config-standard": "^36.0.1",
|
96
|
+
"stylelint-order": "^6.0.4",
|
97
|
+
"stylelint-prettier": "^5.0.0",
|
98
|
+
"stylelint-scss": "^6.4.0",
|
99
|
+
"superagent": "^9.0.2",
|
100
|
+
"typescript": "^5.2.2",
|
101
|
+
"vite": "^5.3.1",
|
102
|
+
"vite-plugin-dts": "^3.9.1",
|
103
|
+
"vite-plugin-lib-inject-css": "^2.1.1",
|
104
|
+
"vite-plugin-svgr": "^4.2.0"
|
105
|
+
},
|
106
|
+
"peerDependencies": {
|
107
|
+
"@headlessui/react": "^2.1.2",
|
108
|
+
"react": "^18.3.1",
|
109
|
+
"react-dom": "^18.3.1",
|
110
|
+
"swiper": "^11.1.5",
|
111
|
+
"react-window": "^1.8.10"
|
112
|
+
},
|
113
|
+
"husky": {
|
114
|
+
"hooks": {
|
115
|
+
"pre-commit": "lint-staged"
|
116
|
+
}
|
117
|
+
},
|
118
|
+
"lint-staged": {
|
119
|
+
"**/*.{ts,tsx}": [
|
120
|
+
"eslint --ignore-path .eslintignore",
|
121
|
+
"prettier --write"
|
122
|
+
],
|
123
|
+
"**/*.{css,scss}": [
|
124
|
+
"stylelint --fix --formatter verbose"
|
125
|
+
]
|
126
|
+
}
|
127
|
+
}
|