mimir-ui-kit 1.34.2 → 1.34.3

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-ChCIy5oY.js → Input-DspsU5F4.js} +27 -23
  2. package/dist/{ProgressBar-CwLwhaeM.js → ProgressBar-DWKyrXzd.js} +23 -23
  3. package/dist/assets/Accordion.css +1 -1
  4. package/dist/assets/AccordionItem.css +1 -1
  5. package/dist/assets/Avatar.css +1 -0
  6. package/dist/assets/Button.css +1 -1
  7. package/dist/assets/CheckboxMimir.css +1 -1
  8. package/dist/assets/Chip.css +1 -1
  9. package/dist/assets/Drawer.css +1 -1
  10. package/dist/assets/GosZnak.css +1 -0
  11. package/dist/assets/Input.css +1 -1
  12. package/dist/assets/InputPassword.css +1 -1
  13. package/dist/assets/InputRangeSlider.css +1 -0
  14. package/dist/assets/Link.css +1 -1
  15. package/dist/assets/ListFiles.css +1 -1
  16. package/dist/assets/ListPhotos.css +1 -1
  17. package/dist/assets/MergedButton.css +1 -1
  18. package/dist/assets/NotificationBadge.css +1 -1
  19. package/dist/assets/OtpInput.css +1 -1
  20. package/dist/assets/Pagination.css +1 -1
  21. package/dist/assets/ProgressBar2.css +1 -1
  22. package/dist/assets/RadioGroup.css +1 -1
  23. package/dist/assets/SelectSearch.css +1 -1
  24. package/dist/assets/SkeletonCircle.css +1 -0
  25. package/dist/assets/SkeletonText.css +1 -0
  26. package/dist/assets/Slider.css +1 -1
  27. package/dist/assets/Switcher.css +1 -0
  28. package/dist/assets/TabTrail.css +1 -1
  29. package/dist/assets/Tag.css +1 -1
  30. package/dist/assets/TextArea.css +1 -1
  31. package/dist/assets/Timer.css +1 -1
  32. package/dist/assets/TwinSwitcher.css +1 -0
  33. package/dist/assets/Uploader.css +1 -1
  34. package/dist/assets/UploaderPhotos.css +1 -1
  35. package/dist/assets/Vote.css +1 -1
  36. package/dist/assets/index.css +1 -1
  37. package/dist/assets/styles.css +1 -1
  38. package/dist/assets/variant.css +1 -0
  39. package/dist/components/Accordion/Accordion.js +24 -16
  40. package/dist/components/Accordion/AccordionItem/AccordionItem.js +3 -3
  41. package/dist/components/AnchorLink/Link.js +9 -9
  42. package/dist/components/Avatar/Avatar.d.ts +3 -0
  43. package/dist/components/Avatar/Avatar.js +62 -0
  44. package/dist/components/Avatar/constants.d.ts +5 -0
  45. package/dist/components/Avatar/constants.js +9 -0
  46. package/dist/components/Avatar/index.d.ts +3 -0
  47. package/dist/components/Avatar/index.js +6 -0
  48. package/dist/components/Avatar/types.d.ts +10 -0
  49. package/dist/components/Button/Button.js +33 -33
  50. package/dist/components/CheckboxMimir/CheckboxMimir.js +16 -19
  51. package/dist/components/Chip/Chip.js +12 -12
  52. package/dist/components/DatePicker/DatePicker.d.ts +36 -18
  53. package/dist/components/DatePicker/DatePicker.js +46 -6
  54. package/dist/components/DatePicker/DatePickerModal.js +78 -62
  55. package/dist/components/DatePicker/MonthPickerModal.js +14 -6
  56. package/dist/components/DatePicker/YearPickerModal.js +2 -2
  57. package/dist/components/DatePicker/utils.d.ts +2 -0
  58. package/dist/components/DatePicker/utils.js +16 -0
  59. package/dist/components/Drawer/Drawer.d.ts +1 -1
  60. package/dist/components/Drawer/Drawer.js +20 -20
  61. package/dist/components/GosZnak/GosZnak.d.ts +4 -0
  62. package/dist/components/GosZnak/GosZnak.js +76 -0
  63. package/dist/components/GosZnak/constants.d.ts +11 -0
  64. package/dist/components/GosZnak/constants.js +17 -0
  65. package/dist/components/GosZnak/index.d.ts +3 -0
  66. package/dist/components/GosZnak/index.js +7 -0
  67. package/dist/components/GosZnak/types.d.ts +26 -0
  68. package/dist/components/Input/Input.d.ts +5 -1
  69. package/dist/components/Input/Input.js +1 -1
  70. package/dist/components/Input/constants.d.ts +5 -3
  71. package/dist/components/Input/constants.js +7 -3
  72. package/dist/components/Input/index.d.ts +2 -2
  73. package/dist/components/Input/index.js +3 -2
  74. package/dist/components/Input/types.d.ts +2 -6
  75. package/dist/components/InputPassword/InputPassword.js +8 -8
  76. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  77. package/dist/components/InputRangeSlider/InputRangeSlider.d.ts +3 -0
  78. package/dist/components/InputRangeSlider/InputRangeSlider.js +219 -0
  79. package/dist/components/InputRangeSlider/constants.d.ts +10 -0
  80. package/dist/components/InputRangeSlider/constants.js +18 -0
  81. package/dist/components/InputRangeSlider/index.d.ts +3 -0
  82. package/dist/components/InputRangeSlider/index.js +7 -0
  83. package/dist/components/InputRangeSlider/types.d.ts +33 -0
  84. package/dist/components/ListFiles/ListFiles.js +7 -7
  85. package/dist/components/ListPhotos/ListPhotos.js +4 -4
  86. package/dist/components/MergedButton/MergedButton.js +6 -6
  87. package/dist/components/NotificationBadge/NotificationBadge.js +4 -4
  88. package/dist/components/OtpInput/OtpInput.js +5 -5
  89. package/dist/components/Pagination/Pagination.d.ts +1 -3
  90. package/dist/components/Pagination/Pagination.js +7 -11
  91. package/dist/components/RadioGroup/RadioGroup.js +9 -9
  92. package/dist/components/SelectSearch/SelectSearch.d.ts +18 -2
  93. package/dist/components/SelectSearch/SelectSearch.js +47 -31
  94. package/dist/components/SelectSearch/types.d.ts +2 -4
  95. package/dist/components/Skeleton/SkeletonBrick/SkeletonBrick.d.ts +12 -0
  96. package/dist/components/Skeleton/SkeletonBrick/SkeletonBrick.js +34 -0
  97. package/dist/components/Skeleton/SkeletonCircle/SkeletonCircle.d.ts +9 -0
  98. package/dist/components/Skeleton/SkeletonCircle/SkeletonCircle.js +31 -0
  99. package/dist/components/Skeleton/SkeletonText/SkeletonText.d.ts +10 -0
  100. package/dist/components/Skeleton/SkeletonText/SkeletonText.js +49 -0
  101. package/dist/components/Skeleton/constants.d.ts +5 -0
  102. package/dist/components/Skeleton/constants.js +9 -0
  103. package/dist/components/Skeleton/index.d.ts +4 -0
  104. package/dist/components/Skeleton/index.js +10 -0
  105. package/dist/components/Slider/Slider.d.ts +3 -2
  106. package/dist/components/Slider/Slider.js +12 -10
  107. package/dist/components/Steps/Steps.d.ts +4 -0
  108. package/dist/components/Steps/Steps.js +5 -1
  109. package/dist/components/Switcher/Switcher.d.ts +3 -0
  110. package/dist/components/Switcher/Switcher.js +118 -0
  111. package/dist/components/Switcher/constants.d.ts +4 -0
  112. package/dist/components/Switcher/constants.js +8 -0
  113. package/dist/components/Switcher/index.d.ts +3 -0
  114. package/dist/components/Switcher/index.js +6 -0
  115. package/dist/components/Switcher/types.d.ts +30 -0
  116. package/dist/components/TabTrail/TabTrail.d.ts +8 -0
  117. package/dist/components/TabTrail/TabTrail.js +33 -17
  118. package/dist/components/Tag/Tag.js +6 -6
  119. package/dist/components/TextArea/TextArea.js +14 -12
  120. package/dist/components/TextArea/hooks.js +4 -0
  121. package/dist/components/Timer/Timer.js +1 -1
  122. package/dist/components/Toasts/ProgressBar.js +1 -1
  123. package/dist/components/Toasts/Toast.js +1 -1
  124. package/dist/components/Toasts/ToastList.js +1 -1
  125. package/dist/components/Toasts/ToastsProvider.js +1 -1
  126. package/dist/components/TwinSwitcher/TwinSwitcher.d.ts +10 -0
  127. package/dist/components/TwinSwitcher/TwinSwitcher.js +65 -0
  128. package/dist/components/TwinSwitcher/index.d.ts +1 -0
  129. package/dist/components/TwinSwitcher/index.js +4 -0
  130. package/dist/components/UniversalUploader/UniversalUploader.js +21 -35
  131. package/dist/components/Uploader/Uploader.js +3 -3
  132. package/dist/components/UploaderFiles/UploaderFiles.js +1 -1
  133. package/dist/components/UploaderPhotos/UploaderPhotos.js +1 -1
  134. package/dist/components/Vote/Vote.d.ts +8 -0
  135. package/dist/components/Vote/Vote.js +6 -4
  136. package/dist/components/index.d.ts +14 -2
  137. package/dist/components/index.js +31 -2
  138. package/dist/field-bS4z9Sdl.js +12 -0
  139. package/dist/icons/Icon.js +1 -1
  140. package/dist/index.js +31 -2
  141. package/dist/{label-BTEGh6O_.js → label-P7Xsi5N7.js} +2 -2
  142. package/dist/styles.module-B9L4B63y.js +40 -0
  143. package/dist/variant.module-BinTBzAV.js +15 -0
  144. package/package.json +1 -1
  145. package/dist/components/Button/types.js +0 -1
  146. package/dist/components/Input/types.js +0 -1
  147. package/dist/components/NotificationBadge/types.js +0 -1
  148. package/dist/components/Pagination/types.js +0 -1
  149. package/dist/components/SelectSearch/types.js +0 -1
  150. package/dist/components/Steps/types.js +0 -1
  151. package/dist/components/Tag/types.js +0 -1
  152. package/dist/components/TextArea/types.js +0 -1
  153. package/dist/components/Toasts/types.js +0 -1
  154. package/dist/components/UniversalUploader/types.js +0 -1
  155. package/dist/components/Vote/types.js +0 -1
  156. package/dist/icons/components/types.js +0 -1
  157. package/dist/styles.module-Ugsf0AOb.js +0 -38
@@ -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_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";
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";
210
210
  const cls = {
211
211
  container,
212
212
  group,
213
- "group-inner": "_group-inner_102fh_9",
213
+ "group-inner": "_group-inner_rlke5_9",
214
214
  tab,
215
215
  list,
216
216
  tabs,
@@ -219,23 +219,39 @@ const cls = {
219
219
  s
220
220
  };
221
221
  const TabTrail = forwardRef(
222
- ({ categories, size = ETabTrailSize.M, showButtons = true, className }, ref) => {
223
- const [activeIndex, setActiveIndex] = useState(0);
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);
224
231
  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
+ };
225
241
  const handleNext = () => {
226
- setActiveIndex((prevIndex) => (prevIndex + 1) % categories.length);
242
+ const newIndex = (activeIndex + 1) % categories.length;
243
+ handleTabChange(newIndex);
227
244
  };
228
245
  const handlePrev = () => {
229
- setActiveIndex(
230
- (prevIndex) => (prevIndex - 1 + categories.length) % categories.length
231
- );
246
+ const newIndex = (activeIndex - 1 + categories.length) % categories.length;
247
+ handleTabChange(newIndex);
232
248
  };
233
249
  useEffect(() => {
234
250
  var _a;
235
251
  const activeTab = (_a = tabListRef.current) == null ? void 0 : _a.querySelector(
236
252
  `.${cls.tab}[data-active="true"]`
237
253
  );
238
- if (activeTab) {
254
+ if (activeTab && typeof activeTab.scrollIntoView === "function") {
239
255
  activeTab.scrollIntoView({
240
256
  behavior: "smooth",
241
257
  block: "nearest",
@@ -249,7 +265,7 @@ const TabTrail = forwardRef(
249
265
  ref,
250
266
  className: classNames(cls.group, cls[size], className),
251
267
  selectedIndex: activeIndex,
252
- onChange: setActiveIndex,
268
+ onChange: handleTabChange,
253
269
  children: [
254
270
  /* @__PURE__ */ jsxs("div", { className: cls["group-inner"], children: [
255
271
  /* @__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_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";
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";
11
11
  const cls = {
12
12
  container,
13
13
  disabled,
@@ -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-ChCIy5oY.js";
8
+ import { c as cls } from "../../Input-DspsU5F4.js";
9
9
  import { EInputVariant } from "../Input/constants.js";
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";
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";
15
15
  const textareaCls = {
16
- "textarea-wrapper": "_textarea-wrapper_1axu4_2",
16
+ "textarea-wrapper": "_textarea-wrapper_1n8kz_2",
17
17
  textarea,
18
- "has-label": "_has-label_1axu4_8",
19
- "required-mark": "_required-mark_1axu4_11",
18
+ "has-label": "_has-label_1n8kz_8",
19
+ "required-mark": "_required-mark_1n8kz_11",
20
20
  label,
21
- "has-left-slot": "_has-left-slot_1axu4_37",
22
- "active-label": "_active-label_1axu4_40",
21
+ "has-left-slot": "_has-left-slot_1n8kz_37",
22
+ "active-label": "_active-label_1n8kz_40",
23
23
  s,
24
24
  m,
25
25
  l
@@ -65,6 +65,7 @@ const TextArea = memo(
65
65
  variant = EInputVariant.DefaultGray,
66
66
  autofocus,
67
67
  readonly,
68
+ status,
68
69
  id,
69
70
  onFocus,
70
71
  onBlur,
@@ -145,7 +146,7 @@ const TextArea = memo(
145
146
  cls.input,
146
147
  mods,
147
148
  className,
148
- [cls[variant], textareaCls[size], cls[size]]
149
+ [cls[variant], textareaCls[size], cls[size], cls[status ?? ""]]
149
150
  );
150
151
  return /* @__PURE__ */ jsxs(
151
152
  "div",
@@ -154,6 +155,7 @@ const TextArea = memo(
154
155
  cls["input-wrapper"],
155
156
  textareaCls["textarea-wrapper"],
156
157
  cls[variant],
158
+ cls[status ?? ""],
157
159
  textareaCls[size],
158
160
  cls[size],
159
161
  {
@@ -2,6 +2,10 @@ 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
+ }
5
9
  textArea.style.height = "var(--textarea-height)";
6
10
  const scrollHeight = textArea.scrollHeight;
7
11
  textArea.style.height = `${scrollHeight}px`;
@@ -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_llwad_3";
5
+ import '../../assets/Timer.css';const timer = "_timer_un9th_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-CwLwhaeM.js";
5
+ import { P } from "../../ProgressBar-DWKyrXzd.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-CwLwhaeM.js";
5
+ import { c as cls, P as ProgressBar } from "../../ProgressBar-DWKyrXzd.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-CwLwhaeM.js";
5
+ import { c as cls } from "../../ProgressBar-DWKyrXzd.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-CwLwhaeM.js";
6
+ import { c as cls } from "../../ProgressBar-DWKyrXzd.js";
7
7
  import { ToastList } from "./ToastList.js";
8
8
  const ToastProvider = ({ children }) => {
9
9
  const [toasts, dispatch] = useReducer(reducer, initialState);
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ import { TSwitcherProps } from '../Switcher';
3
+
4
+ type TProps = TSwitcherProps & {
5
+ leftIcon: ReactNode;
6
+ rightIcon: ReactNode;
7
+ className?: string;
8
+ };
9
+ export declare const TwinSwitcher: import('react').ForwardRefExoticComponent<TProps & import('react').RefAttributes<HTMLButtonElement>>;
10
+ export {};
@@ -0,0 +1,65 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { c as classNames } from "../../index-CweZ_OcN.js";
3
+ import { forwardRef } from "react";
4
+ import { Switcher } from "../Switcher/Switcher.js";
5
+ import '../../assets/TwinSwitcher.css';const icon = "_icon_1r3h0_30";
6
+ const cls = {
7
+ "twin-switcher": "_twin-switcher_1r3h0_2",
8
+ "twin-switcher-checked": "_twin-switcher-checked_1r3h0_18",
9
+ "twin-switcher-thumb": "_twin-switcher-thumb_1r3h0_27",
10
+ "twin-switcher-checked-thumb": "_twin-switcher-checked-thumb_1r3h0_27",
11
+ icon,
12
+ "left-icon": "_left-icon_1r3h0_43",
13
+ "right-icon": "_right-icon_1r3h0_46"
14
+ };
15
+ const TwinSwitcher = forwardRef(
16
+ ({
17
+ id,
18
+ checked,
19
+ leftIcon,
20
+ rightIcon,
21
+ disabled = false,
22
+ className,
23
+ ...props
24
+ }, ref) => {
25
+ return /* @__PURE__ */ jsxs(
26
+ Switcher,
27
+ {
28
+ ...props,
29
+ id: `twin-switcher-${id}`,
30
+ ref,
31
+ checked,
32
+ disabled,
33
+ className: classNames(cls["twin-switcher"], className, {
34
+ [cls["twin-switcher-checked"]]: checked
35
+ }),
36
+ switcherThumbClassName: classNames(cls["twin-switcher-thumb"], {
37
+ [cls["twin-switcher-checked-thumb"]]: checked
38
+ }),
39
+ children: [
40
+ /* @__PURE__ */ jsx(
41
+ "span",
42
+ {
43
+ className: classNames(cls.icon, cls["left-icon"], {
44
+ [cls["icon-visible"]]: !checked
45
+ }),
46
+ children: leftIcon
47
+ }
48
+ ),
49
+ /* @__PURE__ */ jsx(
50
+ "span",
51
+ {
52
+ className: classNames(cls.icon, cls["right-icon"], {
53
+ [cls["icon-visible"]]: checked
54
+ }),
55
+ children: rightIcon
56
+ }
57
+ )
58
+ ]
59
+ }
60
+ );
61
+ }
62
+ );
63
+ export {
64
+ TwinSwitcher
65
+ };
@@ -0,0 +1 @@
1
+ export { TwinSwitcher } from './TwinSwitcher';
@@ -0,0 +1,4 @@
1
+ import { TwinSwitcher } from "./TwinSwitcher.js";
2
+ export {
3
+ TwinSwitcher
4
+ };
@@ -1,13 +1,21 @@
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 } from "react";
3
+ import { forwardRef, useState, useEffect, useMemo } 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";
8
7
  import { Uploader } from "../Uploader/Uploader.js";
9
8
  import '../../assets/UploaderPhotos.css';const cls = {
10
- "upload-file-wrapper": "_upload-file-wrapper_2zki8_2"
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;
11
19
  };
12
20
  const UniversalUploader = forwardRef(
13
21
  (props, ref) => {
@@ -30,24 +38,6 @@ const UniversalUploader = forwardRef(
30
38
  setItems(value);
31
39
  }
32
40
  }, [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
- };
51
41
  const onChangeValue = (e) => {
52
42
  const newItems = e.value.map((el) => {
53
43
  if (isImageFile(el.file)) {
@@ -75,6 +65,14 @@ const UniversalUploader = forwardRef(
75
65
  setItems((prev) => prev.filter((item) => item.id !== deleteId));
76
66
  onChange == null ? void 0 : onChange({ type: "delete", data: deleteId });
77
67
  };
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]);
78
76
  return /* @__PURE__ */ jsxs(
79
77
  "div",
80
78
  {
@@ -96,20 +94,8 @@ const UniversalUploader = forwardRef(
96
94
  titleUploader
97
95
  }
98
96
  ),
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
- )
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) })
113
99
  ]
114
100
  }
115
101
  );
@@ -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_n3hxs_2",
7
- "upload-text": "_upload-text_n3hxs_25",
8
- "upload-file-input": "_upload-file-input_n3hxs_35"
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"
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_2zki8_2"
7
+ "upload-file-wrapper": "_upload-file-wrapper_1a115_2"
8
8
  };
9
9
  const UploaderFiles = forwardRef(
10
10
  (props, ref) => {
@@ -4,7 +4,7 @@ import { forwardRef, useState, useEffect } from "react";
4
4
  import { ListPhotos } from "../ListPhotos/ListPhotos.js";
5
5
  import { Uploader } from "../Uploader/Uploader.js";
6
6
  import '../../assets/UploaderPhotos.css';const cls = {
7
- "upload-file-wrapper": "_upload-file-wrapper_2zki8_2"
7
+ "upload-file-wrapper": "_upload-file-wrapper_1a115_2"
8
8
  };
9
9
  const UploaderPhotos = forwardRef(
10
10
  (props, ref) => {
@@ -65,6 +65,10 @@ export type TProps = TCommonVoteProps & {
65
65
  * Адаптивный шаг
66
66
  */
67
67
  resizable?: boolean;
68
+ /**
69
+ * Нужен ли сброс до нулевого значения.
70
+ */
71
+ needZeroValue?: boolean;
68
72
  /**
69
73
  * Класс для иконки шага
70
74
  */
@@ -145,6 +149,10 @@ export declare const Vote: import('react').ForwardRefExoticComponent<TCommonVote
145
149
  * Адаптивный шаг
146
150
  */
147
151
  resizable?: boolean;
152
+ /**
153
+ * Нужен ли сброс до нулевого значения.
154
+ */
155
+ needZeroValue?: boolean;
148
156
  /**
149
157
  * Класс для иконки шага
150
158
  */
@@ -4,9 +4,9 @@ import { forwardRef, useState, useEffect } from "react";
4
4
  import { DEFAULT_TITLE, EVoteSize, ZERO_VALUE } from "./constants.js";
5
5
  import { Steps } from "../Steps/Steps.js";
6
6
  import { ZERO_STEP, StepSize } from "../Steps/constants.js";
7
- import '../../assets/Vote.css';const container = "_container_1akd9_2";
8
- const title = "_title_1akd9_9";
9
- const score = "_score_1akd9_16";
7
+ import '../../assets/Vote.css';const container = "_container_17n0d_2";
8
+ const title = "_title_17n0d_9";
9
+ const score = "_score_17n0d_16";
10
10
  const cls = {
11
11
  container,
12
12
  title,
@@ -21,6 +21,7 @@ const Vote = forwardRef((props, ref) => {
21
21
  stepsStepClassName,
22
22
  title: title2 = DEFAULT_TITLE,
23
23
  withoutTitle = false,
24
+ needZeroValue = true,
24
25
  quantity,
25
26
  current = ZERO_STEP,
26
27
  size = EVoteSize.M,
@@ -51,7 +52,7 @@ const Vote = forwardRef((props, ref) => {
51
52
  }, [score2, zones, unselectedColor, isZeroStep]);
52
53
  const handleStepsClick = (step) => {
53
54
  setScore(step);
54
- onClick && onClick(step);
55
+ onClick == null ? void 0 : onClick(step);
55
56
  };
56
57
  const handleHoverStepEnter = (step) => {
57
58
  setHoveredScore(step + 1);
@@ -98,6 +99,7 @@ const Vote = forwardRef((props, ref) => {
98
99
  size: EVoteSize.L,
99
100
  current: score2,
100
101
  editable: true,
102
+ needZeroValue,
101
103
  resizable,
102
104
  disabled,
103
105
  onClick: handleStepsClick,
@@ -1,6 +1,6 @@
1
1
  export { Button, EButtonForm, EButtonSize, EButtonVariantDefault, EButtonVariantRound, EButtonVariantOutline, EButtonVariantBorderless, type TButtonProps } from './Button';
2
- export { Input, EInputSize, EInputVariant } from './Input';
3
- export type { TInputProps, TSize, TVariant } from './Input';
2
+ export { Input, EInputSize, EInputVariant, EInputStatus } from './Input';
3
+ export type { TInputProps, TSize, TVariant, TStatus } from './Input';
4
4
  export { TextArea } from './TextArea';
5
5
  export type { TTextAreaProps } from './TextArea';
6
6
  export { InputPassword } from './InputPassword';
@@ -44,3 +44,15 @@ export { ENotificationBadgeSize } from './NotificationBadge';
44
44
  export { Chip, EChipSize, EChipVariant } from './Chip';
45
45
  export { UniversalUploader, EUploaderType } from './UniversalUploader';
46
46
  export type { TUniversalUploader, TOnChangeUpdate, TPhotoWithType, TFileWithType } from './UniversalUploader';
47
+ export { InputRangeSlider, EInputRangeSliderBorderState, EInputRangeSliderPositions } from './InputRangeSlider';
48
+ export type { TInputRangeSliderProps } from './InputRangeSlider';
49
+ export { GosZnak } from './GosZnak';
50
+ export { EGosZnakSize, EGosZnakType } from './GosZnak';
51
+ export type { TGosZnakProps } from './GosZnak';
52
+ export { Switcher } from './Switcher';
53
+ export { ELabelPositions } from './Switcher';
54
+ export type { TSwitcherProps } from './Switcher';
55
+ export { TwinSwitcher } from './TwinSwitcher';
56
+ export { ESkeletonVariant, SkeletonBrick, SkeletonCircle, SkeletonText } from './Skeleton';
57
+ export { Avatar, EAvatarSize } from './Avatar';
58
+ export type { TAvatarProps, TAvatarSize } from './Avatar';
@@ -1,7 +1,7 @@
1
1
  import { Button } from "./Button/Button.js";
2
2
  import { EButtonForm, EButtonSize, EButtonVariantBorderless, EButtonVariantDefault, EButtonVariantOutline, EButtonVariantRound } from "./Button/constants.js";
3
- import { I } from "../Input-ChCIy5oY.js";
4
- import { EInputSize, EInputVariant } from "./Input/constants.js";
3
+ import { I } from "../Input-DspsU5F4.js";
4
+ import { EInputSize, EInputStatus, EInputVariant } from "./Input/constants.js";
5
5
  import { TextArea } from "./TextArea/TextArea.js";
6
6
  import { InputPassword } from "./InputPassword/InputPassword.js";
7
7
  import { InputPhoneNumber } from "./InputPhoneNumber/InputPhoneNumber.js";
@@ -45,15 +45,30 @@ import { Chip } from "./Chip/Chip.js";
45
45
  import { EChipSize, EChipVariant } from "./Chip/constants.js";
46
46
  import { UniversalUploader } from "./UniversalUploader/UniversalUploader.js";
47
47
  import { EUploaderType } from "./UniversalUploader/constants.js";
48
+ import { InputRangeSlider } from "./InputRangeSlider/InputRangeSlider.js";
49
+ import { EInputRangeSliderBorderState, EInputRangeSliderPositions } from "./InputRangeSlider/constants.js";
50
+ import { GosZnak } from "./GosZnak/GosZnak.js";
51
+ import { EGosZnakSize, EGosZnakType } from "./GosZnak/constants.js";
52
+ import { Switcher } from "./Switcher/Switcher.js";
53
+ import { ELabelPositions } from "./Switcher/constants.js";
54
+ import { TwinSwitcher } from "./TwinSwitcher/TwinSwitcher.js";
55
+ import { SkeletonBrick } from "./Skeleton/SkeletonBrick/SkeletonBrick.js";
56
+ import { SkeletonText } from "./Skeleton/SkeletonText/SkeletonText.js";
57
+ import { SkeletonCircle } from "./Skeleton/SkeletonCircle/SkeletonCircle.js";
58
+ import { ESkeletonVariant } from "./Skeleton/constants.js";
59
+ import { Avatar } from "./Avatar/Avatar.js";
60
+ import { EAvatarSize } from "./Avatar/constants.js";
48
61
  export {
49
62
  Accordion,
50
63
  AccordionItem,
64
+ Avatar,
51
65
  Button,
52
66
  CheckboxMimir,
53
67
  Chip,
54
68
  DatePicker,
55
69
  Drawer,
56
70
  EAccordionSize,
71
+ EAvatarSize,
57
72
  EButtonForm,
58
73
  EButtonSize,
59
74
  EButtonVariantBorderless,
@@ -63,13 +78,20 @@ export {
63
78
  EChipSize,
64
79
  EChipVariant,
65
80
  EDrawerPosition,
81
+ EGosZnakSize,
82
+ EGosZnakType,
83
+ EInputRangeSliderBorderState,
84
+ EInputRangeSliderPositions,
66
85
  EInputSize,
86
+ EInputStatus,
67
87
  EInputVariant,
88
+ ELabelPositions,
68
89
  ELinkSize,
69
90
  ELinkVariant,
70
91
  EMergedButtonVariantRound,
71
92
  ENotificationBadgeSize,
72
93
  ESelectSearchSize,
94
+ ESkeletonVariant,
73
95
  EStepColor,
74
96
  EStepsSize,
75
97
  ETabTrailSize,
@@ -79,10 +101,12 @@ export {
79
101
  EToastVariant,
80
102
  EUploaderType,
81
103
  EVoteSize,
104
+ GosZnak,
82
105
  AppImage as Image,
83
106
  I as Input,
84
107
  InputPassword,
85
108
  InputPhoneNumber,
109
+ InputRangeSlider,
86
110
  Link,
87
111
  Loader,
88
112
  MergedButton,
@@ -91,13 +115,18 @@ export {
91
115
  Pagination,
92
116
  RadioGroup,
93
117
  SelectSearch,
118
+ SkeletonBrick,
119
+ SkeletonCircle,
120
+ SkeletonText,
94
121
  Slider,
95
122
  Steps,
123
+ Switcher,
96
124
  TabTrail,
97
125
  Tag,
98
126
  TextArea,
99
127
  Timer,
100
128
  ToastProvider,
129
+ TwinSwitcher,
101
130
  UniversalUploader,
102
131
  Uploader,
103
132
  UploaderPhotos,
@@ -0,0 +1,12 @@
1
+ import React__default, { useId, useMemo } from "react";
2
+ import { z, U, a, l, f, W as W$1 } from "./label-P7Xsi5N7.js";
3
+ import { W, H as H$1 } from "./keyboard-B256ZoM-.js";
4
+ let A = "div";
5
+ function L(d, l$1) {
6
+ let t = `headlessui-control-${useId()}`, [s, p] = z(), [n, a$1] = U(), m = a(), { disabled: e = m || false, ...o } = d, i = useMemo(() => ({ disabled: e }), [e]);
7
+ return React__default.createElement(l, { value: e }, React__default.createElement(p, { value: s }, React__default.createElement(a$1, { value: n }, React__default.createElement(f, { id: t }, H$1({ ourProps: { ref: l$1, disabled: e || void 0, "aria-disabled": e || void 0 }, theirProps: { ...o, children: React__default.createElement(W$1, null, typeof o.children == "function" ? o.children(i) : o.children) }, slot: i, defaultTag: A, name: "Field" })))));
8
+ }
9
+ let H = W(L);
10
+ export {
11
+ H
12
+ };
@@ -6,7 +6,7 @@ const Icon = ({ iconName, ...props }) => {
6
6
  if (!Component) {
7
7
  return null;
8
8
  }
9
- return /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Component, { ...props }) });
9
+ return /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Component, { ...props, "data-testid": iconName }) });
10
10
  };
11
11
  export {
12
12
  Icon