mimir-ui-kit 1.14.0 → 1.14.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. package/dist/DatePickerModal-BM0BgzTb.js +204 -0
  2. package/dist/{NavigationButtons-B8tMfqrg.js → NavigationButtons-DuOoqaPo.js} +20 -20
  3. package/dist/assets/Accordion.css +1 -0
  4. package/dist/assets/AccordionItem.css +1 -0
  5. package/dist/assets/Button.css +1 -1
  6. package/dist/assets/DatePickerModal.css +1 -0
  7. package/dist/assets/Drawer.css +1 -0
  8. package/dist/assets/Input.css +1 -1
  9. package/dist/assets/ListPhotos.css +1 -0
  10. package/dist/assets/MergedButton.css +1 -1
  11. package/dist/assets/OtpInput.css +1 -1
  12. package/dist/assets/Pagination.css +1 -0
  13. package/dist/assets/RadioGroup.css +1 -1
  14. package/dist/assets/SelectSearch.css +1 -0
  15. package/dist/assets/Slider.css +1 -1
  16. package/dist/assets/Switch.css +1 -0
  17. package/dist/assets/TabTrail.css +1 -0
  18. package/dist/assets/Tag.css +1 -0
  19. package/dist/assets/Timer.css +1 -0
  20. package/dist/assets/Uploader.css +1 -0
  21. package/dist/assets/UploaderPhotos.css +1 -0
  22. package/dist/assets/index.css +1 -1
  23. package/dist/bugs-CSBdWk0R.js +18 -0
  24. package/dist/components/Accordion/Accordion.d.ts +10 -0
  25. package/dist/components/Accordion/Accordion.js +176 -0
  26. package/dist/components/Accordion/AccordionItem/AccordionItem.d.ts +8 -0
  27. package/dist/components/Accordion/AccordionItem/AccordionItem.js +16 -0
  28. package/dist/components/Accordion/AccordionItem/index.d.ts +1 -0
  29. package/dist/components/Accordion/AccordionItem/index.js +4 -0
  30. package/dist/components/Accordion/constants.d.ts +8 -0
  31. package/dist/components/Accordion/constants.js +14 -0
  32. package/dist/components/Accordion/index.d.ts +3 -0
  33. package/dist/components/Accordion/index.js +8 -0
  34. package/dist/components/Button/Button.d.ts +0 -1
  35. package/dist/components/Button/Button.js +26 -25
  36. package/dist/components/Button/constants.d.ts +2 -1
  37. package/dist/components/Button/constants.js +1 -0
  38. package/dist/components/DatePicker/DatePicker.d.ts +44 -0
  39. package/dist/components/DatePicker/DatePicker.js +69 -0
  40. package/dist/components/DatePicker/DatePickerModal.d.ts +8 -0
  41. package/dist/components/DatePicker/DatePickerModal.js +9 -0
  42. package/dist/components/DatePicker/constants.d.ts +6 -0
  43. package/dist/components/DatePicker/constants.js +11 -0
  44. package/dist/components/DatePicker/index.d.ts +2 -0
  45. package/dist/components/DatePicker/index.js +4 -0
  46. package/dist/components/Drawer/Drawer.d.ts +38 -0
  47. package/dist/components/Drawer/Drawer.js +144 -0
  48. package/dist/components/Drawer/constants.d.ts +5 -0
  49. package/dist/components/Drawer/constants.js +9 -0
  50. package/dist/components/Drawer/index.d.ts +2 -0
  51. package/dist/components/Drawer/index.js +6 -0
  52. package/dist/components/Input/Input.d.ts +2 -2
  53. package/dist/components/Input/Input.js +17 -16
  54. package/dist/components/InputPassword/InputPassword.js +2 -2
  55. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  56. package/dist/components/ListPhotos/ListPhotos.d.ts +23 -0
  57. package/dist/components/ListPhotos/ListPhotos.js +33 -0
  58. package/dist/components/ListPhotos/constants.d.ts +3 -0
  59. package/dist/components/ListPhotos/constants.js +21 -0
  60. package/dist/components/ListPhotos/index.d.ts +2 -0
  61. package/dist/components/ListPhotos/index.js +4 -0
  62. package/dist/components/MergedButton/MergedButton.d.ts +1 -1
  63. package/dist/components/MergedButton/MergedButton.js +17 -19
  64. package/dist/components/OtpInput/OtpInput.js +6 -6
  65. package/dist/components/Pagination/Pagination.d.ts +42 -0
  66. package/dist/components/Pagination/Pagination.js +220 -0
  67. package/dist/components/Pagination/constants.d.ts +2 -0
  68. package/dist/components/Pagination/constants.js +6 -0
  69. package/dist/components/Pagination/index.d.ts +1 -0
  70. package/dist/components/Pagination/index.js +4 -0
  71. package/dist/components/Pagination/types.d.ts +0 -0
  72. package/dist/components/Pagination/types.js +1 -0
  73. package/dist/components/Portal/Portal.d.ts +7 -0
  74. package/dist/components/Portal/Portal.js +10 -0
  75. package/dist/components/Portal/index.d.ts +1 -0
  76. package/dist/components/Portal/index.js +4 -0
  77. package/dist/components/RadioGroup/RadioGroup.d.ts +18 -2
  78. package/dist/components/RadioGroup/RadioGroup.js +130 -1061
  79. package/dist/components/RadioGroup/index.d.ts +1 -1
  80. package/dist/components/SelectSearch/SelectSearch.d.ts +15 -0
  81. package/dist/components/SelectSearch/SelectSearch.js +3876 -0
  82. package/dist/components/SelectSearch/constants.d.ts +4 -0
  83. package/dist/components/SelectSearch/constants.js +8 -0
  84. package/dist/components/SelectSearch/index.d.ts +2 -0
  85. package/dist/components/SelectSearch/index.js +6 -0
  86. package/dist/components/Slider/NavigationButtons/NavigationButtons.js +1 -1
  87. package/dist/components/Slider/NavigationButtons/index.js +1 -1
  88. package/dist/components/Slider/Slider.js +10 -10
  89. package/dist/components/Switch/Switch.d.ts +294 -0
  90. package/dist/components/Switch/Switch.js +59 -0
  91. package/dist/components/Switch/index.d.ts +2 -0
  92. package/dist/components/Switch/index.js +4 -0
  93. package/dist/components/TabTrail/TabButtons/TabButtons.d.ts +8 -0
  94. package/dist/components/TabTrail/TabButtons/TabButtons.js +29 -0
  95. package/dist/components/TabTrail/TabButtons/constants.d.ts +8 -0
  96. package/dist/components/TabTrail/TabButtons/constants.js +14 -0
  97. package/dist/components/TabTrail/TabButtons/index.d.ts +1 -0
  98. package/dist/components/TabTrail/TabButtons/index.js +4 -0
  99. package/dist/components/TabTrail/TabTrail.d.ts +11 -0
  100. package/dist/components/TabTrail/TabTrail.js +282 -0
  101. package/dist/components/TabTrail/constants.d.ts +4 -0
  102. package/dist/components/TabTrail/constants.js +8 -0
  103. package/dist/components/TabTrail/index.d.ts +2 -0
  104. package/dist/components/TabTrail/index.js +6 -0
  105. package/dist/components/Tag/Tag.d.ts +20 -57
  106. package/dist/components/Tag/Tag.js +39 -84
  107. package/dist/components/Tag/constants.d.ts +5 -37
  108. package/dist/components/Tag/constants.js +13 -53
  109. package/dist/components/Tag/index.d.ts +2 -3
  110. package/dist/components/Tag/index.js +5 -6
  111. package/dist/components/Tag/types.d.ts +0 -6
  112. package/dist/components/Timer/Timer.d.ts +24 -0
  113. package/dist/components/Timer/Timer.js +29 -0
  114. package/dist/components/Timer/index.d.ts +1 -0
  115. package/dist/components/Timer/index.js +4 -0
  116. package/dist/components/Uploader/Uploader.d.ts +30 -0
  117. package/dist/components/Uploader/Uploader.js +90 -0
  118. package/dist/components/Uploader/constants.d.ts +5 -0
  119. package/dist/components/Uploader/constants.js +16 -0
  120. package/dist/components/Uploader/index.d.ts +2 -0
  121. package/dist/components/Uploader/index.js +4 -0
  122. package/dist/components/UploaderPhotos/UploaderPhotos.d.ts +29 -0
  123. package/dist/components/UploaderPhotos/UploaderPhotos.js +46 -0
  124. package/dist/components/UploaderPhotos/index.d.ts +2 -0
  125. package/dist/components/UploaderPhotos/index.js +4 -0
  126. package/dist/components/index.d.ts +16 -1
  127. package/dist/components/index.js +31 -0
  128. package/dist/focus-management-1rQPII7Z.js +77 -0
  129. package/dist/hidden-BuVoeHNy.js +13 -0
  130. package/dist/hooks/index.d.ts +3 -0
  131. package/dist/hooks/index.js +7 -1
  132. package/dist/hooks/useClickOutside/index.d.ts +1 -0
  133. package/dist/hooks/useClickOutside/index.js +4 -0
  134. package/dist/hooks/useClickOutside/useClickOutside.d.ts +7 -0
  135. package/dist/hooks/useClickOutside/useClickOutside.js +25 -0
  136. package/dist/hooks/useInterval/index.d.ts +1 -0
  137. package/dist/hooks/useInterval/index.js +4 -0
  138. package/dist/hooks/useInterval/useInterval.d.ts +1 -0
  139. package/dist/hooks/useInterval/useInterval.js +17 -0
  140. package/dist/hooks/useLockBodyScroll/index.d.ts +1 -0
  141. package/dist/hooks/useLockBodyScroll/index.js +4 -0
  142. package/dist/hooks/useLockBodyScroll/useLockBodyScroll.d.ts +6 -0
  143. package/dist/hooks/useLockBodyScroll/useLockBodyScroll.js +20 -0
  144. package/dist/hooks/useTimer/index.d.ts +18 -0
  145. package/dist/hooks/useTimer/index.js +83 -0
  146. package/dist/hooks/useTimer/useTimer.d.ts +18 -0
  147. package/dist/hooks/useTimer/useTimer.js +87 -0
  148. package/dist/hooks/useTimer/utils.d.ts +24 -0
  149. package/dist/hooks/useTimer/utils.js +88 -0
  150. package/dist/hooks/useWindowSize/index.d.ts +4 -0
  151. package/dist/hooks/useWindowSize/index.js +26 -0
  152. package/dist/icons/Icon.js +1 -1
  153. package/dist/icons/components/12px/Close12px.d.ts +4 -0
  154. package/dist/icons/components/12px/Close12px.js +18 -0
  155. package/dist/icons/components/index.d.ts +1 -0
  156. package/dist/icons/components/index.js +560 -559
  157. package/dist/{index-_ACzPKPw.js → index-Cxiikb7g.js} +561 -558
  158. package/dist/index.d.ts +1 -0
  159. package/dist/index.js +40 -1
  160. package/dist/keyboard-B256ZoM-.js +745 -0
  161. package/dist/label-C_5Syaoj.js +159 -0
  162. package/dist/open-closed-CbXq00et.js +93 -0
  163. package/dist/use-active-press-B6yeSopF.js +31 -0
  164. package/dist/use-by-comparator-BUO78DGe.js +16 -0
  165. package/dist/use-resolve-button-type-B6LE6gU3.js +19 -0
  166. package/dist/utils/UUID4.d.ts +1 -0
  167. package/dist/utils/UUID4.js +9 -0
  168. package/dist/utils/formating/Date.d.ts +1 -0
  169. package/dist/utils/formating/Date.js +26 -0
  170. package/dist/utils/formating/Month.d.ts +8 -0
  171. package/dist/utils/formating/Month.js +80 -0
  172. package/dist/utils/formating/Numbers.d.ts +6 -0
  173. package/dist/utils/formating/Numbers.js +8 -0
  174. package/dist/utils/index.d.ts +11 -0
  175. package/dist/utils/index.js +13 -0
  176. package/package.json +1 -1
@@ -0,0 +1,144 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { c as classNames } from "../../index-CweZ_OcN.js";
3
+ import { useState, useRef, useCallback, useEffect } from "react";
4
+ import { EDrawerPosition } from "./constants.js";
5
+ import { useMediaQuery } from "../../hooks/useMediaQuery/useMediaQuery.js";
6
+ import { EMediaQuery } from "../../hooks/useMediaQuery/constants.js";
7
+ import { useLockBodyScroll } from "../../hooks/useLockBodyScroll/useLockBodyScroll.js";
8
+ import { Button } from "../Button/Button.js";
9
+ import { EButtonVariantDefault, EButtonSize } from "../Button/constants.js";
10
+ import { Portal } from "../Portal/Portal.js";
11
+ import '../../assets/Drawer.css';const drawer = "_drawer_vy4rv_3";
12
+ const content = "_content_vy4rv_17";
13
+ const header = "_header_vy4rv_32";
14
+ const title = "_title_vy4rv_40";
15
+ const space = "_space_vy4rv_54";
16
+ const inner = "_inner_vy4rv_65";
17
+ const button = "_button_vy4rv_68";
18
+ const footer = "_footer_vy4rv_73";
19
+ const left = "_left_vy4rv_86";
20
+ const right = "_right_vy4rv_90";
21
+ const bottom = "_bottom_vy4rv_94";
22
+ const opened = "_opened_vy4rv_103";
23
+ const overlay = "_overlay_vy4rv_151";
24
+ const cls = {
25
+ drawer,
26
+ content,
27
+ header,
28
+ title,
29
+ space,
30
+ inner,
31
+ button,
32
+ footer,
33
+ "footer-button": "_footer-button_vy4rv_82",
34
+ left,
35
+ right,
36
+ bottom,
37
+ opened,
38
+ "is-closing": "_is-closing_vy4rv_118",
39
+ overlay
40
+ };
41
+ const ANIMATION_DELAY = 300;
42
+ const Drawer = ({
43
+ isOpen,
44
+ onClose,
45
+ title: title2,
46
+ className,
47
+ position = EDrawerPosition.RIGHT,
48
+ paddingRight = 8,
49
+ footer: footer2,
50
+ children
51
+ }) => {
52
+ const [isClosing, setIsClosing] = useState(false);
53
+ const [isMounted, setIsMounted] = useState(false);
54
+ const [isBodyScrollLocked, setIsBodyScrollLocked] = useState(false);
55
+ const timerRef = useRef();
56
+ const contentRef = useRef(null);
57
+ const isBottomPosition = position === EDrawerPosition.BOTTOM;
58
+ const isMobile = useMediaQuery(EMediaQuery.XS1);
59
+ useLockBodyScroll({
60
+ on: isBodyScrollLocked,
61
+ paddingRight
62
+ });
63
+ const handleClose = useCallback(() => {
64
+ if (onClose) {
65
+ setIsClosing(true);
66
+ setIsBodyScrollLocked(false);
67
+ timerRef.current = setTimeout(() => {
68
+ onClose();
69
+ setIsClosing(false);
70
+ }, ANIMATION_DELAY);
71
+ }
72
+ }, [onClose]);
73
+ const handleKeyDown = useCallback(
74
+ (event) => {
75
+ if (event.key === "Escape") {
76
+ handleClose();
77
+ }
78
+ },
79
+ [handleClose]
80
+ );
81
+ useEffect(() => {
82
+ if (isOpen) {
83
+ setIsBodyScrollLocked(true);
84
+ setIsMounted(true);
85
+ window.addEventListener("keydown", handleKeyDown);
86
+ }
87
+ return () => {
88
+ setIsMounted(false);
89
+ clearTimeout(timerRef.current);
90
+ window.removeEventListener("keydown", handleKeyDown);
91
+ };
92
+ }, [isOpen, handleKeyDown]);
93
+ const mods = {
94
+ [cls.opened]: isMounted,
95
+ [cls["is-closing"]]: isClosing
96
+ };
97
+ if (!isOpen) {
98
+ return null;
99
+ }
100
+ return /* @__PURE__ */ jsxs(Portal, { children: [
101
+ /* @__PURE__ */ jsx(
102
+ "div",
103
+ {
104
+ "aria-hidden": isOpen,
105
+ role: "dialog",
106
+ style: {
107
+ minHeight: isBottomPosition && contentRef.current ? contentRef.current.offsetHeight : void 0
108
+ },
109
+ className: classNames(cls.drawer, cls[position], mods, className),
110
+ children: /* @__PURE__ */ jsxs("section", { className: classNames(cls.content, cls[position]), children: [
111
+ /* @__PURE__ */ jsxs("header", { className: cls.header, children: [
112
+ /* @__PURE__ */ jsx("h2", { className: cls.title, children: title2 }),
113
+ /* @__PURE__ */ jsx("div", { className: cls.space, children: /* @__PURE__ */ jsx(
114
+ Button,
115
+ {
116
+ variant: EButtonVariantDefault.SecondaryWhite,
117
+ isIconButton: true,
118
+ size: isMobile ? EButtonSize.S : EButtonSize.M,
119
+ iconName: "Close16px",
120
+ onClick: handleClose,
121
+ className: cls.button
122
+ }
123
+ ) })
124
+ ] }),
125
+ /* @__PURE__ */ jsx("div", { ref: contentRef, className: cls.inner, children }),
126
+ /* @__PURE__ */ jsx("footer", { className: cls.footer, children: footer2 || /* @__PURE__ */ jsx(
127
+ Button,
128
+ {
129
+ size: isMobile ? EButtonSize.M : EButtonSize.XXL,
130
+ full: isMobile,
131
+ onClick: handleClose,
132
+ className: cls["footer-button"],
133
+ children: "Закрыть"
134
+ }
135
+ ) })
136
+ ] })
137
+ }
138
+ ),
139
+ /* @__PURE__ */ jsx("div", { className: classNames(cls.overlay, mods), onClick: handleClose })
140
+ ] });
141
+ };
142
+ export {
143
+ Drawer
144
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum EDrawerPosition {
2
+ LEFT = "left",
3
+ RIGHT = "right",
4
+ BOTTOM = "bottom"
5
+ }
@@ -0,0 +1,9 @@
1
+ var EDrawerPosition = /* @__PURE__ */ ((EDrawerPosition2) => {
2
+ EDrawerPosition2["LEFT"] = "left";
3
+ EDrawerPosition2["RIGHT"] = "right";
4
+ EDrawerPosition2["BOTTOM"] = "bottom";
5
+ return EDrawerPosition2;
6
+ })(EDrawerPosition || {});
7
+ export {
8
+ EDrawerPosition
9
+ };
@@ -0,0 +1,2 @@
1
+ export { Drawer } from './Drawer';
2
+ export { EDrawerPosition } from './constants';
@@ -0,0 +1,6 @@
1
+ import { Drawer } from "./Drawer.js";
2
+ import { EDrawerPosition } from "./constants.js";
3
+ export {
4
+ Drawer,
5
+ EDrawerPosition
6
+ };
@@ -7,7 +7,7 @@ export type TProps = TInputProps & {
7
7
  */
8
8
  size?: TSize;
9
9
  /**
10
- * `Варинты отображения ввода. Может быть 'alert', 'success', 'default', 'default-gray', 'default-white'.`
10
+ * `Варианты отображения ввода. Может быть 'alert', 'success', 'default', 'default-gray', 'default-white'.`
11
11
  */
12
12
  variant?: TVariant;
13
13
  /**
@@ -37,7 +37,7 @@ export declare const Input: import('react').MemoExoticComponent<import('react').
37
37
  */
38
38
  size?: TSize;
39
39
  /**
40
- * `Варинты отображения ввода. Может быть 'alert', 'success', 'default', 'default-gray', 'default-white'.`
40
+ * `Варианты отображения ввода. Может быть 'alert', 'success', 'default', 'default-gray', 'default-white'.`
41
41
  */
42
42
  variant?: TVariant;
43
43
  /**
@@ -1,31 +1,31 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { memo, forwardRef, useState, useEffect } from "react";
3
2
  import { c as classNames } from "../../index-CweZ_OcN.js";
3
+ import { memo, forwardRef, useState, useEffect } from "react";
4
4
  import { EInputVariant } from "./constants.js";
5
- import '../../assets/Input.css';const label = "_label_1wv6m_5";
6
- const input = "_input_1wv6m_2";
7
- const s = "_s_1wv6m_61";
8
- const m = "_m_1wv6m_73";
9
- const l = "_l_1wv6m_5";
10
- const success = "_success_1wv6m_124";
11
- const alarm = "_alarm_1wv6m_142";
12
- const error = "_error_1wv6m_160";
13
- const disabled = "_disabled_1wv6m_178";
5
+ import '../../assets/Input.css';const label = "_label_1sn09_5";
6
+ const input = "_input_1sn09_2";
7
+ const s = "_s_1sn09_61";
8
+ const m = "_m_1sn09_73";
9
+ const l = "_l_1sn09_5";
10
+ const success = "_success_1sn09_124";
11
+ const alarm = "_alarm_1sn09_142";
12
+ const error = "_error_1sn09_160";
13
+ const disabled = "_disabled_1sn09_178";
14
14
  const cls = {
15
- "input-wrapper": "_input-wrapper_1wv6m_2",
15
+ "input-wrapper": "_input-wrapper_1sn09_2",
16
16
  label,
17
- "active-label": "_active-label_1wv6m_18",
17
+ "active-label": "_active-label_1sn09_18",
18
18
  input,
19
19
  s,
20
20
  m,
21
21
  l,
22
- "default-gray": "_default-gray_1wv6m_97",
23
- "default-white": "_default-white_1wv6m_109",
22
+ "default-gray": "_default-gray_1sn09_97",
23
+ "default-white": "_default-white_1sn09_109",
24
24
  success,
25
25
  alarm,
26
26
  error,
27
27
  disabled,
28
- "has-label": "_has-label_1wv6m_196"
28
+ "has-label": "_has-label_1sn09_198"
29
29
  };
30
30
  const Input = memo(
31
31
  forwardRef(
@@ -76,7 +76,8 @@ const Input = memo(
76
76
  const labelClassNames = classNames(
77
77
  cls.label,
78
78
  {
79
- [cls["active-label"]]: isFocused || value
79
+ [cls["active-label"]]: isFocused || value,
80
+ [cls.disabled]: disabled2 || readonly
80
81
  },
81
82
  className,
82
83
  cls[size]
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { memo, forwardRef, useState } from "react";
3
- import { Input } from "../Input/Input.js";
4
- import { Button } from "../Button/Button.js";
5
3
  import { Icon } from "../../icons/Icon.js";
4
+ import { Button } from "../Button/Button.js";
5
+ import { Input } from "../Input/Input.js";
6
6
  import '../../assets/InputPassword.css';const input = "_input_mam1g_2";
7
7
  const wrapper = "_wrapper_mam1g_6";
8
8
  const button = "_button_mam1g_17";
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { memo, forwardRef, useState, useCallback, useImperativeHandle } from "react";
3
- import { Input } from "../Input/Input.js";
4
3
  import { getMaskedInputPhoneValue, getUnmaskedInputValue } from "./utils.js";
4
+ import { Input } from "../Input/Input.js";
5
5
  const InputPhoneNumber = memo(
6
6
  forwardRef(
7
7
  ({ value = "", onChange, ...props }, ref) => {
@@ -0,0 +1,23 @@
1
+ export type TListPhotos = {
2
+ /**
3
+ * Массив фото
4
+ */
5
+ value: TPhotosDetail[];
6
+ /**
7
+ * функция -callback, которая вызывается при изменении списка и передает обновленный список и deleteId,
8
+ */
9
+ onChange?: (e: TPhotoValue) => void;
10
+ };
11
+ export type TPhotoItem = {
12
+ id: number;
13
+ url: string;
14
+ };
15
+ export type TPhotoValue = {
16
+ deleteId?: number;
17
+ list: TPhotoItem[];
18
+ };
19
+ export type TPhotosDetail = {
20
+ id: number;
21
+ url: string;
22
+ };
23
+ export declare function ListPhotos({ value, onChange }: TListPhotos): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useState, useEffect } from "react";
3
+ import { Button } from "../Button/Button.js";
4
+ import '../../assets/ListPhotos.css';const cls = {
5
+ "list-photos": "_list-photos_1k3c7_2"
6
+ };
7
+ function ListPhotos({ value, onChange }) {
8
+ const [list, setList] = useState(value);
9
+ useEffect(() => {
10
+ setList(value);
11
+ }, [value]);
12
+ const onDelete = async (id) => {
13
+ const newList = [...list.filter((el) => el.id !== id)];
14
+ setList(newList);
15
+ onChange == null ? void 0 : onChange({ deleteId: id, list: newList });
16
+ };
17
+ return /* @__PURE__ */ jsx("ul", { className: cls["list-photos"], children: list.map((el) => /* @__PURE__ */ jsxs("li", { children: [
18
+ /* @__PURE__ */ jsx("img", { src: el.url, alt: "" }),
19
+ onChange && /* @__PURE__ */ jsx(
20
+ Button,
21
+ {
22
+ isIconButton: true,
23
+ iconName: "Close12px",
24
+ size: "m-s",
25
+ variant: "secondary-gray",
26
+ onClick: () => onDelete(el.id)
27
+ }
28
+ )
29
+ ] }, el.id)) });
30
+ }
31
+ export {
32
+ ListPhotos
33
+ };
@@ -0,0 +1,3 @@
1
+ import { TPhotosDetail } from './ListPhotos';
2
+
3
+ export declare const photos: TPhotosDetail[];
@@ -0,0 +1,21 @@
1
+ const photos = [
2
+ {
3
+ id: 111,
4
+ url: "https://i.pinimg.com/736x/5a/e6/12/5ae612a7ecf50870c8f41961fefc332f.jpg"
5
+ },
6
+ {
7
+ id: 112,
8
+ url: "https://i1.sndcdn.com/artworks-rQAPPfrs44UvRwIz-WJkvyQ-t500x500.jpg"
9
+ },
10
+ {
11
+ id: 113,
12
+ url: "https://i1.sndcdn.com/avatars-000095020320-0pmjnu-t500x500.jpg"
13
+ },
14
+ {
15
+ id: 114,
16
+ url: "https://i1.sndcdn.com/avatars-000151937348-27m28p-t500x500.jpg"
17
+ }
18
+ ];
19
+ export {
20
+ photos
21
+ };
@@ -0,0 +1,2 @@
1
+ export { ListPhotos } from './ListPhotos';
2
+ export type { ListPhotos as TListPhotos } from './ListPhotos';
@@ -0,0 +1,4 @@
1
+ import { ListPhotos } from "./ListPhotos.js";
2
+ export {
3
+ ListPhotos
4
+ };
@@ -1,5 +1,5 @@
1
- import { TButtonProps } from '../Button';
2
1
  import { EMergedButtonVariantRound } from './constants';
2
+ import { TButtonProps } from '../Button';
3
3
 
4
4
  export type TButtonPropsWithoutStyles = Omit<TButtonProps, 'clear' | 'variant' | 'form'> & {
5
5
  variant?: `${EMergedButtonVariantRound}` | EMergedButtonVariantRound;
@@ -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_1s9fa_2";
7
+ const gray = "_gray_1s9fa_28";
8
+ const white = "_white_1s9fa_36";
9
+ const transparent = "_transparent_1s9fa_44";
11
10
  const cls = {
12
11
  buttons,
13
- button,
12
+ "merged-button": "_merged-button_1s9fa_6",
14
13
  gray,
15
14
  white,
16
15
  transparent,
17
- "is-icon": "_is-icon_h653f_51"
16
+ "is-icon": "_is-icon_1s9fa_53"
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,42 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type TBackProps = {
4
+ currentPageNumber: number;
5
+ onClick: (nextPage: number) => void;
6
+ setCurrentPage: (nextPage: number) => void;
7
+ };
8
+ export type TNextProps = {
9
+ currentPageNumber: number;
10
+ lastPageNumber: number;
11
+ onClick: (nextPage: number) => void;
12
+ setCurrentPage: (nextPage: number) => void;
13
+ };
14
+ export type TItemProps = {
15
+ currentPageNumber: number;
16
+ newPageNumber: number;
17
+ onClick: (pageNumber: number) => void;
18
+ setCurrentPage: (pageNumber: number) => void;
19
+ };
20
+ export type TProps = {
21
+ /**
22
+ * Класс, применяемый к корневому элемент
23
+ */
24
+ rootClassName?: string;
25
+ /**
26
+ * Выполнится при изменении страницы
27
+ */
28
+ onChange: (page: number) => void;
29
+ /**
30
+ * Всего элементов
31
+ */
32
+ total: number;
33
+ /**
34
+ * Элементов на странице
35
+ */
36
+ perPage?: number;
37
+ /**
38
+ * Текущая страница
39
+ */
40
+ currentPageNumber?: number;
41
+ };
42
+ export declare const Pagination: React.ForwardRefExoticComponent<TProps & React.RefAttributes<HTMLElement>>;