mimir-ui-kit 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/{NavigationButtons-B8tMfqrg.js → NavigationButtons-cTsXB7GS.js} +18 -18
- package/dist/assets/Button.css +1 -1
- package/dist/assets/OtpInput.css +1 -1
- package/dist/assets/RadioGroup.css +1 -1
- package/dist/assets/SelectSearch.css +1 -0
- package/dist/assets/Slider.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/components/Button/Button.d.ts +1 -0
- package/dist/components/Button/Button.js +24 -24
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/InputPassword/InputPassword.js +2 -2
- package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
- package/dist/components/MergedButton/MergedButton.d.ts +1 -1
- package/dist/components/MergedButton/MergedButton.js +2 -2
- package/dist/components/OtpInput/OtpInput.js +6 -6
- package/dist/components/RadioGroup/RadioGroup.js +78 -1019
- package/dist/components/SelectSearch/SelectSearch.d.ts +21 -0
- package/dist/components/SelectSearch/SelectSearch.js +3989 -0
- package/dist/components/SelectSearch/constants.d.ts +4 -0
- package/dist/components/SelectSearch/constants.js +8 -0
- package/dist/components/SelectSearch/index.d.ts +2 -0
- package/dist/components/SelectSearch/index.js +6 -0
- package/dist/components/SelectSearch/types.d.ts +17 -0
- package/dist/components/SelectSearch/types.js +1 -0
- package/dist/components/Slider/NavigationButtons/NavigationButtons.js +1 -1
- package/dist/components/Slider/NavigationButtons/index.js +1 -1
- package/dist/components/Slider/Slider.js +10 -10
- package/dist/components/Steps/Steps.d.ts +3 -3
- package/dist/components/Steps/Steps.js +9 -4
- package/dist/components/Steps/index.d.ts +3 -0
- package/dist/components/Steps/index.js +8 -0
- package/dist/components/Steps/types.d.ts +1 -1
- package/dist/components/Vote/Vote.d.ts +3 -3
- package/dist/components/Vote/index.d.ts +3 -0
- package/dist/components/Vote/index.js +6 -0
- package/dist/components/Vote/types.d.ts +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +10 -2
- package/dist/focus-management-4cCSLNHi.js +1000 -0
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.js +0 -2
- package/dist/index.js +10 -4
- package/package.json +1 -1
- package/dist/assets/Drawer.css +0 -1
- package/dist/components/Drawer/Drawer.d.ts +0 -38
- package/dist/components/Drawer/Drawer.js +0 -144
- package/dist/components/Drawer/constants.d.ts +0 -5
- package/dist/components/Drawer/constants.js +0 -9
- package/dist/components/Drawer/index.d.ts +0 -2
- package/dist/components/Drawer/index.js +0 -6
- package/dist/components/Portal/Portal.d.ts +0 -7
- package/dist/components/Portal/Portal.js +0 -10
- package/dist/components/Portal/index.d.ts +0 -1
- package/dist/components/Portal/index.js +0 -4
- package/dist/hooks/useLockBodyScroll/index.d.ts +0 -1
- package/dist/hooks/useLockBodyScroll/index.js +0 -4
- package/dist/hooks/useLockBodyScroll/useLockBodyScroll.d.ts +0 -6
- package/dist/hooks/useLockBodyScroll/useLockBodyScroll.js +0 -20
@@ -0,0 +1,17 @@
|
|
1
|
+
import { ESelectSearchSize } from './constants';
|
2
|
+
|
3
|
+
export type TSelectSearchItem = {
|
4
|
+
id: number;
|
5
|
+
name: string;
|
6
|
+
};
|
7
|
+
export type TSelectSearchProps = {
|
8
|
+
items: TSelectSearchItem[];
|
9
|
+
value?: TSelectSearchItem | null;
|
10
|
+
onChange?: (value: TSelectSearchItem | null) => void;
|
11
|
+
placeholder?: string;
|
12
|
+
size?: TSelectSearchSize;
|
13
|
+
full?: boolean;
|
14
|
+
};
|
15
|
+
export type TSelectSearchSize = {
|
16
|
+
size?: ESelectSearchSize;
|
17
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
2
|
-
import { useRef, useState, useCallback } from "react";
|
3
2
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
4
|
-
import {
|
3
|
+
import { useRef, useState, useCallback } from "react";
|
4
|
+
import { g as getDocument, S as Swiper, N as NavigationButtons, a as SwiperSlide } from "../../NavigationButtons-cTsXB7GS.js";
|
5
5
|
import { ProgressBar } from "./ProgressBar/ProgressBar.js";
|
6
6
|
import { AppImage } from "../Image/Image.js";
|
7
7
|
import '../../assets/Slider.css';function Autoplay(_ref) {
|
@@ -300,14 +300,14 @@ import '../../assets/Slider.css';function Autoplay(_ref) {
|
|
300
300
|
resume
|
301
301
|
});
|
302
302
|
}
|
303
|
-
const swiper = "
|
304
|
-
const slide = "
|
305
|
-
const link = "
|
306
|
-
const image = "
|
307
|
-
const navigation = "
|
308
|
-
const pagination = "
|
309
|
-
const slides = "
|
310
|
-
const separator = "
|
303
|
+
const swiper = "_swiper_n7qq2_3";
|
304
|
+
const slide = "_slide_n7qq2_9";
|
305
|
+
const link = "_link_n7qq2_16";
|
306
|
+
const image = "_image_n7qq2_22";
|
307
|
+
const navigation = "_navigation_n7qq2_29";
|
308
|
+
const pagination = "_pagination_n7qq2_39";
|
309
|
+
const slides = "_slides_n7qq2_54";
|
310
|
+
const separator = "_separator_n7qq2_60";
|
311
311
|
const cls = {
|
312
312
|
swiper,
|
313
313
|
slide,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { EStepsPrimaryColor, EStepsSecondaryColor } from './constants';
|
2
|
-
import {
|
2
|
+
import { TCommonStepsProps } from './types';
|
3
3
|
|
4
|
-
export type TProps =
|
4
|
+
export type TProps = TCommonStepsProps & {
|
5
5
|
/**
|
6
6
|
* Класс, применяемый к корневому элементу
|
7
7
|
*/
|
@@ -39,7 +39,7 @@ export type TProps = TCommonStepProps & {
|
|
39
39
|
*/
|
40
40
|
secondaryColor?: EStepsSecondaryColor;
|
41
41
|
};
|
42
|
-
export declare const Steps: import('react').ForwardRefExoticComponent<
|
42
|
+
export declare const Steps: import('react').ForwardRefExoticComponent<TCommonStepsProps & {
|
43
43
|
/**
|
44
44
|
* Класс, применяемый к корневому элементу
|
45
45
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
2
2
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
3
|
-
import { forwardRef, useId, useState, useEffect } from "react";
|
3
|
+
import { forwardRef, useId, useState, useRef, useEffect } from "react";
|
4
4
|
import { ZERO_STEP, EStepsSize, EStepsPrimaryColor, ID_SEPARATOR, EStepsColorType, StepSize, DIFF_BETWEEN_STEP_AND_INDEX } from "./constants.js";
|
5
5
|
import { Icon } from "../../icons/Icon.js";
|
6
6
|
import '../../assets/Steps.css';const container = "_container_j31xr_2";
|
@@ -46,16 +46,21 @@ const Steps = forwardRef(
|
|
46
46
|
const idPrefix = useId();
|
47
47
|
const [step2, setStep] = useState(current);
|
48
48
|
const [hoveredStep, setHoveredStep] = useState(null);
|
49
|
+
const stepWasChangedRef = useRef(null);
|
49
50
|
useEffect(() => {
|
50
51
|
setStep(current);
|
51
52
|
}, [current]);
|
52
|
-
useEffect(() => {
|
53
|
-
onClick && onClick(step2);
|
54
|
-
}, [onClick, step2]);
|
55
53
|
const handleClick = (idx) => {
|
56
54
|
const clickedStep = idx + DIFF_BETWEEN_STEP_AND_INDEX;
|
55
|
+
stepWasChangedRef.current = true;
|
57
56
|
setStep(clickedStep !== step2 ? clickedStep : ZERO_STEP);
|
58
57
|
};
|
58
|
+
useEffect(() => {
|
59
|
+
if (stepWasChangedRef.current === true) {
|
60
|
+
onClick && onClick(step2);
|
61
|
+
stepWasChangedRef.current = false;
|
62
|
+
}
|
63
|
+
}, [onClick, step2]);
|
59
64
|
const handleMouseEnter = (evt) => {
|
60
65
|
const hoveredIdx = Number(evt.currentTarget.id.split(ID_SEPARATOR)[1]);
|
61
66
|
setHoveredStep(hoveredIdx);
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { TCommonVoteProps } from './types';
|
2
2
|
import { EStepsPrimaryColor, EStepsSecondaryColor } from '../Steps/constants';
|
3
3
|
|
4
|
-
export type TProps =
|
4
|
+
export type TProps = TCommonVoteProps & {
|
5
5
|
/**
|
6
6
|
* Класс, применяемый к корневому элементу
|
7
7
|
*/
|
@@ -59,7 +59,7 @@ export type TProps = TCommonStepProps & {
|
|
59
59
|
*/
|
60
60
|
needChangeFirstHalfColor?: boolean;
|
61
61
|
};
|
62
|
-
export declare const Vote: import('react').ForwardRefExoticComponent<
|
62
|
+
export declare const Vote: import('react').ForwardRefExoticComponent<TCommonVoteProps & {
|
63
63
|
/**
|
64
64
|
* Класс, применяемый к корневому элементу
|
65
65
|
*/
|
@@ -13,4 +13,5 @@ export type { TButtonPropsWithoutStyles } from './MergedButton';
|
|
13
13
|
export { Image } from './Image';
|
14
14
|
export { Loader } from './Loader';
|
15
15
|
export { Slider } from './Slider';
|
16
|
-
export {
|
16
|
+
export { Steps, EStepsPrimaryColor, EStepsSecondaryColor, EStepsSize, type TCommonStepsProps } from './Steps';
|
17
|
+
export { Vote, EVoteSize, type TCommonVoteProps } from './Vote';
|
package/dist/components/index.js
CHANGED
@@ -12,10 +12,12 @@ import { EMergedButtonVariantRound } from "./MergedButton/constants.js";
|
|
12
12
|
import { AppImage } from "./Image/Image.js";
|
13
13
|
import { Loader } from "./Loader/Loader.js";
|
14
14
|
import { Slider } from "./Slider/Slider.js";
|
15
|
-
import {
|
15
|
+
import { Steps } from "./Steps/Steps.js";
|
16
|
+
import { EStepsPrimaryColor, EStepsSecondaryColor, EStepsSize } from "./Steps/constants.js";
|
17
|
+
import { Vote } from "./Vote/Vote.js";
|
18
|
+
import { EVoteSize } from "./Vote/constants.js";
|
16
19
|
export {
|
17
20
|
Button,
|
18
|
-
Drawer,
|
19
21
|
EButtonForm,
|
20
22
|
EButtonSize,
|
21
23
|
EButtonVariantDefault,
|
@@ -23,6 +25,10 @@ export {
|
|
23
25
|
EInputSize,
|
24
26
|
EInputVariant,
|
25
27
|
EMergedButtonVariantRound,
|
28
|
+
EStepsPrimaryColor,
|
29
|
+
EStepsSecondaryColor,
|
30
|
+
EStepsSize,
|
31
|
+
EVoteSize,
|
26
32
|
AppImage as Image,
|
27
33
|
Input,
|
28
34
|
InputPassword,
|
@@ -32,6 +38,8 @@ export {
|
|
32
38
|
OtpInput,
|
33
39
|
RadioGroup,
|
34
40
|
Slider,
|
41
|
+
Steps,
|
42
|
+
Vote,
|
35
43
|
getMaskedInputPhoneValue,
|
36
44
|
getUnmaskedInputValue
|
37
45
|
};
|