mimir-ui-kit 1.37.5 → 1.37.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  import { jsx as s, jsxs as _, Fragment as z } from "react/jsx-runtime";
2
2
  import { c as i } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as K, useState as D, useMemo as U, useCallback as W, useEffect as R } from "react";
3
+ import { forwardRef as K, useState as D, useMemo as U, useCallback as R, useEffect as $ } from "react";
4
4
  import { ESelectSearchSize as v } from "./constants.js";
5
- import { mapSizeToInputSize as q, getDropdownArrowIcon as $ } from "./utils.js";
6
- import { Icon as A } from "../../icons/Icon.js";
7
- import { Button as J } from "../Button/Button.js";
8
- import { I as O } from "../../Input-BYrIS5GU.js";
9
- import { EInputVariant as Q } from "../Input/constants.js";
10
- import { H as X, U as B, G as M, K as Y, W as Z } from "../../combobox-CDU06zJj.js";
5
+ import { mapSizeToInputSize as j, getDropdownArrowIcon as J } from "./utils.js";
6
+ import { Icon as q } from "../../icons/Icon.js";
7
+ import { Button as Q } from "../Button/Button.js";
8
+ import { I as A } from "../../Input-BYrIS5GU.js";
9
+ import { EInputVariant as W } from "../Input/constants.js";
10
+ import { H as X, U as O, G as B, K as Y, j as Z } from "../../combobox-BpYucpxz.js";
11
11
  import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_container_rphak_9", oe = "_full_rphak_22", ae = "_button_rphak_34", ne = "_options_rphak_48", se = "_top_rphak_59", re = "_bottom_rphak_64", ie = "_m_rphak_91", le = "_l_rphak_106", ce = "_option_rphak_48", pe = "_clear_rphak_160", e = {
12
12
  "select-search": "_select-search_rphak_2",
13
13
  disabled: ee,
@@ -34,7 +34,7 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
34
34
  clear: pe,
35
35
  "icon-button": "_icon-button_rphak_169"
36
36
  }, ge = K(
37
- (j, E) => {
37
+ (M, E) => {
38
38
  const {
39
39
  placeholder: g,
40
40
  size: r = v.L,
@@ -47,18 +47,18 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
47
47
  displayValue: G = "name",
48
48
  filterOnSearch: w = !0,
49
49
  onSearch: m,
50
- variant: C = Q.DefaultGray,
50
+ variant: C = W.DefaultGray,
51
51
  menuPlacement: b = "bottom",
52
52
  disabled: l = !1,
53
53
  searchProps: I,
54
54
  withClearButton: f = !1,
55
55
  disableInput: c = !1,
56
56
  autocomplete: S = "on"
57
- } = j, k = String((a == null ? void 0 : a[G]) || ""), [p, u] = D(k), [N, h] = D(a), y = U(() => !w || a && (a.id || a.name) ? d : p.trim().toLowerCase() ? d.filter(
57
+ } = M, k = String((a == null ? void 0 : a[G]) || ""), [p, u] = D(k), [N, h] = D(a), y = U(() => !w || a && (a.id || a.name) ? d : p.trim().toLowerCase() ? d.filter(
58
58
  (o) => o.name.toLowerCase().includes(p.toLowerCase())
59
59
  ) : d, [p, d, a, w]), P = (o) => {
60
60
  o ? (u(o.name), h(o), n == null || n(o)) : (u(""), h(null), n == null || n({ id: "", name: "" }));
61
- }, x = W(
61
+ }, x = R(
62
62
  (o) => {
63
63
  if (c) return;
64
64
  const t = o.target.value;
@@ -68,7 +68,7 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
68
68
  ), T = () => {
69
69
  u(""), h(null), n == null || n({ id: "", name: "" });
70
70
  };
71
- return R(() => {
71
+ return $(() => {
72
72
  const o = !a || typeof a == "object" && !Object.keys(a).length;
73
73
  u(o ? "" : k), h(o ? null : a);
74
74
  }, [a, k]), /* @__PURE__ */ s(
@@ -93,12 +93,12 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
93
93
  }),
94
94
  children: [
95
95
  c && /* @__PURE__ */ _("div", { style: { position: "relative", width: "100%" }, children: [
96
- /* @__PURE__ */ s(B, { disabled: l, style: { width: "100%" }, children: /* @__PURE__ */ s(
97
- M,
96
+ /* @__PURE__ */ s(O, { disabled: l, style: { width: "100%" }, children: /* @__PURE__ */ s(
97
+ B,
98
98
  {
99
- as: O,
99
+ as: A,
100
100
  label: g,
101
- size: q(r),
101
+ size: j(r),
102
102
  className: i(e["select-input"], {
103
103
  [e["select-input-disabled"]]: c && f
104
104
  }),
@@ -114,14 +114,14 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
114
114
  },
115
115
  rightAddon: {
116
116
  addonType: "icon",
117
- addonContent: $(o, r)
117
+ addonContent: J(o, r)
118
118
  },
119
119
  autocomplete: S,
120
120
  ...I
121
121
  }
122
122
  ) }),
123
123
  f && p && /* @__PURE__ */ s(
124
- J,
124
+ Q,
125
125
  {
126
126
  tabIndex: -1,
127
127
  className: i(e.clear, {
@@ -142,11 +142,11 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
142
142
  )
143
143
  ] }),
144
144
  !c && /* @__PURE__ */ s(
145
- M,
145
+ B,
146
146
  {
147
- as: O,
147
+ as: A,
148
148
  label: g,
149
- size: q(r),
149
+ size: j(r),
150
150
  className: e["select-input"],
151
151
  onChange: x,
152
152
  value: p,
@@ -159,14 +159,14 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
159
159
  rightAddon: {
160
160
  addonType: "react-node",
161
161
  addonContent: V && /* @__PURE__ */ s(
162
- B,
162
+ O,
163
163
  {
164
164
  className: i(e.button, {
165
165
  [e.disabled]: l
166
166
  }),
167
167
  disabled: l,
168
168
  children: /* @__PURE__ */ s(
169
- A,
169
+ q,
170
170
  {
171
171
  iconName: r == v.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
172
172
  className: i(e["selector-icon"], {
@@ -215,7 +215,7 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
215
215
  t.bottom && /* @__PURE__ */ s("div", { children: t.bottom })
216
216
  ] }),
217
217
  N && N.id === t.id && /* @__PURE__ */ s(
218
- A,
218
+ q,
219
219
  {
220
220
  iconName: r === v.M ? "Done16px" : "Done24px",
221
221
  className: e["selected-icon"]
@@ -1,9 +1,9 @@
1
1
  import { jsxs as L, jsx as N } from "react/jsx-runtime";
2
- import { H as te } from "../../field-FJ34aSs4.js";
3
- import { K as I, w as re, z as se, U as ae, u as ce, a as le, b as oe, T as ie, I as ne, G as ue, j as he, p as me } from "../../label-y3ANLTNC.js";
4
- import { W as de, H as j, y as pe, p as fe, o as $, $ as be, b as we, D as _e, c as H } from "../../keyboard-B0lm_zyn.js";
2
+ import { H as te } from "../../field-C1kt7aNM.js";
3
+ import { K as I, w as re, z as se, U as ae, u as ce, a as le, b as oe, T as ie, I as ne, G as ue, j as he, p as me } from "../../label-D4GFpe5F.js";
4
+ import { W as de, H as j, y as pe, p as fe, o as $, $ as be, b as we, D as _e, c as H } from "../../keyboard-mgWkd2Vh.js";
5
5
  import u, { createContext as $e, useState as x, useMemo as G, useId as ge, useContext as ve, useRef as ke, useCallback as xe, Fragment as ye, forwardRef as Pe } from "react";
6
- import { w as Ce } from "../../use-active-press-86hajhdd.js";
6
+ import { w as Ce } from "../../use-active-press-CqLGIFz7.js";
7
7
  import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
8
8
  import { r as Fe } from "../../bugs-diTMAGNw.js";
9
9
  import { c as g } from "../../index-DIxK0V-G.js";
@@ -1,8 +1,10 @@
1
1
  import { FC } from 'react';
2
+ import { ETabTrailButtonVariant } from './constants';
2
3
 
3
4
  type TProps = {
4
5
  handleNextTab: () => void;
5
6
  handlePrevTab: () => void;
7
+ buttonsVariant?: ETabTrailButtonVariant | `${ETabTrailButtonVariant}`;
6
8
  };
7
9
  export declare const TabButtons: FC<TProps>;
8
10
  export {};
@@ -1,29 +1,33 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { memo as a, useMemo as u } from "react";
3
- import { ETabTrailIconName as r, ETabTrailButtonVariant as n } from "./constants.js";
4
- import { MergedButton as c } from "../../MergedButton/MergedButton.js";
5
- const p = a(
6
- ({ handleNextTab: o, handlePrevTab: t }) => {
7
- const i = u(
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { memo as c, useMemo as e } from "react";
3
+ import { ETabTrailIconName as m, ETabTrailButtonVariant as u } from "./constants.js";
4
+ import { MergedButton as a } from "../../MergedButton/MergedButton.js";
5
+ const I = c(
6
+ ({
7
+ handleNextTab: t,
8
+ handlePrevTab: r,
9
+ buttonsVariant: o = u.WHITE
10
+ }) => {
11
+ const i = e(
8
12
  () => [
9
13
  {
10
14
  isIconButton: !0,
11
- iconName: r.LEFT,
12
- variant: n.WHITE,
13
- onClick: t
15
+ iconName: m.LEFT,
16
+ variant: o,
17
+ onClick: r
14
18
  },
15
19
  {
16
20
  isIconButton: !0,
17
- iconName: r.RIGHT,
18
- variant: n.WHITE,
19
- onClick: o
21
+ iconName: m.RIGHT,
22
+ variant: o,
23
+ onClick: t
20
24
  }
21
25
  ],
22
- [t, o]
26
+ [r, t, o]
23
27
  );
24
- return /* @__PURE__ */ m(c, { buttons: i });
28
+ return /* @__PURE__ */ n(a, { buttons: i });
25
29
  }
26
30
  );
27
31
  export {
28
- p as TabButtons
32
+ I as TabButtons
29
33
  };
@@ -1,4 +1,5 @@
1
1
  import { ETabTrailSize } from './constants';
2
+ import { ETabTrailButtonVariant } from './TabButtons/constants';
2
3
 
3
4
  export type TCategoryTab = {
4
5
  /**
@@ -39,5 +40,9 @@ export type TTabTrailProps = {
39
40
  * Функция обратного вызова при изменении выбранного таба.
40
41
  */
41
42
  onTabChange?: (index: number) => void;
43
+ /**
44
+ * Вариант кнопок навигации
45
+ */
46
+ buttonsVariant?: ETabTrailButtonVariant | `${ETabTrailButtonVariant}`;
42
47
  };
43
48
  export declare const TabTrail: import('react').ForwardRefExoticComponent<TTabTrailProps & import('react').RefAttributes<HTMLElement>>;