mimir-ui-kit 1.36.5 → 1.36.6

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/{Input-CxcCZOIp.js → Input-WnjLXNpw.js} +84 -82
  2. package/dist/{combobox-CDU06zJj.js → combobox-BpYucpxz.js} +1121 -1080
  3. package/dist/components/Accordion/Accordion.js +15 -15
  4. package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
  5. package/dist/components/DatePicker/DatePicker.js +1 -1
  6. package/dist/components/Input/Input.js +1 -1
  7. package/dist/components/Input/index.js +1 -1
  8. package/dist/components/InputPassword/InputPassword.js +1 -1
  9. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  10. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +22 -22
  11. package/dist/components/MultiSelectSearch/utils.js +1 -1
  12. package/dist/components/OtpInput/OtpInput.js +1 -1
  13. package/dist/components/RadioGroup/RadioGroup.js +3 -3
  14. package/dist/components/SelectSearch/SelectSearch.js +27 -27
  15. package/dist/components/SelectSearch/utils.js +1 -1
  16. package/dist/components/Switcher/Switcher.js +4 -4
  17. package/dist/components/TabTrail/TabTrail.js +4 -4
  18. package/dist/components/TextArea/TextArea.js +1 -1
  19. package/dist/components/index.js +1 -1
  20. package/dist/{field-FJ34aSs4.js → field-C1kt7aNM.js} +2 -2
  21. package/dist/{focus-management-XwV-9qkO.js → focus-management-DOYCPyGg.js} +1 -1
  22. package/dist/{hidden-DbgtYPOH.js → hidden-PvGXrYUY.js} +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/{keyboard-B0lm_zyn.js → keyboard-mgWkd2Vh.js} +114 -111
  25. package/dist/{label-y3ANLTNC.js → label-D4GFpe5F.js} +2 -2
  26. package/dist/open-closed-D2VjDhAN.js +86 -0
  27. package/dist/{use-active-press-86hajhdd.js → use-active-press-CqLGIFz7.js} +1 -1
  28. package/package.json +1 -1
  29. package/dist/open-closed-CdldUPoq.js +0 -86
@@ -1,6 +1,6 @@
1
- import { jsxs as B, jsx as o, Fragment as X } from "react/jsx-runtime";
2
- import { c as r } from "./index-DIxK0V-G.js";
3
- import { memo as Y, forwardRef as Z, useState as R, useRef as $, useEffect as ee } from "react";
1
+ import { jsxs as B, jsx as c, Fragment as Y } from "react/jsx-runtime";
2
+ import { c as o } from "./index-DIxK0V-G.js";
3
+ import { memo as Z, forwardRef as $, useState as R, useRef as ee, useEffect as z } from "react";
4
4
  import { EInputVariant as te } from "./components/Input/constants.js";
5
5
  import { useMergeRefs as se } from "./hooks/useMergeRefs/useMergeRefs.js";
6
6
  import { Icon as ae } from "./icons/Icon.js";
@@ -29,20 +29,20 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
29
29
  success: pe,
30
30
  alarm: me,
31
31
  error: be
32
- }, z = (t) => {
33
- var p, n;
32
+ }, L = (t) => {
33
+ var p, a;
34
34
  if (!t)
35
35
  return null;
36
36
  switch (t.addonType) {
37
37
  case "icon": {
38
- const m = (p = t.addonContent) == null ? void 0 : p.includes("16px"), h = (n = t.addonContent) == null ? void 0 : n.includes("24px");
39
- return /* @__PURE__ */ o(
38
+ const m = (p = t.addonContent) == null ? void 0 : p.includes("16px"), g = (a = t.addonContent) == null ? void 0 : a.includes("24px");
39
+ return /* @__PURE__ */ c(
40
40
  ae,
41
41
  {
42
42
  style: {
43
- "--icon-size": r({
43
+ "--icon-size": o({
44
44
  "16px": m,
45
- "24px": h
45
+ "24px": g
46
46
  })
47
47
  },
48
48
  className: e["addon-icon"],
@@ -53,88 +53,90 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
53
53
  case "text":
54
54
  return t.addonContent;
55
55
  case "react-node":
56
- return /* @__PURE__ */ o(X, { children: t.addonContent });
56
+ return /* @__PURE__ */ c(Y, { children: t.addonContent });
57
57
  default:
58
58
  return null;
59
59
  }
60
- }, fe = Y(
61
- Z(
60
+ }, fe = Z(
61
+ $(
62
62
  (t, p) => {
63
63
  const {
64
- value: n,
64
+ value: a,
65
65
  className: m,
66
- wrapperClassName: h,
67
- rightSlotClassName: L,
68
- requiredMarkClassName: j,
66
+ wrapperClassName: g,
67
+ rightSlotClassName: j,
68
+ requiredMarkClassName: D,
69
69
  variant: A = te.DefaultGray,
70
- type: D = "text",
71
- autofocus: g,
72
- readonly: c,
70
+ type: E = "text",
71
+ autofocus: N,
72
+ readonly: n,
73
73
  id: F,
74
- onFocus: N,
75
- onBlur: x,
74
+ onFocus: x,
75
+ onBlur: y,
76
76
  label: u,
77
- withClearButton: E,
77
+ withClearButton: M,
78
78
  disabled: s,
79
79
  onChange: i,
80
- rightAddon: M,
80
+ rightAddon: O,
81
81
  status: V,
82
- leftAddon: O,
83
- size: y = "m",
84
- numbersOnly: S,
85
- required: C,
86
- maxLength: v,
87
- ...T
88
- } = t, [_, w] = R(g), [b, I] = R(!!n), d = $(null), G = se(d, p);
89
- ee(() => {
90
- g && w(!0);
91
- }, [g]);
92
- const P = (a) => {
93
- const l = a.currentTarget.value;
94
- x == null || x(a), w(!1), I(!!l);
95
- }, W = (a) => {
96
- c || (w(!0), N == null || N(a));
97
- }, H = () => {
98
- d != null && d.current && (d.current.value = "", d.current.focus(), I(!1), i == null || i({
82
+ leftAddon: S,
83
+ size: C = "m",
84
+ numbersOnly: T,
85
+ required: v,
86
+ maxLength: w,
87
+ ...G
88
+ } = t, [_, I] = R(N), [b, f] = R(!!a), d = ee(null), P = se(d, p);
89
+ z(() => {
90
+ N && I(!0);
91
+ }, [N]), z(() => {
92
+ f(!!a);
93
+ }, [a]);
94
+ const W = (l) => {
95
+ const r = l.currentTarget.value;
96
+ y == null || y(l), I(!1), f(!!r);
97
+ }, H = (l) => {
98
+ n || (I(!0), x == null || x(l));
99
+ }, J = () => {
100
+ d != null && d.current && (d.current.value = "", d.current.focus(), f(!1), i == null || i({
99
101
  target: { value: "" }
100
102
  }));
101
- }, J = (a) => {
102
- let l = a.target.value;
103
- S && (l = l.replace(/\D/g, "")), v !== void 0 && (l = l.slice(0, v)), a.target.value = l, i == null || i(a), I(!!l);
104
- }, f = z(O), k = z(M), K = {
105
- [e.readonly]: s || c,
103
+ }, K = (l) => {
104
+ let r = l.target.value;
105
+ T && (r = r.replace(/\D/g, "")), w !== void 0 && (r = r.slice(0, w)), l.target.value = r, i == null || i(l), f(!!r);
106
+ }, h = L(S), k = L(O), Q = {
107
+ [e.readonly]: s || n,
106
108
  [e.focused]: _,
107
- [e.disabled]: s || c,
109
+ [e.disabled]: s || n,
108
110
  [e["has-label"]]: !!u,
109
- [e["has-left-slot"]]: !!f,
111
+ [e["has-left-slot"]]: !!h,
110
112
  [e["has-right-slot"]]: !!k
111
- }, q = _ || b || !!n, Q = r(e.label, m, e[y], {
113
+ }, q = _ || b || !!a, U = o(e.label, m, e[C], {
112
114
  [e["active-label"]]: q,
113
- [e.disabled]: s || c,
114
- [e["has-left-slot"]]: !!f
115
- }), U = r(e.input, K, m, [
115
+ [e.disabled]: s || n,
116
+ [e["has-left-slot"]]: !!h
117
+ }), X = o(e.input, Q, m, [
116
118
  e[A],
117
119
  e[V ?? ""],
118
- e[y]
120
+ e[C]
119
121
  ]);
120
122
  return /* @__PURE__ */ B(
121
123
  "div",
122
124
  {
123
- className: r(
125
+ className: o(
124
126
  e["input-wrapper"],
125
127
  e[A],
126
128
  e[V ?? ""],
127
- e[y],
129
+ e[C],
128
130
  {
129
- [e.disabled]: s || c,
131
+ [e.disabled]: s || n,
130
132
  [e.focused]: _
131
133
  },
132
- h
134
+ g
133
135
  ),
134
136
  children: [
135
- u && /* @__PURE__ */ B("label", { htmlFor: F, className: Q, children: [
137
+ u && /* @__PURE__ */ B("label", { htmlFor: F, className: U, children: [
136
138
  u,
137
- C && (b || _) && /* @__PURE__ */ o(
139
+ v && (b || _) && /* @__PURE__ */ c(
138
140
  "span",
139
141
  {
140
142
  className: e["required-mark"],
@@ -142,39 +144,39 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
142
144
  }
143
145
  )
144
146
  ] }),
145
- f && /* @__PURE__ */ o(
147
+ h && /* @__PURE__ */ c(
146
148
  "span",
147
149
  {
148
- className: r(e["left-slot"], {
150
+ className: o(e["left-slot"], {
149
151
  [e.focused]: q,
150
152
  [e["has-label"]]: !!u,
151
153
  [e.disabled]: s
152
154
  }),
153
- children: f
155
+ children: h
154
156
  }
155
157
  ),
156
- /* @__PURE__ */ o(
158
+ /* @__PURE__ */ c(
157
159
  "input",
158
160
  {
159
- ref: G,
160
- type: D,
161
+ ref: P,
162
+ type: E,
161
163
  id: F,
162
- className: U,
163
- onFocus: W,
164
- onBlur: P,
165
- readOnly: c,
166
- value: n,
167
- onChange: J,
168
- maxLength: v,
164
+ className: X,
165
+ onFocus: H,
166
+ onBlur: W,
167
+ readOnly: n,
168
+ value: a,
169
+ onChange: K,
170
+ maxLength: w,
169
171
  disabled: s,
170
- required: C,
171
- ...T
172
+ required: v,
173
+ ...G
172
174
  }
173
175
  ),
174
- k && /* @__PURE__ */ o(
176
+ k && /* @__PURE__ */ c(
175
177
  "span",
176
178
  {
177
- className: r(e["right-slot"], L, {
179
+ className: o(e["right-slot"], j, {
178
180
  [e.focused]: q,
179
181
  [e["has-label"]]: !!u,
180
182
  [e.disabled]: s
@@ -182,30 +184,30 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
182
184
  children: k
183
185
  }
184
186
  ),
185
- C && !b && !_ && /* @__PURE__ */ o(
187
+ v && !b && !_ && /* @__PURE__ */ c(
186
188
  "span",
187
189
  {
188
- className: r(
190
+ className: o(
189
191
  e["required-mark"],
190
- j
192
+ D
191
193
  ),
192
194
  "data-testid": "required-mark"
193
195
  }
194
196
  ),
195
- E && b && /* @__PURE__ */ o(
197
+ M && b && /* @__PURE__ */ c(
196
198
  le,
197
199
  {
198
200
  tabIndex: -1,
199
- className: r(e.clear, {
201
+ className: o(e.clear, {
200
202
  [e.disabled]: s
201
203
  }),
202
204
  isIconButton: !0,
203
205
  iconName: "Close16px",
204
206
  size: "m-s",
205
207
  clear: !0,
206
- disabled: s || c,
208
+ disabled: s || n,
207
209
  variant: "secondary-gray",
208
- onClick: H,
210
+ onClick: J,
209
211
  "data-testid": "clear-button"
210
212
  }
211
213
  )