mimir-ui-kit 1.15.2 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Input-BFFPzelg.js +228 -0
- package/dist/{ProgressBar-BekX41HR.js → ProgressBar-CwLwhaeM.js} +23 -23
- package/dist/assets/Accordion.css +1 -1
- package/dist/assets/AnchorLink.css +1 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/OtpInput.css +1 -1
- package/dist/assets/ProgressBar2.css +1 -1
- package/dist/assets/TextArea.css +1 -0
- package/dist/components/Accordion/Accordion.d.ts +2 -1
- package/dist/components/Accordion/Accordion.js +79 -38
- package/dist/components/Accordion/constants.d.ts +9 -1
- package/dist/components/Accordion/constants.js +18 -6
- package/dist/components/AnchorLink/AnchorLink.d.ts +13 -0
- package/dist/components/AnchorLink/AnchorLink.js +69 -0
- package/dist/components/AnchorLink/constants.d.ts +10 -0
- package/dist/components/AnchorLink/constants.js +16 -0
- package/dist/components/AnchorLink/index.d.ts +2 -0
- package/dist/components/AnchorLink/index.js +7 -0
- package/dist/components/DatePicker/DatePicker.d.ts +1 -9
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Input/Input.d.ts +11 -27
- package/dist/components/Input/Input.js +9 -120
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Input/index.js +2 -2
- package/dist/components/Input/types.d.ts +11 -0
- package/dist/components/InputPassword/InputPassword.d.ts +1 -9
- package/dist/components/InputPassword/InputPassword.js +1 -1
- package/dist/components/InputPhoneNumber/InputPhoneNumber.d.ts +1 -9
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/OtpInput/OtpInput.js +5 -5
- package/dist/components/SelectSearch/SelectSearch.js +1 -1
- package/dist/components/TextArea/TextArea.d.ts +5 -0
- package/dist/components/TextArea/TextArea.js +209 -0
- package/dist/components/TextArea/hooks.d.ts +1 -0
- package/dist/components/TextArea/hooks.js +13 -0
- package/dist/components/TextArea/index.d.ts +1 -0
- package/dist/components/TextArea/index.js +4 -0
- package/dist/components/TextArea/types.d.ts +3 -0
- package/dist/components/TextArea/types.js +1 -0
- package/dist/components/Toasts/ProgressBar.js +1 -1
- package/dist/components/Toasts/Toast.js +1 -1
- package/dist/components/Toasts/ToastList.js +1 -1
- package/dist/components/Toasts/ToastsProvider.js +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +9 -2
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/useMergeRefs/index.d.ts +1 -0
- package/dist/hooks/useMergeRefs/index.js +4 -0
- package/dist/hooks/useMergeRefs/useMergeRefs.d.ts +4 -0
- package/dist/hooks/useMergeRefs/useMergeRefs.js +28 -0
- package/dist/icons/Icon.d.ts +1 -2
- package/dist/icons/components/12px/Close12px.js +1 -1
- package/dist/icons/index.d.ts +1 -1
- package/dist/index.js +11 -2
- package/package.json +2 -3
@@ -0,0 +1 @@
|
|
1
|
+
export { TextArea, type TProps as TTextAreaProps } from './TextArea';
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
3
3
|
import { memo, useRef } from "react";
|
4
4
|
import { ANIMATION_VARIABLES_MAP, EToastPosition, EToastVariant, DEFAULT_TOAST_DURATION } from "./constants.js";
|
5
|
-
import { c as cls, P as ProgressBar } from "../../ProgressBar-
|
5
|
+
import { c as cls, P as ProgressBar } from "../../ProgressBar-CwLwhaeM.js";
|
6
6
|
import { useTimer } from "../../hooks/useTimer/index.js";
|
7
7
|
import { Button } from "../Button/Button.js";
|
8
8
|
const Toast = memo(
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
3
3
|
import { memo, useRef, useCallback, useEffect } from "react";
|
4
4
|
import { EToastPosition } from "./constants.js";
|
5
|
-
import { c as cls } from "../../ProgressBar-
|
5
|
+
import { c as cls } from "../../ProgressBar-CwLwhaeM.js";
|
6
6
|
import { Toast } from "./Toast.js";
|
7
7
|
const ToastList = memo(
|
8
8
|
({ toasts, position = EToastPosition.TOP_RIGHT, onToastRemove }) => {
|
@@ -3,7 +3,7 @@ import { useReducer, useCallback, useMemo } from "react";
|
|
3
3
|
import { EToastVariant } from "./constants.js";
|
4
4
|
import { ToastContext } from "./hooks.js";
|
5
5
|
import { reducer, initialState, actionCreators } from "./store.js";
|
6
|
-
import { c as cls } from "../../ProgressBar-
|
6
|
+
import { c as cls } from "../../ProgressBar-CwLwhaeM.js";
|
7
7
|
import { ToastList } from "./ToastList.js";
|
8
8
|
const ToastProvider = ({ children }) => {
|
9
9
|
const [toasts, dispatch] = useReducer(reducer, initialState);
|
@@ -1,6 +1,8 @@
|
|
1
1
|
export { Button, EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantRound, EButtonVariantOutline, type TButtonProps } from './Button';
|
2
2
|
export { Input, EInputSize, EInputVariant } from './Input';
|
3
3
|
export type { TInputProps, TSize, TVariant } from './Input';
|
4
|
+
export { TextArea } from './TextArea';
|
5
|
+
export type { TTextAreaProps } from './TextArea';
|
4
6
|
export { InputPassword } from './InputPassword';
|
5
7
|
export type { TInputPasswordProps } from './InputPassword';
|
6
8
|
export { InputPhoneNumber, getMaskedInputPhoneValue, getUnmaskedInputValue } from './InputPhoneNumber';
|
@@ -35,3 +37,4 @@ export { UploaderPhotos } from './UploaderPhotos';
|
|
35
37
|
export type { TUploaderPhotos, TOnChangePhotosUpdate } from './UploaderPhotos';
|
36
38
|
export { Uploader } from './Uploader';
|
37
39
|
export type { TUploadValue, TFileItem } from './Uploader';
|
40
|
+
export { ELinkSize, ELinkVariant, Link } from './AnchorLink';
|
package/dist/components/index.js
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import { Button } from "./Button/Button.js";
|
2
2
|
import { EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantOutline, EButtonVariantRound } from "./Button/constants.js";
|
3
|
-
import {
|
3
|
+
import { I } from "../Input-BFFPzelg.js";
|
4
4
|
import { EInputSize, EInputVariant } from "./Input/constants.js";
|
5
|
+
import { TextArea } from "./TextArea/TextArea.js";
|
5
6
|
import { InputPassword } from "./InputPassword/InputPassword.js";
|
6
7
|
import { InputPhoneNumber } from "./InputPhoneNumber/InputPhoneNumber.js";
|
7
8
|
import { getMaskedInputPhoneValue, getUnmaskedInputValue } from "./InputPhoneNumber/utils.js";
|
@@ -36,6 +37,8 @@ import { useToast } from "./Toasts/hooks.js";
|
|
36
37
|
import { EToastPosition, EToastVariant } from "./Toasts/constants.js";
|
37
38
|
import { UploaderPhotos } from "./UploaderPhotos/UploaderPhotos.js";
|
38
39
|
import { Uploader } from "./Uploader/Uploader.js";
|
40
|
+
import { Link } from "./AnchorLink/AnchorLink.js";
|
41
|
+
import { ELinkSize, ELinkVariant } from "./AnchorLink/constants.js";
|
39
42
|
export {
|
40
43
|
Accordion,
|
41
44
|
AccordionItem,
|
@@ -51,6 +54,8 @@ export {
|
|
51
54
|
EDrawerPosition,
|
52
55
|
EInputSize,
|
53
56
|
EInputVariant,
|
57
|
+
ELinkSize,
|
58
|
+
ELinkVariant,
|
54
59
|
EMergedButtonVariantRound,
|
55
60
|
ESelectSearchSize,
|
56
61
|
EStepsPrimaryColor,
|
@@ -63,9 +68,10 @@ export {
|
|
63
68
|
EToastVariant,
|
64
69
|
EVoteSize,
|
65
70
|
AppImage as Image,
|
66
|
-
Input,
|
71
|
+
I as Input,
|
67
72
|
InputPassword,
|
68
73
|
InputPhoneNumber,
|
74
|
+
Link,
|
69
75
|
Loader,
|
70
76
|
MergedButton,
|
71
77
|
OtpInput,
|
@@ -77,6 +83,7 @@ export {
|
|
77
83
|
Switch,
|
78
84
|
TabTrail,
|
79
85
|
Tag,
|
86
|
+
TextArea,
|
80
87
|
Timer,
|
81
88
|
ToastProvider,
|
82
89
|
Uploader,
|
package/dist/hooks/index.d.ts
CHANGED
package/dist/hooks/index.js
CHANGED
@@ -4,6 +4,7 @@ import { useLockBodyScroll } from "./useLockBodyScroll/useLockBodyScroll.js";
|
|
4
4
|
import { useInterval } from "./useInterval/useInterval.js";
|
5
5
|
import { useTimer } from "./useTimer/index.js";
|
6
6
|
import { useCopyToClipboard } from "./useCopyToClipboard/useCopyToClipboard.js";
|
7
|
+
import { useMergeRefs } from "./useMergeRefs/useMergeRefs.js";
|
7
8
|
export {
|
8
9
|
EMediaQuery,
|
9
10
|
EMinMediaQuery,
|
@@ -11,5 +12,6 @@ export {
|
|
11
12
|
useInterval,
|
12
13
|
useLockBodyScroll,
|
13
14
|
useMediaQuery,
|
15
|
+
useMergeRefs,
|
14
16
|
useTimer
|
15
17
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { useMergeRefs } from './useMergeRefs';
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export type ReactRef<T> = React.RefCallback<T> | React.MutableRefObject<T>;
|
2
|
+
export declare function assignRef<T = unknown>(ref: ReactRef<T> | null | undefined, value: T): void;
|
3
|
+
export declare function mergeRefs<T>(...refs: (ReactRef<T> | null | undefined)[]): (node: T | null) => void;
|
4
|
+
export declare function useMergeRefs<T>(...refs: (ReactRef<T> | null | undefined)[]): (node: T | null) => void;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { useMemo } from "react";
|
2
|
+
function assignRef(ref, value) {
|
3
|
+
if (ref == null) return;
|
4
|
+
if (typeof ref === "function") {
|
5
|
+
ref(value);
|
6
|
+
return;
|
7
|
+
}
|
8
|
+
try {
|
9
|
+
ref.current = value;
|
10
|
+
} catch (error) {
|
11
|
+
throw new Error(`Cannot assign value '${value}' to ref '${ref}'`);
|
12
|
+
}
|
13
|
+
}
|
14
|
+
function mergeRefs(...refs) {
|
15
|
+
return (node) => {
|
16
|
+
refs.forEach((ref) => {
|
17
|
+
assignRef(ref, node);
|
18
|
+
});
|
19
|
+
};
|
20
|
+
}
|
21
|
+
function useMergeRefs(...refs) {
|
22
|
+
return useMemo(() => mergeRefs(...refs), refs);
|
23
|
+
}
|
24
|
+
export {
|
25
|
+
assignRef,
|
26
|
+
mergeRefs,
|
27
|
+
useMergeRefs
|
28
|
+
};
|
package/dist/icons/Icon.d.ts
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
import { SVGProps } from 'react';
|
2
2
|
import { TIcon } from './components/types';
|
3
3
|
|
4
|
-
type TProps = Omit<SVGProps<SVGSVGElement>, 'ref'> & {
|
4
|
+
export type TProps = Omit<SVGProps<SVGSVGElement>, 'ref'> & {
|
5
5
|
iconName: TIcon;
|
6
6
|
};
|
7
7
|
export declare const Icon: ({ iconName, ...props }: TProps) => import("react/jsx-runtime").JSX.Element | null;
|
8
|
-
export {};
|
@@ -9,7 +9,7 @@ const Close12px = (props) => {
|
|
9
9
|
fill: "none",
|
10
10
|
xmlns: "http://www.w3.org/2000/svg",
|
11
11
|
...props,
|
12
|
-
children: /* @__PURE__ */ jsx("path", { d: "M3 9L8.99991 3M9 9L3 3", stroke: "#333333",
|
12
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3 9L8.99991 3M9 9L3 3", stroke: "#333333", strokeWidth: "1.5" })
|
13
13
|
}
|
14
14
|
);
|
15
15
|
};
|
package/dist/icons/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export { Icon } from './Icon';
|
1
|
+
export { Icon, type TProps as TIconProps } from './Icon';
|
2
2
|
export type { TIcon } from './components/types';
|
package/dist/index.js
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import { Button } from "./components/Button/Button.js";
|
2
2
|
import { EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantOutline, EButtonVariantRound } from "./components/Button/constants.js";
|
3
|
-
import {
|
3
|
+
import { I } from "./Input-BFFPzelg.js";
|
4
4
|
import { EInputSize, EInputVariant } from "./components/Input/constants.js";
|
5
|
+
import { TextArea } from "./components/TextArea/TextArea.js";
|
5
6
|
import { InputPassword } from "./components/InputPassword/InputPassword.js";
|
6
7
|
import { InputPhoneNumber } from "./components/InputPhoneNumber/InputPhoneNumber.js";
|
7
8
|
import { getMaskedInputPhoneValue, getUnmaskedInputValue } from "./components/InputPhoneNumber/utils.js";
|
@@ -36,12 +37,15 @@ import { useToast } from "./components/Toasts/hooks.js";
|
|
36
37
|
import { EToastPosition, EToastVariant } from "./components/Toasts/constants.js";
|
37
38
|
import { UploaderPhotos } from "./components/UploaderPhotos/UploaderPhotos.js";
|
38
39
|
import { Uploader } from "./components/Uploader/Uploader.js";
|
40
|
+
import { Link } from "./components/AnchorLink/AnchorLink.js";
|
41
|
+
import { ELinkSize, ELinkVariant } from "./components/AnchorLink/constants.js";
|
39
42
|
import { useMediaQuery } from "./hooks/useMediaQuery/useMediaQuery.js";
|
40
43
|
import { EMediaQuery, EMinMediaQuery } from "./hooks/useMediaQuery/constants.js";
|
41
44
|
import { useLockBodyScroll } from "./hooks/useLockBodyScroll/useLockBodyScroll.js";
|
42
45
|
import { useInterval } from "./hooks/useInterval/useInterval.js";
|
43
46
|
import { useTimer } from "./hooks/useTimer/index.js";
|
44
47
|
import { useCopyToClipboard } from "./hooks/useCopyToClipboard/useCopyToClipboard.js";
|
48
|
+
import { useMergeRefs } from "./hooks/useMergeRefs/useMergeRefs.js";
|
45
49
|
import { Icon } from "./icons/Icon.js";
|
46
50
|
import { formating } from "./utils/index.js";
|
47
51
|
import './assets/index.css';export {
|
@@ -59,6 +63,8 @@ import './assets/index.css';export {
|
|
59
63
|
EDrawerPosition,
|
60
64
|
EInputSize,
|
61
65
|
EInputVariant,
|
66
|
+
ELinkSize,
|
67
|
+
ELinkVariant,
|
62
68
|
EMediaQuery,
|
63
69
|
EMergedButtonVariantRound,
|
64
70
|
EMinMediaQuery,
|
@@ -74,9 +80,10 @@ import './assets/index.css';export {
|
|
74
80
|
EVoteSize,
|
75
81
|
Icon,
|
76
82
|
AppImage as Image,
|
77
|
-
Input,
|
83
|
+
I as Input,
|
78
84
|
InputPassword,
|
79
85
|
InputPhoneNumber,
|
86
|
+
Link,
|
80
87
|
Loader,
|
81
88
|
MergedButton,
|
82
89
|
OtpInput,
|
@@ -88,6 +95,7 @@ import './assets/index.css';export {
|
|
88
95
|
Switch,
|
89
96
|
TabTrail,
|
90
97
|
Tag,
|
98
|
+
TextArea,
|
91
99
|
Timer,
|
92
100
|
ToastProvider,
|
93
101
|
Uploader,
|
@@ -100,6 +108,7 @@ import './assets/index.css';export {
|
|
100
108
|
useInterval,
|
101
109
|
useLockBodyScroll,
|
102
110
|
useMediaQuery,
|
111
|
+
useMergeRefs,
|
103
112
|
useTimer,
|
104
113
|
useToast
|
105
114
|
};
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "mimir-ui-kit",
|
3
3
|
"private": false,
|
4
|
-
"version": "1.
|
4
|
+
"version": "1.17.0",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
7
7
|
".": {
|
@@ -107,8 +107,7 @@
|
|
107
107
|
"@headlessui/react": "^2.1.2",
|
108
108
|
"react": "^18.3.1",
|
109
109
|
"react-dom": "^18.3.1",
|
110
|
-
"swiper": "^11.1.5"
|
111
|
-
"react-window": "^1.8.10"
|
110
|
+
"swiper": "^11.1.5"
|
112
111
|
},
|
113
112
|
"husky": {
|
114
113
|
"hooks": {
|