mimir-ui-kit 1.10.0 → 1.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. package/README.md +62 -62
  2. package/dist/DatePickerModal-DUUCHAWF.js +204 -0
  3. package/dist/{NavigationButtons-B8tMfqrg.js → NavigationButtons-DuOoqaPo.js} +20 -20
  4. package/dist/assets/Button.css +1 -1
  5. package/dist/assets/DatePickerModal.css +1 -0
  6. package/dist/assets/Drawer.css +1 -0
  7. package/dist/assets/Input.css +1 -1
  8. package/dist/assets/MergedButton.css +1 -1
  9. package/dist/assets/OtpInput.css +1 -1
  10. package/dist/assets/RadioGroup.css +1 -1
  11. package/dist/assets/SelectSearch.css +1 -0
  12. package/dist/assets/Slider.css +1 -1
  13. package/dist/assets/Switch.css +1 -0
  14. package/dist/assets/Tag.css +1 -0
  15. package/dist/assets/Timer.css +1 -0
  16. package/dist/assets/index.css +1 -1
  17. package/dist/components/Button/Button.d.ts +0 -1
  18. package/dist/components/Button/Button.js +25 -25
  19. package/dist/components/DatePicker/DatePicker.d.ts +44 -0
  20. package/dist/components/DatePicker/DatePicker.js +69 -0
  21. package/dist/components/DatePicker/DatePickerModal.d.ts +8 -0
  22. package/dist/components/DatePicker/DatePickerModal.js +9 -0
  23. package/dist/components/DatePicker/constants.d.ts +6 -0
  24. package/dist/components/DatePicker/constants.js +11 -0
  25. package/dist/components/DatePicker/index.d.ts +2 -0
  26. package/dist/components/DatePicker/index.js +4 -0
  27. package/dist/components/Drawer/Drawer.d.ts +38 -0
  28. package/dist/components/Drawer/Drawer.js +144 -0
  29. package/dist/components/Drawer/constants.d.ts +5 -0
  30. package/dist/components/Drawer/constants.js +9 -0
  31. package/dist/components/Drawer/index.d.ts +2 -0
  32. package/dist/components/Drawer/index.js +6 -0
  33. package/dist/components/Input/Input.d.ts +2 -2
  34. package/dist/components/Input/Input.js +17 -16
  35. package/dist/components/InputPassword/InputPassword.js +2 -2
  36. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  37. package/dist/components/MergedButton/MergedButton.d.ts +1 -1
  38. package/dist/components/MergedButton/MergedButton.js +17 -19
  39. package/dist/components/OtpInput/OtpInput.js +6 -6
  40. package/dist/components/Portal/Portal.d.ts +7 -0
  41. package/dist/components/Portal/Portal.js +10 -0
  42. package/dist/components/Portal/index.d.ts +1 -0
  43. package/dist/components/Portal/index.js +4 -0
  44. package/dist/components/RadioGroup/RadioGroup.d.ts +18 -2
  45. package/dist/components/RadioGroup/RadioGroup.js +127 -1061
  46. package/dist/components/RadioGroup/index.d.ts +1 -1
  47. package/dist/components/SelectSearch/SelectSearch.d.ts +15 -0
  48. package/dist/components/SelectSearch/SelectSearch.js +3961 -0
  49. package/dist/components/SelectSearch/constants.d.ts +4 -0
  50. package/dist/components/SelectSearch/constants.js +8 -0
  51. package/dist/components/SelectSearch/index.d.ts +2 -0
  52. package/dist/components/SelectSearch/index.js +6 -0
  53. package/dist/components/Slider/NavigationButtons/NavigationButtons.js +1 -1
  54. package/dist/components/Slider/NavigationButtons/index.js +1 -1
  55. package/dist/components/Slider/Slider.js +10 -10
  56. package/dist/components/Switch/Switch.d.ts +294 -0
  57. package/dist/components/Switch/Switch.js +57 -0
  58. package/dist/components/Switch/index.d.ts +2 -0
  59. package/dist/components/Switch/index.js +4 -0
  60. package/dist/components/Tag/Tag.d.ts +19 -57
  61. package/dist/components/Tag/Tag.js +39 -84
  62. package/dist/components/Tag/constants.d.ts +5 -37
  63. package/dist/components/Tag/constants.js +13 -53
  64. package/dist/components/Tag/index.d.ts +2 -3
  65. package/dist/components/Tag/index.js +5 -6
  66. package/dist/components/Tag/types.d.ts +0 -6
  67. package/dist/components/Timer/Timer.d.ts +24 -0
  68. package/dist/components/Timer/Timer.js +29 -0
  69. package/dist/components/Timer/index.d.ts +1 -0
  70. package/dist/components/Timer/index.js +4 -0
  71. package/dist/components/index.d.ts +11 -1
  72. package/dist/components/index.js +19 -0
  73. package/dist/focus-management-CFDo6ZSc.js +91 -0
  74. package/dist/hooks/index.d.ts +3 -0
  75. package/dist/hooks/index.js +7 -1
  76. package/dist/hooks/useClickOutside/index.d.ts +1 -0
  77. package/dist/hooks/useClickOutside/index.js +4 -0
  78. package/dist/hooks/useClickOutside/useClickOutside.d.ts +7 -0
  79. package/dist/hooks/useClickOutside/useClickOutside.js +25 -0
  80. package/dist/hooks/useInterval/index.d.ts +1 -0
  81. package/dist/hooks/useInterval/index.js +4 -0
  82. package/dist/hooks/useInterval/useInterval.d.ts +1 -0
  83. package/dist/hooks/useInterval/useInterval.js +17 -0
  84. package/dist/hooks/useLockBodyScroll/index.d.ts +1 -0
  85. package/dist/hooks/useLockBodyScroll/index.js +4 -0
  86. package/dist/hooks/useLockBodyScroll/useLockBodyScroll.d.ts +6 -0
  87. package/dist/hooks/useLockBodyScroll/useLockBodyScroll.js +20 -0
  88. package/dist/hooks/useTimer/index.d.ts +18 -0
  89. package/dist/hooks/useTimer/index.js +83 -0
  90. package/dist/hooks/useTimer/useTimer.d.ts +18 -0
  91. package/dist/hooks/useTimer/useTimer.js +87 -0
  92. package/dist/hooks/useTimer/utils.d.ts +24 -0
  93. package/dist/hooks/useTimer/utils.js +88 -0
  94. package/dist/index.d.ts +1 -0
  95. package/dist/index.js +28 -1
  96. package/dist/label-BXAcSLy0.js +913 -0
  97. package/dist/use-active-press-9MCrfRZk.js +31 -0
  98. package/dist/utils/formating/Date.d.ts +1 -0
  99. package/dist/utils/formating/Date.js +26 -0
  100. package/dist/utils/formating/Month.d.ts +8 -0
  101. package/dist/utils/formating/Month.js +80 -0
  102. package/dist/utils/formating/Numbers.d.ts +6 -0
  103. package/dist/utils/formating/Numbers.js +8 -0
  104. package/dist/utils/index.d.ts +9 -0
  105. package/dist/utils/index.js +11 -0
  106. package/package.json +128 -128
@@ -1,40 +1,38 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { memo } from "react";
3
2
  import { c as classNames } from "../../index-CweZ_OcN.js";
4
- import { Button } from "../Button/Button.js";
3
+ import { memo } from "react";
5
4
  import { EMergedButtonVariantRound } from "./constants.js";
6
- import '../../assets/MergedButton.css';const buttons = "_buttons_h653f_2";
7
- const button = "_button_h653f_2";
8
- const gray = "_gray_h653f_27";
9
- const white = "_white_h653f_35";
10
- const transparent = "_transparent_h653f_42";
5
+ import { Button } from "../Button/Button.js";
6
+ import '../../assets/MergedButton.css';const buttons = "_buttons_cnsdp_2";
7
+ const gray = "_gray_cnsdp_28";
8
+ const white = "_white_cnsdp_36";
9
+ const transparent = "_transparent_cnsdp_43";
11
10
  const cls = {
12
11
  buttons,
13
- button,
12
+ "merged-button": "_merged-button_cnsdp_6",
14
13
  gray,
15
14
  white,
16
15
  transparent,
17
- "is-icon": "_is-icon_h653f_51"
16
+ "is-icon": "_is-icon_cnsdp_52"
18
17
  };
19
18
  const MergedButton = memo(({ buttons: buttons2 }) => {
20
19
  return /* @__PURE__ */ jsx("div", { className: cls.buttons, children: buttons2.map(
21
- ({ variant = EMergedButtonVariantRound.White, disabled, ...button2 }, index) => {
20
+ ({ variant = EMergedButtonVariantRound.White, disabled, ...button }, index) => {
22
21
  const buttonProps = {
23
- ...button2,
24
- isIconButton: button2.isIconButton ?? false,
25
- iconName: button2.isIconButton ? button2.iconName : void 0,
26
- leftIcon: button2.isIconButton ? void 0 : button2.leftIcon,
27
- rightIcon: button2.isIconButton ? void 0 : button2.rightIcon
22
+ ...button,
23
+ isIconButton: button.isIconButton ?? false,
24
+ iconName: button.isIconButton ? button.iconName : void 0,
25
+ leftIcon: button.isIconButton ? void 0 : button.leftIcon,
26
+ rightIcon: button.isIconButton ? void 0 : button.rightIcon
28
27
  };
29
28
  const className = classNames(
30
- cls.button,
31
- cls.clear,
29
+ cls["merged-button"],
32
30
  {
33
31
  [cls[variant]]: !disabled,
34
32
  [cls.disabled]: disabled,
35
- [cls["is-icon"]]: button2.isIconButton
33
+ [cls["is-icon"]]: button.isIconButton
36
34
  },
37
- button2.className
35
+ button.className
38
36
  );
39
37
  return /* @__PURE__ */ jsx(
40
38
  Button,
@@ -1,15 +1,15 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useImperativeHandle, Fragment } from "react";
3
2
  import { c as classNames } from "../../index-CweZ_OcN.js";
4
- import { Input } from "../Input/Input.js";
3
+ import { forwardRef, useImperativeHandle, Fragment } from "react";
5
4
  import { ITEMS_PER_SEPARATOR, DEFAULT_VALUE_LENGTH } from "./constants.js";
6
5
  import { useOTPInput } from "./hooks.js";
7
- import '../../assets/OtpInput.css';const otp = "_otp_xwv60_3";
8
- const input = "_input_xwv60_15";
9
- const separator = "_separator_xwv60_29";
6
+ import { Input } from "../Input/Input.js";
7
+ import '../../assets/OtpInput.css';const otp = "_otp_1005h_3";
8
+ const input = "_input_1005h_15";
9
+ const separator = "_separator_1005h_29";
10
10
  const cls = {
11
11
  otp,
12
- "input-wrapper": "_input-wrapper_xwv60_15",
12
+ "input-wrapper": "_input-wrapper_1005h_15",
13
13
  input,
14
14
  separator
15
15
  };
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+
3
+ type TProps = {
4
+ element?: HTMLElement;
5
+ };
6
+ export declare const Portal: ({ element, children }: PropsWithChildren<TProps>) => import('react').ReactPortal;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { createPortal } from "react-dom";
2
+ const Portal = ({
3
+ element = document.body,
4
+ children
5
+ }) => {
6
+ return createPortal(children, element);
7
+ };
8
+ export {
9
+ Portal
10
+ };
@@ -0,0 +1 @@
1
+ export { Portal } from './Portal';
@@ -0,0 +1,4 @@
1
+ import { Portal } from "./Portal.js";
2
+ export {
3
+ Portal
4
+ };
@@ -7,7 +7,7 @@ export interface TRadioOption {
7
7
  /**
8
8
  * Свойства компонента RadioGroup.
9
9
  */
10
- export type TProps = Omit<RadioGroupProps, 'value'> & {
10
+ export type TRadioGroupProps = Omit<RadioGroupProps, 'value'> & {
11
11
  /**
12
12
  * Массив опций для радиогруппы.
13
13
  * Каждая опция должна содержать значение и метку.
@@ -27,4 +27,20 @@ export type TProps = Omit<RadioGroupProps, 'value'> & {
27
27
  /**
28
28
  * Компонент RadioGroup для выбора одной опции из нескольких.
29
29
  */
30
- export declare function RadioGroup({ options, value, onChange, label, ...props }: TProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare const RadioGroup: import('react').ForwardRefExoticComponent<Omit<RadioGroupProps, "value"> & {
31
+ /**
32
+ * Массив опций для радиогруппы.
33
+ * Каждая опция должна содержать значение и метку.
34
+ */
35
+ options: TRadioOption[];
36
+ /**
37
+ * Выбранное значение опции.
38
+ * Может быть необязательным, если нет выбранного значения.
39
+ */
40
+ value?: TRadioOption["value"];
41
+ /**
42
+ * Текст метки, отображаемой над радиогруппой.
43
+ * Может быть необязательным.
44
+ */
45
+ label?: string;
46
+ } & import('react').RefAttributes<HTMLElement>>;