mimir-ui-kit 1.4.0 → 1.5.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.
Files changed (59) hide show
  1. package/README.md +1 -1
  2. package/dist/{NavigationButtons-B8tMfqrg.js → NavigationButtons-cTsXB7GS.js} +18 -18
  3. package/dist/assets/Button.css +1 -1
  4. package/dist/assets/OtpInput.css +1 -1
  5. package/dist/assets/RadioGroup.css +1 -1
  6. package/dist/assets/SelectSearch.css +1 -0
  7. package/dist/assets/Slider.css +1 -1
  8. package/dist/assets/index.css +1 -1
  9. package/dist/components/Button/Button.d.ts +1 -0
  10. package/dist/components/Button/Button.js +24 -24
  11. package/dist/components/Input/Input.js +1 -1
  12. package/dist/components/InputPassword/InputPassword.js +2 -2
  13. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  14. package/dist/components/MergedButton/MergedButton.d.ts +1 -1
  15. package/dist/components/MergedButton/MergedButton.js +2 -2
  16. package/dist/components/OtpInput/OtpInput.js +6 -6
  17. package/dist/components/RadioGroup/RadioGroup.js +78 -1019
  18. package/dist/components/SelectSearch/SelectSearch.d.ts +21 -0
  19. package/dist/components/SelectSearch/SelectSearch.js +3989 -0
  20. package/dist/components/SelectSearch/constants.d.ts +4 -0
  21. package/dist/components/SelectSearch/constants.js +8 -0
  22. package/dist/components/SelectSearch/index.d.ts +2 -0
  23. package/dist/components/SelectSearch/index.js +6 -0
  24. package/dist/components/SelectSearch/types.d.ts +17 -0
  25. package/dist/components/SelectSearch/types.js +1 -0
  26. package/dist/components/Slider/NavigationButtons/NavigationButtons.js +1 -1
  27. package/dist/components/Slider/NavigationButtons/index.js +1 -1
  28. package/dist/components/Slider/Slider.js +10 -10
  29. package/dist/components/Steps/Steps.d.ts +3 -3
  30. package/dist/components/Steps/Steps.js +9 -4
  31. package/dist/components/Steps/index.d.ts +3 -0
  32. package/dist/components/Steps/index.js +8 -0
  33. package/dist/components/Steps/types.d.ts +1 -1
  34. package/dist/components/Vote/Vote.d.ts +3 -3
  35. package/dist/components/Vote/index.d.ts +3 -0
  36. package/dist/components/Vote/index.js +6 -0
  37. package/dist/components/Vote/types.d.ts +1 -1
  38. package/dist/components/index.d.ts +2 -1
  39. package/dist/components/index.js +10 -2
  40. package/dist/focus-management-4cCSLNHi.js +1000 -0
  41. package/dist/hooks/index.d.ts +0 -1
  42. package/dist/hooks/index.js +0 -2
  43. package/dist/index.js +10 -4
  44. package/package.json +1 -1
  45. package/dist/assets/Drawer.css +0 -1
  46. package/dist/components/Drawer/Drawer.d.ts +0 -38
  47. package/dist/components/Drawer/Drawer.js +0 -144
  48. package/dist/components/Drawer/constants.d.ts +0 -5
  49. package/dist/components/Drawer/constants.js +0 -9
  50. package/dist/components/Drawer/index.d.ts +0 -2
  51. package/dist/components/Drawer/index.js +0 -6
  52. package/dist/components/Portal/Portal.d.ts +0 -7
  53. package/dist/components/Portal/Portal.js +0 -10
  54. package/dist/components/Portal/index.d.ts +0 -1
  55. package/dist/components/Portal/index.js +0 -4
  56. package/dist/hooks/useLockBodyScroll/index.d.ts +0 -1
  57. package/dist/hooks/useLockBodyScroll/index.js +0 -4
  58. package/dist/hooks/useLockBodyScroll/useLockBodyScroll.d.ts +0 -6
  59. package/dist/hooks/useLockBodyScroll/useLockBodyScroll.js +0 -20
@@ -0,0 +1,4 @@
1
+ export declare enum ESelectSearchSize {
2
+ L = "l",
3
+ XXL = "xxl"
4
+ }
@@ -0,0 +1,8 @@
1
+ var ESelectSearchSize = /* @__PURE__ */ ((ESelectSearchSize2) => {
2
+ ESelectSearchSize2["L"] = "l";
3
+ ESelectSearchSize2["XXL"] = "xxl";
4
+ return ESelectSearchSize2;
5
+ })(ESelectSearchSize || {});
6
+ export {
7
+ ESelectSearchSize
8
+ };
@@ -0,0 +1,2 @@
1
+ export { SelectSearch } from './SelectSearch';
2
+ export { ESelectSearchSize } from './constants';
@@ -0,0 +1,6 @@
1
+ import { SelectSearch } from "./SelectSearch.js";
2
+ import { ESelectSearchSize } from "./constants.js";
3
+ export {
4
+ ESelectSearchSize,
5
+ SelectSearch
6
+ };
@@ -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
+ };
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { N } from "../../../NavigationButtons-B8tMfqrg.js";
3
+ import { N } from "../../../NavigationButtons-cTsXB7GS.js";
4
4
  import "../../MergedButton/MergedButton.js";
5
5
  export {
6
6
  N as NavigationButtons
@@ -1,4 +1,4 @@
1
- import { N } from "../../../NavigationButtons-B8tMfqrg.js";
1
+ import { N } from "../../../NavigationButtons-cTsXB7GS.js";
2
2
  export {
3
3
  N as NavigationButtons
4
4
  };
@@ -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 { g as getDocument, S as Swiper, N as NavigationButtons, a as SwiperSlide } from "../../NavigationButtons-B8tMfqrg.js";
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 = "_swiper_1jb8j_3";
304
- const slide = "_slide_1jb8j_9";
305
- const link = "_link_1jb8j_16";
306
- const image = "_image_1jb8j_22";
307
- const navigation = "_navigation_1jb8j_29";
308
- const pagination = "_pagination_1jb8j_39";
309
- const slides = "_slides_1jb8j_54";
310
- const separator = "_separator_1jb8j_60";
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 { TCommonStepProps } from './types';
2
+ import { TCommonStepsProps } from './types';
3
3
 
4
- export type TProps = TCommonStepProps & {
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<TCommonStepProps & {
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);
@@ -0,0 +1,3 @@
1
+ export { Steps } from './Steps';
2
+ export { EStepsPrimaryColor, EStepsSecondaryColor, EStepsSize } from './constants';
3
+ export type { TCommonStepsProps } from './types';
@@ -0,0 +1,8 @@
1
+ import { Steps } from "./Steps.js";
2
+ import { EStepsPrimaryColor, EStepsSecondaryColor, EStepsSize } from "./constants.js";
3
+ export {
4
+ EStepsPrimaryColor,
5
+ EStepsSecondaryColor,
6
+ EStepsSize,
7
+ Steps
8
+ };
@@ -1,6 +1,6 @@
1
1
  import { EStepsSize } from './constants';
2
2
 
3
3
  export type TSize = `${EStepsSize}` | EStepsSize;
4
- export type TCommonStepProps = {
4
+ export type TCommonStepsProps = {
5
5
  size?: TSize;
6
6
  };
@@ -1,7 +1,7 @@
1
- import { TCommonStepProps } from './types';
1
+ import { TCommonVoteProps } from './types';
2
2
  import { EStepsPrimaryColor, EStepsSecondaryColor } from '../Steps/constants';
3
3
 
4
- export type TProps = TCommonStepProps & {
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<TCommonStepProps & {
62
+ export declare const Vote: import('react').ForwardRefExoticComponent<TCommonVoteProps & {
63
63
  /**
64
64
  * Класс, применяемый к корневому элементу
65
65
  */
@@ -0,0 +1,3 @@
1
+ export { Vote } from './Vote';
2
+ export { EVoteSize } from './constants';
3
+ export type { TCommonVoteProps, TSize } from './types';
@@ -0,0 +1,6 @@
1
+ import { Vote } from "./Vote.js";
2
+ import { EVoteSize } from "./constants.js";
3
+ export {
4
+ EVoteSize,
5
+ Vote
6
+ };
@@ -1,6 +1,6 @@
1
1
  import { EVoteSize } from './constants';
2
2
 
3
3
  export type TSize = `${EVoteSize}` | EVoteSize;
4
- export type TCommonStepProps = {
4
+ export type TCommonVoteProps = {
5
5
  size?: TSize;
6
6
  };
@@ -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 { Drawer } from './Drawer';
16
+ export { Steps, EStepsPrimaryColor, EStepsSecondaryColor, EStepsSize, type TCommonStepsProps } from './Steps';
17
+ export { Vote, EVoteSize, type TCommonVoteProps } from './Vote';
@@ -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 { Drawer } from "./Drawer/Drawer.js";
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
  };