mimir-ui-kit 1.34.1 → 1.34.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. package/dist/{Input-DspsU5F4.js → Input-ChCIy5oY.js} +23 -27
  2. package/dist/{ProgressBar-DWKyrXzd.js → ProgressBar-CwLwhaeM.js} +23 -23
  3. package/dist/assets/Accordion.css +1 -1
  4. package/dist/assets/AccordionItem.css +1 -1
  5. package/dist/assets/Button.css +1 -1
  6. package/dist/assets/CheckboxMimir.css +1 -1
  7. package/dist/assets/Chip.css +1 -1
  8. package/dist/assets/Drawer.css +1 -1
  9. package/dist/assets/Input.css +1 -1
  10. package/dist/assets/InputPassword.css +1 -1
  11. package/dist/assets/Link.css +1 -1
  12. package/dist/assets/ListFiles.css +1 -1
  13. package/dist/assets/ListPhotos.css +1 -1
  14. package/dist/assets/MergedButton.css +1 -1
  15. package/dist/assets/NotificationBadge.css +1 -1
  16. package/dist/assets/OtpInput.css +1 -1
  17. package/dist/assets/Pagination.css +1 -1
  18. package/dist/assets/ProgressBar2.css +1 -1
  19. package/dist/assets/RadioGroup.css +1 -1
  20. package/dist/assets/SelectSearch.css +1 -1
  21. package/dist/assets/Slider.css +1 -1
  22. package/dist/assets/TabTrail.css +1 -1
  23. package/dist/assets/Tag.css +1 -1
  24. package/dist/assets/TextArea.css +1 -1
  25. package/dist/assets/Timer.css +1 -1
  26. package/dist/assets/Uploader.css +1 -1
  27. package/dist/assets/UploaderPhotos.css +1 -1
  28. package/dist/assets/Vote.css +1 -1
  29. package/dist/assets/index.css +1 -1
  30. package/dist/assets/styles.css +1 -1
  31. package/dist/components/Accordion/Accordion.js +16 -24
  32. package/dist/components/Accordion/AccordionItem/AccordionItem.js +3 -3
  33. package/dist/components/AnchorLink/Link.js +9 -9
  34. package/dist/components/Button/Button.js +33 -33
  35. package/dist/components/Button/types.js +1 -0
  36. package/dist/components/CheckboxMimir/CheckboxMimir.js +19 -16
  37. package/dist/components/Chip/Chip.js +12 -12
  38. package/dist/components/DatePicker/DatePicker.d.ts +18 -36
  39. package/dist/components/DatePicker/DatePicker.js +6 -46
  40. package/dist/components/DatePicker/DatePickerModal.js +60 -76
  41. package/dist/components/DatePicker/MonthPickerModal.js +6 -14
  42. package/dist/components/DatePicker/YearPickerModal.js +2 -2
  43. package/dist/components/Drawer/Drawer.d.ts +1 -1
  44. package/dist/components/Drawer/Drawer.js +20 -20
  45. package/dist/components/Input/Input.d.ts +1 -5
  46. package/dist/components/Input/Input.js +1 -1
  47. package/dist/components/Input/constants.d.ts +3 -5
  48. package/dist/components/Input/constants.js +3 -7
  49. package/dist/components/Input/index.d.ts +2 -2
  50. package/dist/components/Input/index.js +2 -3
  51. package/dist/components/Input/types.d.ts +6 -2
  52. package/dist/components/Input/types.js +1 -0
  53. package/dist/components/InputPassword/InputPassword.js +8 -8
  54. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  55. package/dist/components/ListFiles/ListFiles.js +7 -7
  56. package/dist/components/ListPhotos/ListPhotos.js +4 -4
  57. package/dist/components/MergedButton/MergedButton.js +6 -6
  58. package/dist/components/NotificationBadge/NotificationBadge.js +4 -4
  59. package/dist/components/NotificationBadge/types.js +1 -0
  60. package/dist/components/OtpInput/OtpInput.js +5 -5
  61. package/dist/components/Pagination/Pagination.d.ts +3 -1
  62. package/dist/components/Pagination/Pagination.js +11 -7
  63. package/dist/components/Pagination/types.js +1 -0
  64. package/dist/components/RadioGroup/RadioGroup.js +9 -9
  65. package/dist/components/SelectSearch/SelectSearch.d.ts +2 -18
  66. package/dist/components/SelectSearch/SelectSearch.js +31 -47
  67. package/dist/components/SelectSearch/types.d.ts +4 -2
  68. package/dist/components/SelectSearch/types.js +1 -0
  69. package/dist/components/Slider/Slider.d.ts +2 -3
  70. package/dist/components/Slider/Slider.js +10 -12
  71. package/dist/components/Steps/Steps.d.ts +0 -4
  72. package/dist/components/Steps/Steps.js +1 -5
  73. package/dist/components/Steps/types.js +1 -0
  74. package/dist/components/TabTrail/TabTrail.d.ts +0 -8
  75. package/dist/components/TabTrail/TabTrail.js +17 -33
  76. package/dist/components/Tag/Tag.js +6 -6
  77. package/dist/components/Tag/types.js +1 -0
  78. package/dist/components/TextArea/TextArea.js +12 -14
  79. package/dist/components/TextArea/hooks.js +0 -4
  80. package/dist/components/TextArea/types.js +1 -0
  81. package/dist/components/Timer/Timer.js +1 -1
  82. package/dist/components/Toasts/ProgressBar.js +1 -1
  83. package/dist/components/Toasts/Toast.js +1 -1
  84. package/dist/components/Toasts/ToastList.js +1 -1
  85. package/dist/components/Toasts/ToastsProvider.js +1 -1
  86. package/dist/components/Toasts/types.js +1 -0
  87. package/dist/components/UniversalUploader/UniversalUploader.js +35 -21
  88. package/dist/components/UniversalUploader/types.js +1 -0
  89. package/dist/components/Uploader/Uploader.js +3 -3
  90. package/dist/components/UploaderFiles/UploaderFiles.js +1 -1
  91. package/dist/components/UploaderPhotos/UploaderPhotos.js +1 -1
  92. package/dist/components/Vote/Vote.d.ts +0 -8
  93. package/dist/components/Vote/Vote.js +4 -6
  94. package/dist/components/Vote/types.js +1 -0
  95. package/dist/components/index.d.ts +2 -14
  96. package/dist/components/index.js +2 -31
  97. package/dist/icons/Icon.js +1 -1
  98. package/dist/icons/components/types.js +1 -0
  99. package/dist/index.js +2 -31
  100. package/dist/{label-P7Xsi5N7.js → label-BTEGh6O_.js} +2 -2
  101. package/dist/styles.module-Ugsf0AOb.js +38 -0
  102. package/package.json +1 -1
  103. package/dist/assets/Avatar.css +0 -1
  104. package/dist/assets/GosZnak.css +0 -1
  105. package/dist/assets/InputRangeSlider.css +0 -1
  106. package/dist/assets/SkeletonCircle.css +0 -1
  107. package/dist/assets/SkeletonText.css +0 -1
  108. package/dist/assets/Switcher.css +0 -1
  109. package/dist/assets/TwinSwitcher.css +0 -1
  110. package/dist/assets/variant.css +0 -1
  111. package/dist/components/Avatar/Avatar.d.ts +0 -3
  112. package/dist/components/Avatar/Avatar.js +0 -62
  113. package/dist/components/Avatar/constants.d.ts +0 -5
  114. package/dist/components/Avatar/constants.js +0 -9
  115. package/dist/components/Avatar/index.d.ts +0 -3
  116. package/dist/components/Avatar/index.js +0 -6
  117. package/dist/components/Avatar/types.d.ts +0 -10
  118. package/dist/components/DatePicker/utils.d.ts +0 -2
  119. package/dist/components/DatePicker/utils.js +0 -16
  120. package/dist/components/GosZnak/GosZnak.d.ts +0 -4
  121. package/dist/components/GosZnak/GosZnak.js +0 -76
  122. package/dist/components/GosZnak/constants.d.ts +0 -11
  123. package/dist/components/GosZnak/constants.js +0 -17
  124. package/dist/components/GosZnak/index.d.ts +0 -3
  125. package/dist/components/GosZnak/index.js +0 -7
  126. package/dist/components/GosZnak/types.d.ts +0 -26
  127. package/dist/components/InputRangeSlider/InputRangeSlider.d.ts +0 -3
  128. package/dist/components/InputRangeSlider/InputRangeSlider.js +0 -219
  129. package/dist/components/InputRangeSlider/constants.d.ts +0 -10
  130. package/dist/components/InputRangeSlider/constants.js +0 -18
  131. package/dist/components/InputRangeSlider/index.d.ts +0 -3
  132. package/dist/components/InputRangeSlider/index.js +0 -7
  133. package/dist/components/InputRangeSlider/types.d.ts +0 -33
  134. package/dist/components/Skeleton/SkeletonBrick/SkeletonBrick.d.ts +0 -12
  135. package/dist/components/Skeleton/SkeletonBrick/SkeletonBrick.js +0 -34
  136. package/dist/components/Skeleton/SkeletonCircle/SkeletonCircle.d.ts +0 -9
  137. package/dist/components/Skeleton/SkeletonCircle/SkeletonCircle.js +0 -31
  138. package/dist/components/Skeleton/SkeletonText/SkeletonText.d.ts +0 -10
  139. package/dist/components/Skeleton/SkeletonText/SkeletonText.js +0 -49
  140. package/dist/components/Skeleton/constants.d.ts +0 -5
  141. package/dist/components/Skeleton/constants.js +0 -9
  142. package/dist/components/Skeleton/index.d.ts +0 -4
  143. package/dist/components/Skeleton/index.js +0 -10
  144. package/dist/components/Switcher/Switcher.d.ts +0 -3
  145. package/dist/components/Switcher/Switcher.js +0 -118
  146. package/dist/components/Switcher/constants.d.ts +0 -4
  147. package/dist/components/Switcher/constants.js +0 -8
  148. package/dist/components/Switcher/index.d.ts +0 -3
  149. package/dist/components/Switcher/index.js +0 -6
  150. package/dist/components/Switcher/types.d.ts +0 -30
  151. package/dist/components/TwinSwitcher/TwinSwitcher.d.ts +0 -10
  152. package/dist/components/TwinSwitcher/TwinSwitcher.js +0 -65
  153. package/dist/components/TwinSwitcher/index.d.ts +0 -1
  154. package/dist/components/TwinSwitcher/index.js +0 -4
  155. package/dist/field-bS4z9Sdl.js +0 -12
  156. package/dist/styles.module-B9L4B63y.js +0 -40
  157. package/dist/variant.module-BinTBzAV.js +0 -15
@@ -4,14 +4,14 @@ import * as React from "react";
4
4
  import React__default, { useReducer, useMemo, useSyncExternalStore, useId as useId$1, useEffect, useCallback, useRef, useLayoutEffect, createContext, useContext, useState, Fragment, createRef, forwardRef } from "react";
5
5
  import { ESelectSearchSize } from "./constants.js";
6
6
  import { Icon } from "../../icons/Icon.js";
7
- import { I as Input } from "../../Input-DspsU5F4.js";
7
+ import { I as Input } from "../../Input-ChCIy5oY.js";
8
8
  import { EInputVariant, EInputSize } from "../Input/constants.js";
9
9
  import { n as n$2, u as u$3, d as o$1, s as s$3, o as o$2, p as p$1, t as t$3, e as s$4, W as W$1, y as y$3, T, H, M as M$1, a as u$5, $ as $f7dceffc5ad7768b$export$4e328f61c538687f, b as $6179b936705e76d3$export$ae780daf29e6d456, D as D$2, c as o$3 } from "../../keyboard-B256ZoM-.js";
10
10
  import * as ReactDOM from "react-dom";
11
11
  import { flushSync, createPortal } from "react-dom";
12
12
  import { w } from "../../use-active-press-B6yeSopF.js";
13
13
  import { u as u$4 } from "../../use-by-comparator-BUO78DGe.js";
14
- import { K, a as a$5, b as l$3, T as T$1, z, j as j$1, u as u$6, I as I$1, G } from "../../label-P7Xsi5N7.js";
14
+ import { K, a as a$5, l as l$3, T as T$1, z, j as j$1, u as u$6, I as I$1, G } from "../../label-BTEGh6O_.js";
15
15
  import { A, h as h$1, f as f$6, _ } from "../../focus-management-1rQPII7Z.js";
16
16
  import { T as T$2 } from "../../use-resolve-button-type-B6LE6gU3.js";
17
17
  import { c as c$2, i as i$2, u as u$7, V, A as A$1 } from "../../open-closed-CbXq00et.js";
@@ -3752,36 +3752,35 @@ function No(o2, r2) {
3752
3752
  return H({ ourProps: { id: d2, ref: M2, role: "option", tabIndex: s2 === true ? void 0 : -1, "aria-disabled": s2 === true ? true : void 0, "aria-selected": C, disabled: void 0, onMouseDown: y2, onFocus: A2, onPointerEnter: h2, onMouseEnter: h2, onPointerMove: O, onMouseMove: O, onPointerLeave: G2, onMouseLeave: G2 }, theirProps: a3, slot: J2, defaultTag: ko, name: "Combobox.Option" });
3753
3753
  }
3754
3754
  let Uo = W$1(ho), Ho = W$1(Vo), Go = W$1(Mo), jo = K, zo = W$1(Bo), Ko = W$1(No), Nt = Object.assign(Uo, { Input: Go, Button: Ho, Label: jo, Options: zo, Option: Ko });
3755
- const disabled = "_disabled_a63ul_5";
3756
- const container = "_container_a63ul_9";
3757
- const full = "_full_a63ul_22";
3758
- const button = "_button_a63ul_34";
3759
- const options = "_options_a63ul_52";
3760
- const top = "_top_a63ul_63";
3761
- const bottom = "_bottom_a63ul_68";
3762
- const m = "_m_a63ul_95";
3763
- const l = "_l_a63ul_108";
3764
- const option = "_option_a63ul_52";
3755
+ const disabled = "_disabled_1bdke_5";
3756
+ const container = "_container_1bdke_9";
3757
+ const full = "_full_1bdke_22";
3758
+ const button = "_button_1bdke_30";
3759
+ const options = "_options_1bdke_42";
3760
+ const top = "_top_1bdke_53";
3761
+ const bottom = "_bottom_1bdke_58";
3762
+ const m = "_m_1bdke_85";
3763
+ const l = "_l_1bdke_96";
3764
+ const option = "_option_1bdke_42";
3765
3765
  const cls = {
3766
- "select-search": "_select-search_a63ul_2",
3766
+ "select-search": "_select-search_1bdke_2",
3767
3767
  disabled,
3768
3768
  container,
3769
- "container-open": "_container-open_a63ul_18",
3769
+ "container-open": "_container-open_1bdke_18",
3770
3770
  full,
3771
- "selected-icon": "_selected-icon_a63ul_26",
3772
- "selector-icon-open": "_selector-icon-open_a63ul_30",
3771
+ "selector-icon-open": "_selector-icon-open_1bdke_26",
3773
3772
  button,
3774
- "selector-icon": "_selector-icon_a63ul_30",
3775
3773
  options,
3776
3774
  top,
3777
3775
  bottom,
3778
- "no-options": "_no-options_a63ul_89",
3776
+ "no-options": "_no-options_1bdke_79",
3779
3777
  m,
3780
3778
  l,
3781
- "custom-input-class": "_custom-input-class_a63ul_121",
3779
+ "custom-input-class": "_custom-input-class_1bdke_107",
3782
3780
  option,
3783
- "option-active": "_option-active_a63ul_137",
3784
- "option-inner": "_option-inner_a63ul_140"
3781
+ "option-active": "_option-active_1bdke_123",
3782
+ "option-inner": "_option-inner_1bdke_126",
3783
+ "selected-icon": "_selected-icon_1bdke_133"
3785
3784
  };
3786
3785
  const SelectSearch = forwardRef(
3787
3786
  (props, ref) => {
@@ -3800,11 +3799,9 @@ const SelectSearch = forwardRef(
3800
3799
  variant = EInputVariant.DefaultGray,
3801
3800
  menuPlacement = "bottom",
3802
3801
  disabled: disabled2 = false,
3803
- searchProps,
3804
- withClearButton = false
3802
+ searchProps
3805
3803
  } = props;
3806
- const currentInputValue = String((value == null ? void 0 : value[displayValue]) || "");
3807
- const [inputValue, setInputValue] = useState(currentInputValue);
3804
+ const [inputValue, setInputValue] = useState("");
3808
3805
  const mapSizeToInputSize = (size22) => {
3809
3806
  switch (size22) {
3810
3807
  case ESelectSearchSize.M:
@@ -3844,8 +3841,8 @@ const SelectSearch = forwardRef(
3844
3841
  [onChange, onSearch, value]
3845
3842
  );
3846
3843
  useEffect(() => {
3847
- setInputValue(currentInputValue);
3848
- }, [currentInputValue]);
3844
+ setInputValue(String((value == null ? void 0 : value[displayValue]) ?? ""));
3845
+ }, [displayValue, value]);
3849
3846
  return /* @__PURE__ */ jsx(
3850
3847
  Nt,
3851
3848
  {
@@ -3878,29 +3875,18 @@ const SelectSearch = forwardRef(
3878
3875
  value: inputValue,
3879
3876
  disabled: disabled2,
3880
3877
  variant,
3881
- withClearButton,
3882
- "data-testid": "select-search-input",
3883
3878
  ...searchProps
3884
3879
  }
3885
3880
  ),
3886
- showArrow && /* @__PURE__ */ jsx(
3887
- Ho,
3881
+ showArrow && /* @__PURE__ */ jsx(Ho, { className: cls.button, disabled: disabled2, children: /* @__PURE__ */ jsx(
3882
+ Icon,
3888
3883
  {
3889
- className: classNames(cls.button, {
3890
- [cls.disabled]: disabled2
3891
- }),
3892
- disabled: disabled2,
3893
- children: /* @__PURE__ */ jsx(
3894
- Icon,
3895
- {
3896
- iconName: size2 == ESelectSearchSize.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
3897
- className: classNames(cls["selector-icon"], {
3898
- [cls["selector-icon-open"]]: open
3899
- })
3900
- }
3901
- )
3884
+ iconName: size2 == ESelectSearchSize.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
3885
+ className: classNames(cls["selector-icon"], {
3886
+ [cls["selector-icon-open"]]: open
3887
+ })
3902
3888
  }
3903
- )
3889
+ ) })
3904
3890
  ]
3905
3891
  }
3906
3892
  ),
@@ -3927,7 +3913,6 @@ const SelectSearch = forwardRef(
3927
3913
  ) : /* @__PURE__ */ jsx(
3928
3914
  zo,
3929
3915
  {
3930
- "data-testid": "select-search-options",
3931
3916
  className: classNames(
3932
3917
  cls.options,
3933
3918
  cls[size2],
@@ -3945,7 +3930,6 @@ const SelectSearch = forwardRef(
3945
3930
  [cls["option-active"]]: focus
3946
3931
  }
3947
3932
  ),
3948
- "data-testid": `select-search-option-${item.id}`,
3949
3933
  children: ({ selected }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
3950
3934
  /* @__PURE__ */ jsxs("div", { className: cls["option-inner"], children: [
3951
3935
  item.name,
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ESelectSearchSize } from './constants';
3
- import { TInputProps } from '../Input';
3
+ import { TInputProps, TVariant } from '../Input';
4
4
 
5
5
  export type TSelectOption = {
6
6
  name: string;
@@ -9,7 +9,7 @@ export type TSelectOption = {
9
9
  [index: string]: unknown;
10
10
  };
11
11
  export type TMenuPlacement = 'top' | 'bottom';
12
- export type TSelectSearchProps = Pick<TInputProps, 'withClearButton' | 'variant'> & {
12
+ export type TSelectSearchProps = {
13
13
  /**
14
14
  * Текущее выбранное значение.
15
15
  */
@@ -44,6 +44,8 @@ export type TSelectSearchProps = Pick<TInputProps, 'withClearButton' | 'variant'
44
44
  items: TSelectOption[];
45
45
  /** Класснейм для значения */
46
46
  classNameOption?: string;
47
+ /** Варианты отображения ввода */
48
+ variant?: TVariant;
47
49
  /** Варианты отображения выпадающего меню */
48
50
  menuPlacement?: TMenuPlacement;
49
51
  /** Отключает компонент SelectSearch */
@@ -1,6 +1,5 @@
1
- import { SwiperProps } from 'swiper/react';
2
1
 
3
- type TProps = SwiperProps & {
2
+ type TProps = {
4
3
  /**
5
4
  * Задержка перехода между слайдами
6
5
  */
@@ -31,5 +30,5 @@ type TProps = SwiperProps & {
31
30
  /**
32
31
  * Компонент слайдера c прогресс баром.
33
32
  */
34
- export declare const Slider: ({ images, swiperClassName, slideClassName, imageClassName, delay, ...props }: TProps) => import("react/jsx-runtime").JSX.Element;
33
+ export declare const Slider: ({ images, swiperClassName, slideClassName, imageClassName, delay }: TProps) => import("react/jsx-runtime").JSX.Element;
35
34
  export {};
@@ -300,14 +300,14 @@ import '../../assets/Slider.css';function Autoplay(_ref) {
300
300
  resume
301
301
  });
302
302
  }
303
- const swiper = "_swiper_rfcv9_3";
304
- const slide = "_slide_rfcv9_9";
305
- const link = "_link_rfcv9_16";
306
- const image = "_image_rfcv9_22";
307
- const navigation = "_navigation_rfcv9_29";
308
- const pagination = "_pagination_rfcv9_39";
309
- const slides = "_slides_rfcv9_54";
310
- const separator = "_separator_rfcv9_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,
@@ -318,14 +318,12 @@ const cls = {
318
318
  slides,
319
319
  separator
320
320
  };
321
- const DEFAULT_DELAY = 15e3;
322
321
  const Slider = ({
323
322
  images,
324
323
  swiperClassName,
325
324
  slideClassName,
326
325
  imageClassName,
327
- delay = DEFAULT_DELAY,
328
- ...props
326
+ delay = 3e5
329
327
  }) => {
330
328
  const progressBar = useRef(null);
331
329
  const swiperRef = useRef(null);
@@ -351,10 +349,10 @@ const Slider = ({
351
349
  return /* @__PURE__ */ jsxs(
352
350
  Swiper,
353
351
  {
354
- ...props,
355
352
  ref: swiperRef,
356
353
  className: classNames(cls.swiper, swiperClassName),
357
354
  loop: true,
355
+ centeredSlides: true,
358
356
  autoplay: {
359
357
  delay,
360
358
  disableOnInteraction: false
@@ -43,10 +43,6 @@ export type TProps = TCommonStepsProps & Omit<ComponentProps<'div'>, 'onClick'>
43
43
  * Адаптивный шаг
44
44
  */
45
45
  resizable?: boolean;
46
- /**
47
- * Нужен ли сброс до нулевого значения.
48
- */
49
- needZeroValue?: boolean;
50
46
  /**
51
47
  * Класс для иконки шага
52
48
  */
@@ -31,7 +31,6 @@ const Steps = forwardRef(
31
31
  rootClassName,
32
32
  stepClassName,
33
33
  quantity,
34
- needZeroValue = true,
35
34
  current = ZERO_STEP,
36
35
  editable: editable2 = false,
37
36
  size = EStepsSize.M,
@@ -65,10 +64,7 @@ const Steps = forwardRef(
65
64
  const handleClick = (idx) => {
66
65
  const clickedStep = idx + DIFF_BETWEEN_STEP_AND_INDEX;
67
66
  stepWasChangedRef.current = true;
68
- if (needZeroValue) {
69
- return setStep(clickedStep !== step2 ? clickedStep : ZERO_STEP);
70
- }
71
- setStep(clickedStep);
67
+ setStep(clickedStep !== step2 ? clickedStep : ZERO_STEP);
72
68
  };
73
69
  useEffect(() => {
74
70
  if (stepWasChangedRef.current === true) {
@@ -0,0 +1 @@
1
+
@@ -31,13 +31,5 @@ export type TTabTrailProps = {
31
31
  * Класснейм для TabTrail.
32
32
  */
33
33
  className?: string;
34
- /**
35
- * Индекс выбранного таба.
36
- */
37
- selectedTabIndex?: number;
38
- /**
39
- * Функция обратного вызова при изменении выбранного таба.
40
- */
41
- onTabChange?: (index: number) => void;
42
34
  };
43
35
  export declare const TabTrail: import('react').ForwardRefExoticComponent<TTabTrailProps & import('react').RefAttributes<HTMLElement>>;
@@ -199,18 +199,18 @@ function He(e, r) {
199
199
  return !s2 && ((g = n$1.unmount) == null || g) && !((R = n$1.static) != null && R) ? React__default.createElement(T, { "aria-hidden": "true", ...m2 }) : H({ ourProps: m2, theirProps: n$1, slot: b2, defaultTag: Ge, features: Ue, visible: s2, name: "Tabs.Panel" });
200
200
  }
201
201
  let we = W(ve), Oe = W(Se), Ne = W(Ie), ke = W(Me), Be = W(He), st = Object.assign(we, { Group: Oe, List: Ne, Panels: ke, Panel: Be });
202
- const container = "_container_rlke5_2";
203
- const group = "_group_rlke5_6";
204
- const tab = "_tab_rlke5_16";
205
- const list = "_list_rlke5_51";
206
- const tabs = "_tabs_rlke5_62";
207
- const buttons = "_buttons_rlke5_68";
208
- const m = "_m_rlke5_75";
209
- const s = "_s_rlke5_83";
202
+ const container = "_container_102fh_2";
203
+ const group = "_group_102fh_6";
204
+ const tab = "_tab_102fh_16";
205
+ const list = "_list_102fh_51";
206
+ const tabs = "_tabs_102fh_62";
207
+ const buttons = "_buttons_102fh_68";
208
+ const m = "_m_102fh_75";
209
+ const s = "_s_102fh_83";
210
210
  const cls = {
211
211
  container,
212
212
  group,
213
- "group-inner": "_group-inner_rlke5_9",
213
+ "group-inner": "_group-inner_102fh_9",
214
214
  tab,
215
215
  list,
216
216
  tabs,
@@ -219,39 +219,23 @@ const cls = {
219
219
  s
220
220
  };
221
221
  const TabTrail = forwardRef(
222
- ({
223
- categories,
224
- size = ETabTrailSize.M,
225
- showButtons = true,
226
- className,
227
- selectedTabIndex,
228
- onTabChange
229
- }, ref) => {
230
- const [activeIndex, setActiveIndex] = useState(selectedTabIndex || 0);
222
+ ({ categories, size = ETabTrailSize.M, showButtons = true, className }, ref) => {
223
+ const [activeIndex, setActiveIndex] = useState(0);
231
224
  const tabListRef = useRef(null);
232
- useEffect(() => {
233
- if (selectedTabIndex !== void 0 && selectedTabIndex !== activeIndex) {
234
- setActiveIndex(selectedTabIndex);
235
- }
236
- }, [activeIndex, selectedTabIndex]);
237
- const handleTabChange = (index) => {
238
- setActiveIndex(index);
239
- onTabChange == null ? void 0 : onTabChange(index);
240
- };
241
225
  const handleNext = () => {
242
- const newIndex = (activeIndex + 1) % categories.length;
243
- handleTabChange(newIndex);
226
+ setActiveIndex((prevIndex) => (prevIndex + 1) % categories.length);
244
227
  };
245
228
  const handlePrev = () => {
246
- const newIndex = (activeIndex - 1 + categories.length) % categories.length;
247
- handleTabChange(newIndex);
229
+ setActiveIndex(
230
+ (prevIndex) => (prevIndex - 1 + categories.length) % categories.length
231
+ );
248
232
  };
249
233
  useEffect(() => {
250
234
  var _a;
251
235
  const activeTab = (_a = tabListRef.current) == null ? void 0 : _a.querySelector(
252
236
  `.${cls.tab}[data-active="true"]`
253
237
  );
254
- if (activeTab && typeof activeTab.scrollIntoView === "function") {
238
+ if (activeTab) {
255
239
  activeTab.scrollIntoView({
256
240
  behavior: "smooth",
257
241
  block: "nearest",
@@ -265,7 +249,7 @@ const TabTrail = forwardRef(
265
249
  ref,
266
250
  className: classNames(cls.group, cls[size], className),
267
251
  selectedIndex: activeIndex,
268
- onChange: handleTabChange,
252
+ onChange: setActiveIndex,
269
253
  children: [
270
254
  /* @__PURE__ */ jsxs("div", { className: cls["group-inner"], children: [
271
255
  /* @__PURE__ */ jsx(Ne, { ref: tabListRef, className: cls.list, children: /* @__PURE__ */ jsx("div", { className: cls.tabs, children: categories.map(({ name, notificationCount }, index) => /* @__PURE__ */ jsxs(
@@ -2,12 +2,12 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { c as classNames } from "../../index-CweZ_OcN.js";
3
3
  import { forwardRef } from "react";
4
4
  import { ETagSize, ETagType } from "./constants.js";
5
- import '../../assets/Tag.css';const container = "_container_pnj33_2";
6
- const disabled = "_disabled_pnj33_25";
7
- const inner = "_inner_pnj33_30";
8
- const M = "_M_pnj33_38";
9
- const S = "_S_pnj33_42";
10
- const XS = "_XS_pnj33_50";
5
+ import '../../assets/Tag.css';const container = "_container_ok6fq_2";
6
+ const disabled = "_disabled_ok6fq_25";
7
+ const inner = "_inner_ok6fq_30";
8
+ const M = "_M_ok6fq_38";
9
+ const S = "_S_ok6fq_42";
10
+ const XS = "_XS_ok6fq_50";
11
11
  const cls = {
12
12
  container,
13
13
  disabled,
@@ -0,0 +1 @@
1
+
@@ -5,21 +5,21 @@ import { useAutoResizeTextArea } from "./hooks.js";
5
5
  import { useMergeRefs } from "../../hooks/useMergeRefs/useMergeRefs.js";
6
6
  import { Icon } from "../../icons/Icon.js";
7
7
  import { Button } from "../Button/Button.js";
8
- import { c as cls } from "../../Input-DspsU5F4.js";
8
+ import { c as cls } from "../../Input-ChCIy5oY.js";
9
9
  import { EInputVariant } from "../Input/constants.js";
10
- import '../../assets/TextArea.css';const textarea = "_textarea_1n8kz_2";
11
- const label = "_label_1n8kz_22";
12
- const s = "_s_1n8kz_54";
13
- const m = "_m_1n8kz_62";
14
- const l = "_l_1n8kz_22";
10
+ import '../../assets/TextArea.css';const textarea = "_textarea_1axu4_2";
11
+ const label = "_label_1axu4_22";
12
+ const s = "_s_1axu4_54";
13
+ const m = "_m_1axu4_62";
14
+ const l = "_l_1axu4_22";
15
15
  const textareaCls = {
16
- "textarea-wrapper": "_textarea-wrapper_1n8kz_2",
16
+ "textarea-wrapper": "_textarea-wrapper_1axu4_2",
17
17
  textarea,
18
- "has-label": "_has-label_1n8kz_8",
19
- "required-mark": "_required-mark_1n8kz_11",
18
+ "has-label": "_has-label_1axu4_8",
19
+ "required-mark": "_required-mark_1axu4_11",
20
20
  label,
21
- "has-left-slot": "_has-left-slot_1n8kz_37",
22
- "active-label": "_active-label_1n8kz_40",
21
+ "has-left-slot": "_has-left-slot_1axu4_37",
22
+ "active-label": "_active-label_1axu4_40",
23
23
  s,
24
24
  m,
25
25
  l
@@ -65,7 +65,6 @@ const TextArea = memo(
65
65
  variant = EInputVariant.DefaultGray,
66
66
  autofocus,
67
67
  readonly,
68
- status,
69
68
  id,
70
69
  onFocus,
71
70
  onBlur,
@@ -146,7 +145,7 @@ const TextArea = memo(
146
145
  cls.input,
147
146
  mods,
148
147
  className,
149
- [cls[variant], textareaCls[size], cls[size], cls[status ?? ""]]
148
+ [cls[variant], textareaCls[size], cls[size]]
150
149
  );
151
150
  return /* @__PURE__ */ jsxs(
152
151
  "div",
@@ -155,7 +154,6 @@ const TextArea = memo(
155
154
  cls["input-wrapper"],
156
155
  textareaCls["textarea-wrapper"],
157
156
  cls[variant],
158
- cls[status ?? ""],
159
157
  textareaCls[size],
160
158
  cls[size],
161
159
  {
@@ -2,10 +2,6 @@ import { useCallback } from "react";
2
2
  const useAutoResizeTextArea = (textArea) => {
3
3
  return useCallback(() => {
4
4
  if (textArea) {
5
- if (!textArea.value.length) {
6
- textArea.style.height = "auto";
7
- return;
8
- }
9
5
  textArea.style.height = "var(--textarea-height)";
10
6
  const scrollHeight = textArea.scrollHeight;
11
7
  textArea.style.height = `${scrollHeight}px`;
@@ -0,0 +1 @@
1
+
@@ -2,7 +2,7 @@ import { jsxs } from "react/jsx-runtime";
2
2
  import { c as classNames } from "../../index-CweZ_OcN.js";
3
3
  import { memo } from "react";
4
4
  import { useTimer } from "../../hooks/useTimer/index.js";
5
- import '../../assets/Timer.css';const timer = "_timer_un9th_3";
5
+ import '../../assets/Timer.css';const timer = "_timer_llwad_3";
6
6
  const cls = {
7
7
  timer
8
8
  };
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "../../index-CweZ_OcN.js";
3
3
  import "react";
4
4
  import "./constants.js";
5
- import { P } from "../../ProgressBar-DWKyrXzd.js";
5
+ import { P } from "../../ProgressBar-CwLwhaeM.js";
6
6
  export {
7
7
  P as ProgressBar
8
8
  };
@@ -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-DWKyrXzd.js";
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-DWKyrXzd.js";
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-DWKyrXzd.js";
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);
@@ -0,0 +1 @@
1
+
@@ -1,21 +1,13 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { c as classNames } from "../../index-CweZ_OcN.js";
3
- import { forwardRef, useState, useEffect, useMemo } from "react";
3
+ import { forwardRef, useState, useEffect } from "react";
4
4
  import { imageTypes } from "./constants.js";
5
5
  import { ListFiles } from "../ListFiles/ListFiles.js";
6
6
  import { ListPhotos } from "../ListPhotos/ListPhotos.js";
7
+ import { imageFileTypes } from "../Uploader/constants.js";
7
8
  import { Uploader } from "../Uploader/Uploader.js";
8
9
  import '../../assets/UploaderPhotos.css';const cls = {
9
- "upload-file-wrapper": "_upload-file-wrapper_1a115_2"
10
- };
11
- const isImageFile = (file) => {
12
- if ("file" in file && file.file instanceof File) {
13
- return imageTypes.includes(file.file.type);
14
- }
15
- if ("type" in file && typeof file.type === "string") {
16
- return imageTypes.includes(file.type);
17
- }
18
- return false;
10
+ "upload-file-wrapper": "_upload-file-wrapper_2zki8_2"
19
11
  };
20
12
  const UniversalUploader = forwardRef(
21
13
  (props, ref) => {
@@ -38,6 +30,24 @@ const UniversalUploader = forwardRef(
38
30
  setItems(value);
39
31
  }
40
32
  }, [value]);
33
+ const isImageFile = (file) => {
34
+ var _a;
35
+ if (!file) return false;
36
+ if (file instanceof File) {
37
+ return imageTypes.includes(file.type);
38
+ }
39
+ if ("file" in file && file.file instanceof File) {
40
+ return imageTypes.includes(file.file.type);
41
+ }
42
+ if ("url" in file && typeof file.url === "string") {
43
+ if (file.url.startsWith("blob:")) {
44
+ return typeof file.type === "string" && imageTypes.includes(file.type);
45
+ }
46
+ const extension = (_a = file.url.split(".").pop()) == null ? void 0 : _a.toLowerCase();
47
+ return imageFileTypes.includes(extension);
48
+ }
49
+ return false;
50
+ };
41
51
  const onChangeValue = (e) => {
42
52
  const newItems = e.value.map((el) => {
43
53
  if (isImageFile(el.file)) {
@@ -65,14 +75,6 @@ const UniversalUploader = forwardRef(
65
75
  setItems((prev) => prev.filter((item) => item.id !== deleteId));
66
76
  onChange == null ? void 0 : onChange({ type: "delete", data: deleteId });
67
77
  };
68
- const { photos, files } = useMemo(() => {
69
- const getFiles = () => items.filter((item) => !isImageFile(item));
70
- const getPhotos = () => items.filter(isImageFile);
71
- if (type === "all") return { files: getFiles(), photos: getPhotos() };
72
- if (type === "files") return { photos: [], files: getFiles() };
73
- if (type === "photos") return { files: [], photos: getPhotos() };
74
- return { files: [], photos: [] };
75
- }, [items, type]);
76
78
  return /* @__PURE__ */ jsxs(
77
79
  "div",
78
80
  {
@@ -94,8 +96,20 @@ const UniversalUploader = forwardRef(
94
96
  titleUploader
95
97
  }
96
98
  ),
97
- (type === "files" || type === "all") && /* @__PURE__ */ jsx(ListFiles, { value: files, onChange: (j) => onDelete(j.deleteId) }),
98
- (type === "photos" || type === "all") && /* @__PURE__ */ jsx(ListPhotos, { value: photos, onChange: (j) => onDelete(j.deleteId) })
99
+ (type === "files" || type === "all") && /* @__PURE__ */ jsx(
100
+ ListFiles,
101
+ {
102
+ value: items.filter((item) => !isImageFile(item)),
103
+ onChange: (j) => onDelete(j.deleteId)
104
+ }
105
+ ),
106
+ (type === "photos" || type === "all") && /* @__PURE__ */ jsx(
107
+ ListPhotos,
108
+ {
109
+ value: items.filter((item) => isImageFile(item)),
110
+ onChange: (j) => onDelete(j.deleteId)
111
+ }
112
+ )
99
113
  ]
100
114
  }
101
115
  );
@@ -3,9 +3,9 @@ import { forwardRef, useRef, useId } from "react";
3
3
  import { Icon } from "../../icons/Icon.js";
4
4
  import { Button } from "../Button/Button.js";
5
5
  import '../../assets/Uploader.css';const cls = {
6
- "upload-file-wrapper": "_upload-file-wrapper_bplvw_2",
7
- "upload-text": "_upload-text_bplvw_25",
8
- "upload-file-input": "_upload-file-input_bplvw_35"
6
+ "upload-file-wrapper": "_upload-file-wrapper_n3hxs_2",
7
+ "upload-text": "_upload-text_n3hxs_25",
8
+ "upload-file-input": "_upload-file-input_n3hxs_35"
9
9
  };
10
10
  const MIME = {
11
11
  jpeg: "image/jpeg",
@@ -4,7 +4,7 @@ import { forwardRef, useState, useEffect } from "react";
4
4
  import { ListFiles } from "../ListFiles/ListFiles.js";
5
5
  import { Uploader } from "../Uploader/Uploader.js";
6
6
  import '../../assets/UploaderPhotos.css';const cls = {
7
- "upload-file-wrapper": "_upload-file-wrapper_1a115_2"
7
+ "upload-file-wrapper": "_upload-file-wrapper_2zki8_2"
8
8
  };
9
9
  const UploaderFiles = forwardRef(
10
10
  (props, ref) => {