mimir-ui-kit 1.38.6 → 1.38.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. package/dist/{combobox-DgSZTriw.js → combobox-CVtJDVoZ.js} +251 -254
  2. package/dist/components/Accordion/Accordion.d.ts +1 -1
  3. package/dist/components/Accordion/Accordion.js +3 -3
  4. package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
  5. package/dist/components/Dropdown/Dropdown.js +32 -32
  6. package/dist/components/MultiSelectSearch/MultiSelectSearch.d.ts +1 -0
  7. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +175 -157
  8. package/dist/components/MultiSelectSearch/constants.d.ts +3 -0
  9. package/dist/components/MultiSelectSearch/constants.js +6 -2
  10. package/dist/components/MultiSelectSearch/types.d.ts +4 -0
  11. package/dist/components/MultiSelectSearch/utils.d.ts +1 -0
  12. package/dist/components/MultiSelectSearch/utils.js +19 -14
  13. package/dist/components/RadioGroup/RadioGroup.js +3 -3
  14. package/dist/components/SelectSearch/SelectSearch.js +21 -21
  15. package/dist/components/Slider/Slider.d.ts +21 -8
  16. package/dist/components/Slider/Slider.js +388 -383
  17. package/dist/components/Switcher/Switcher.js +4 -4
  18. package/dist/components/TabTrail/TabTrail.js +4 -4
  19. package/dist/{field-C1kt7aNM.js → field-FJ34aSs4.js} +2 -2
  20. package/dist/{focus-management-BtPpk3D1.js → focus-management-DE4t_lW3.js} +1 -1
  21. package/dist/{hidden-PvGXrYUY.js → hidden-DbgtYPOH.js} +1 -1
  22. package/dist/{keyboard-mgWkd2Vh.js → keyboard-B0lm_zyn.js} +111 -114
  23. package/dist/{label-D4GFpe5F.js → label-y3ANLTNC.js} +2 -2
  24. package/dist/open-closed-CdldUPoq.js +86 -0
  25. package/dist/portal-WDFNoIMz.js +1908 -0
  26. package/dist/{use-active-press-CqLGIFz7.js → use-active-press-86hajhdd.js} +1 -1
  27. package/package.json +1 -1
  28. package/dist/open-closed-D2VjDhAN.js +0 -86
  29. package/dist/portal-DPqg52FR.js +0 -1946
@@ -1,13 +1,13 @@
1
1
  import { jsx as a, jsxs as m, Fragment as D } from "react/jsx-runtime";
2
2
  import { c as l } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as U, useState as j, useMemo as R, useCallback as $, useEffect as J } from "react";
3
+ import { forwardRef as U, useState as q, useMemo as W, useCallback as R, useEffect as $ } from "react";
4
4
  import { ESelectSearchSize as g } from "./constants.js";
5
- import { mapSizeToInputSize as q, getDropdownArrowIcon as Q } from "./utils.js";
6
- import { Icon as A } from "../../icons/Icon.js";
7
- import { Button as W } from "../Button/Button.js";
8
- import { I as O } from "../../Input-BYrIS5GU.js";
5
+ import { mapSizeToInputSize as A, getDropdownArrowIcon as J } from "./utils.js";
6
+ import { Icon as O } from "../../icons/Icon.js";
7
+ import { Button as Q } from "../Button/Button.js";
8
+ import { I as B } from "../../Input-BYrIS5GU.js";
9
9
  import { EInputVariant as X } from "../Input/constants.js";
10
- import { H as Y, U as B, G as M, K as Z, j as ee } from "../../combobox-DgSZTriw.js";
10
+ import { H as Y, U as M, G as j, K as Z, W as ee } from "../../combobox-CVtJDVoZ.js";
11
11
  import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_container_1bph7_13", ne = "_full_1bph7_28", se = "_button_1bph7_40", ae = "_options_1bph7_54", ie = "_top_1bph7_65", le = "_bottom_1bph7_71", re = "_m_1bph7_98", ce = "_l_1bph7_113", de = "_option_1bph7_54", pe = "_clear_1bph7_167", e = {
12
12
  "select-search": "_select-search_1bph7_2",
13
13
  disabled: te,
@@ -55,11 +55,11 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
55
55
  disableInput: c = !1,
56
56
  autocomplete: k = "on",
57
57
  immediate: P = !1
58
- } = E, N = String((n == null ? void 0 : n[G]) || ""), [d, u] = j(N), [v, h] = j(n), x = R(() => !I || n && (n.id || n.name) ? p : d.trim().toLowerCase() ? p.filter(
58
+ } = E, N = String((n == null ? void 0 : n[G]) || ""), [d, u] = q(N), [v, h] = q(n), x = W(() => !I || n && (n.id || n.name) ? p : d.trim().toLowerCase() ? p.filter(
59
59
  (t) => t.name.toLowerCase().includes(d.toLowerCase())
60
60
  ) : p, [d, p, n, I]), T = (t) => {
61
61
  t ? (u(t.name), h(t), s == null || s(t)) : (u(""), h(null), s == null || s({ id: "", name: "" }));
62
- }, z = $(
62
+ }, z = R(
63
63
  (t) => {
64
64
  if (c) return;
65
65
  const o = t.target.value;
@@ -69,7 +69,7 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
69
69
  ), H = () => {
70
70
  u(""), h(null), s == null || s({ id: "", name: "" });
71
71
  };
72
- return J(() => {
72
+ return $(() => {
73
73
  const t = !n || typeof n == "object" && !Object.keys(n).length;
74
74
  u(t ? "" : N), h(t ? null : n);
75
75
  }, [n, N]), /* @__PURE__ */ a(
@@ -95,12 +95,12 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
95
95
  }),
96
96
  children: [
97
97
  c && /* @__PURE__ */ m("div", { style: { position: "relative", width: "100%" }, children: [
98
- /* @__PURE__ */ a(B, { disabled: r, style: { width: "100%" }, children: /* @__PURE__ */ a(
99
- M,
98
+ /* @__PURE__ */ a(M, { disabled: r, style: { width: "100%" }, children: /* @__PURE__ */ a(
99
+ j,
100
100
  {
101
- as: O,
101
+ as: B,
102
102
  label: w,
103
- size: q(i),
103
+ size: A(i),
104
104
  className: l(e["select-input"], {
105
105
  [e["select-input-disabled"]]: c && f
106
106
  }),
@@ -116,14 +116,14 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
116
116
  },
117
117
  rightAddon: {
118
118
  addonType: "icon",
119
- addonContent: Q(t, i)
119
+ addonContent: J(t, i)
120
120
  },
121
121
  autocomplete: k,
122
122
  ...y
123
123
  }
124
124
  ) }),
125
125
  f && d && /* @__PURE__ */ a(
126
- W,
126
+ Q,
127
127
  {
128
128
  tabIndex: -1,
129
129
  className: l(e.clear, {
@@ -144,11 +144,11 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
144
144
  )
145
145
  ] }),
146
146
  !c && /* @__PURE__ */ a(
147
- M,
147
+ j,
148
148
  {
149
- as: O,
149
+ as: B,
150
150
  label: w,
151
- size: q(i),
151
+ size: A(i),
152
152
  className: e["select-input"],
153
153
  onChange: z,
154
154
  value: d,
@@ -161,14 +161,14 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
161
161
  rightAddon: C ? {
162
162
  addonType: "react-node",
163
163
  addonContent: C && /* @__PURE__ */ a(
164
- B,
164
+ M,
165
165
  {
166
166
  className: l(e.button, {
167
167
  [e.disabled]: r
168
168
  }),
169
169
  disabled: r,
170
170
  children: /* @__PURE__ */ a(
171
- A,
171
+ O,
172
172
  {
173
173
  iconName: i == g.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
174
174
  className: l(e["selector-icon"], {
@@ -217,7 +217,7 @@ import '../../assets/SelectSearch.css';const te = "_disabled_1bph7_6", oe = "_co
217
217
  o.bottom && /* @__PURE__ */ a("div", { children: o.bottom })
218
218
  ] }),
219
219
  v && v.id === o.id && /* @__PURE__ */ a(
220
- A,
220
+ O,
221
221
  {
222
222
  iconName: i === g.M ? "Done16px" : "Done24px",
223
223
  className: e["selected-icon"]
@@ -2,6 +2,13 @@ import { ReactNode } from 'react';
2
2
  import { SwiperProps } from 'swiper/react';
3
3
  import { EProgressBarPosition } from './constants';
4
4
 
5
+ type TSlideImage = {
6
+ image?: string;
7
+ imageDesktop?: string;
8
+ imageMobile?: string;
9
+ url?: string;
10
+ id?: number;
11
+ };
5
12
  type TProps = SwiperProps & {
6
13
  /**
7
14
  * Задержка перехода между слайдами
@@ -11,6 +18,14 @@ type TProps = SwiperProps & {
11
18
  * Ширина пагинации слайдера на весь размер родительского контейнера
12
19
  */
13
20
  isFullPaginationWidth?: boolean;
21
+ /**
22
+ * Показывать стрелки навигации и количество слайдов.
23
+ */
24
+ needNavigation?: boolean;
25
+ /**
26
+ * Функция, которая будет вызвана при клике на слайд.
27
+ */
28
+ onSlideClick?: VoidFunction;
14
29
  /**
15
30
  * Положение прогресс бара.
16
31
  */
@@ -35,16 +50,14 @@ type TProps = SwiperProps & {
35
50
  * Дополнительные классы для картинок
36
51
  */
37
52
  imageClassName?: string;
53
+ /**
54
+ * Контент для слайдера.
55
+ */
56
+ children?: ReactNode | ((props: TSlideImage) => ReactNode);
38
57
  /**
39
58
  * Массив данных для отрисовки слайдов.
40
59
  */
41
- images?: {
42
- image?: string;
43
- imageDesktop?: string;
44
- imageMobile?: string;
45
- url?: string;
46
- id?: number;
47
- }[];
60
+ images?: TSlideImage[];
48
61
  };
49
- export default function Slider({ images, swiperClassName, slideClassName, imageClassName, progressBarPosition, isFullPaginationWidth, leftDescription, rightDescription, delay, ...props }: TProps): import("react/jsx-runtime").JSX.Element;
62
+ export default function Slider({ images, children, onSlideClick, swiperClassName, slideClassName, imageClassName, progressBarPosition, isFullPaginationWidth, needNavigation, leftDescription, rightDescription, delay, ...props }: TProps): import("react/jsx-runtime").JSX.Element;
50
63
  export {};