mimir-ui-kit 1.36.7 → 1.36.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/dist/{Input-WnjLXNpw.js → Input-CbgqYgLo.js} +65 -63
  2. package/dist/assets/TextArea.css +1 -1
  3. package/dist/{combobox-CDU06zJj.js → combobox-BpYucpxz.js} +1121 -1080
  4. package/dist/components/Accordion/Accordion.js +15 -15
  5. package/dist/components/CheckboxMimir/CheckboxMimir.js +4 -4
  6. package/dist/components/DatePicker/DatePicker.js +1 -1
  7. package/dist/components/Input/Input.d.ts +4 -0
  8. package/dist/components/Input/Input.js +1 -1
  9. package/dist/components/Input/index.js +1 -1
  10. package/dist/components/InputPassword/InputPassword.js +1 -1
  11. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  12. package/dist/components/MultiSelectSearch/MultiSelectSearch.d.ts +1 -0
  13. package/dist/components/MultiSelectSearch/MultiSelectSearch.js +108 -105
  14. package/dist/components/MultiSelectSearch/types.d.ts +2 -0
  15. package/dist/components/MultiSelectSearch/utils.js +1 -1
  16. package/dist/components/OtpInput/OtpInput.js +1 -1
  17. package/dist/components/RadioGroup/RadioGroup.js +3 -3
  18. package/dist/components/SelectSearch/SelectSearch.d.ts +1 -0
  19. package/dist/components/SelectSearch/SelectSearch.js +96 -92
  20. package/dist/components/SelectSearch/types.d.ts +2 -0
  21. package/dist/components/SelectSearch/utils.js +1 -1
  22. package/dist/components/Switcher/Switcher.js +4 -4
  23. package/dist/components/TabTrail/TabTrail.js +4 -4
  24. package/dist/components/TextArea/TextArea.js +39 -39
  25. package/dist/components/index.js +1 -1
  26. package/dist/{field-FJ34aSs4.js → field-C1kt7aNM.js} +2 -2
  27. package/dist/{focus-management-XwV-9qkO.js → focus-management-DOYCPyGg.js} +1 -1
  28. package/dist/{hidden-DbgtYPOH.js → hidden-PvGXrYUY.js} +1 -1
  29. package/dist/index.js +1 -1
  30. package/dist/{keyboard-B0lm_zyn.js → keyboard-mgWkd2Vh.js} +114 -111
  31. package/dist/{label-y3ANLTNC.js → label-D4GFpe5F.js} +2 -2
  32. package/dist/open-closed-D2VjDhAN.js +86 -0
  33. package/dist/{use-active-press-86hajhdd.js → use-active-press-CqLGIFz7.js} +1 -1
  34. package/package.json +1 -1
  35. package/dist/open-closed-CdldUPoq.js +0 -86
@@ -1,46 +1,46 @@
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
- import { EInputVariant as te } from "./components/Input/constants.js";
5
- import { useMergeRefs as se } from "./hooks/useMergeRefs/useMergeRefs.js";
6
- import { Icon as ae } from "./icons/Icon.js";
7
- import { Button as le } from "./components/Button/Button.js";
8
- import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3", ce = "_focused_1bpoc_82", ne = "_disabled_1bpoc_88", ie = "_clear_1bpoc_137", de = "_s_1bpoc_188", ue = "_m_1bpoc_203", _e = "_l_1bpoc_27", pe = "_success_1bpoc_259", me = "_alarm_1bpoc_279", be = "_error_1bpoc_299", e = {
1
+ import { jsxs as B, jsx as c, Fragment as Z } from "react/jsx-runtime";
2
+ import { c as r } from "./index-DIxK0V-G.js";
3
+ import { memo as $, forwardRef as ee, useState as R, useRef as te, useEffect as z } from "react";
4
+ import { EInputVariant as se } from "./components/Input/constants.js";
5
+ import { useMergeRefs as ae } from "./hooks/useMergeRefs/useMergeRefs.js";
6
+ import { Icon as le } from "./icons/Icon.js";
7
+ import { Button as oe } from "./components/Button/Button.js";
8
+ import './assets/Input.css';const re = "_label_1bpoc_27", ce = "_input_1bpoc_3", ne = "_focused_1bpoc_82", ie = "_disabled_1bpoc_88", de = "_clear_1bpoc_137", ue = "_s_1bpoc_188", pe = "_m_1bpoc_203", _e = "_l_1bpoc_27", me = "_success_1bpoc_259", be = "_alarm_1bpoc_279", fe = "_error_1bpoc_299", e = {
9
9
  "input-wrapper": "_input-wrapper_1bpoc_3",
10
10
  "required-mark": "_required-mark_1bpoc_17",
11
11
  label: re,
12
12
  "has-left-slot": "_has-left-slot_1bpoc_42",
13
13
  "active-label": "_active-label_1bpoc_45",
14
- input: oe,
14
+ input: ce,
15
15
  "has-right-slot": "_has-right-slot_1bpoc_79",
16
- focused: ce,
16
+ focused: ne,
17
17
  "has-label": "_has-label_1bpoc_85",
18
- disabled: ne,
18
+ disabled: ie,
19
19
  "auto-height": "_auto-height_1bpoc_94",
20
20
  "addon-icon": "_addon-icon_1bpoc_101",
21
21
  "left-slot": "_left-slot_1bpoc_105",
22
22
  "right-slot": "_right-slot_1bpoc_106",
23
- clear: ie,
24
- s: de,
25
- m: ue,
23
+ clear: de,
24
+ s: ue,
25
+ m: pe,
26
26
  l: _e,
27
27
  "default-gray": "_default-gray_1bpoc_232",
28
28
  "default-white": "_default-white_1bpoc_244",
29
- success: pe,
30
- alarm: me,
31
- error: be
29
+ success: me,
30
+ alarm: be,
31
+ error: fe
32
32
  }, L = (t) => {
33
- var p, a;
33
+ var _, 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"), g = (a = t.addonContent) == null ? void 0 : a.includes("24px");
38
+ const m = (_ = t.addonContent) == null ? void 0 : _.includes("16px"), g = (a = t.addonContent) == null ? void 0 : a.includes("24px");
39
39
  return /* @__PURE__ */ c(
40
- ae,
40
+ le,
41
41
  {
42
42
  style: {
43
- "--icon-size": o({
43
+ "--icon-size": r({
44
44
  "16px": m,
45
45
  "24px": g
46
46
  })
@@ -53,26 +53,26 @@ 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__ */ c(Y, { children: t.addonContent });
56
+ return /* @__PURE__ */ c(Z, { children: t.addonContent });
57
57
  default:
58
58
  return null;
59
59
  }
60
- }, fe = Z(
61
- $(
62
- (t, p) => {
60
+ }, he = $(
61
+ ee(
62
+ (t, _) => {
63
63
  const {
64
64
  value: a,
65
65
  className: m,
66
66
  wrapperClassName: g,
67
67
  rightSlotClassName: j,
68
68
  requiredMarkClassName: D,
69
- variant: A = te.DefaultGray,
69
+ variant: A = se.DefaultGray,
70
70
  type: E = "text",
71
71
  autofocus: N,
72
72
  readonly: n,
73
73
  id: F,
74
74
  onFocus: x,
75
- onBlur: y,
75
+ onBlur: C,
76
76
  label: u,
77
77
  withClearButton: M,
78
78
  disabled: s,
@@ -80,63 +80,64 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
80
80
  rightAddon: O,
81
81
  status: V,
82
82
  leftAddon: S,
83
- size: C = "m",
83
+ size: y = "m",
84
84
  numbersOnly: T,
85
85
  required: v,
86
86
  maxLength: w,
87
- ...G
88
- } = t, [_, I] = R(N), [b, f] = R(!!a), d = ee(null), P = se(d, p);
87
+ autocomplete: G = "on",
88
+ ...P
89
+ } = t, [p, I] = R(N), [b, f] = R(!!a), d = te(null), W = ae(d, _);
89
90
  z(() => {
90
91
  N && I(!0);
91
92
  }, [N]), z(() => {
92
93
  f(!!a);
93
94
  }, [a]);
94
- const W = (l) => {
95
- const r = l.currentTarget.value;
96
- y == null || y(l), I(!1), f(!!r);
97
- }, H = (l) => {
95
+ const H = (l) => {
96
+ const o = l.currentTarget.value;
97
+ C == null || C(l), I(!1), f(!!o);
98
+ }, J = (l) => {
98
99
  n || (I(!0), x == null || x(l));
99
- }, J = () => {
100
+ }, K = () => {
100
101
  d != null && d.current && (d.current.value = "", d.current.focus(), f(!1), i == null || i({
101
102
  target: { value: "" }
102
103
  }));
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 = {
104
+ }, Q = (l) => {
105
+ let o = l.target.value;
106
+ T && (o = o.replace(/\D/g, "")), w !== void 0 && (o = o.slice(0, w)), l.target.value = o, i == null || i(l), f(!!o);
107
+ }, h = L(S), k = L(O), U = {
107
108
  [e.readonly]: s || n,
108
- [e.focused]: _,
109
+ [e.focused]: p,
109
110
  [e.disabled]: s || n,
110
111
  [e["has-label"]]: !!u,
111
112
  [e["has-left-slot"]]: !!h,
112
113
  [e["has-right-slot"]]: !!k
113
- }, q = _ || b || !!a, U = o(e.label, m, e[C], {
114
+ }, q = p || b || !!a, X = r(e.label, m, e[y], {
114
115
  [e["active-label"]]: q,
115
116
  [e.disabled]: s || n,
116
117
  [e["has-left-slot"]]: !!h
117
- }), X = o(e.input, Q, m, [
118
+ }), Y = r(e.input, U, m, [
118
119
  e[A],
119
120
  e[V ?? ""],
120
- e[C]
121
+ e[y]
121
122
  ]);
122
123
  return /* @__PURE__ */ B(
123
124
  "div",
124
125
  {
125
- className: o(
126
+ className: r(
126
127
  e["input-wrapper"],
127
128
  e[A],
128
129
  e[V ?? ""],
129
- e[C],
130
+ e[y],
130
131
  {
131
132
  [e.disabled]: s || n,
132
- [e.focused]: _
133
+ [e.focused]: p
133
134
  },
134
135
  g
135
136
  ),
136
137
  children: [
137
- u && /* @__PURE__ */ B("label", { htmlFor: F, className: U, children: [
138
+ u && /* @__PURE__ */ B("label", { htmlFor: F, className: X, children: [
138
139
  u,
139
- v && (b || _) && /* @__PURE__ */ c(
140
+ v && (b || p) && /* @__PURE__ */ c(
140
141
  "span",
141
142
  {
142
143
  className: e["required-mark"],
@@ -147,7 +148,7 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
147
148
  h && /* @__PURE__ */ c(
148
149
  "span",
149
150
  {
150
- className: o(e["left-slot"], {
151
+ className: r(e["left-slot"], {
151
152
  [e.focused]: q,
152
153
  [e["has-label"]]: !!u,
153
154
  [e.disabled]: s
@@ -158,25 +159,26 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
158
159
  /* @__PURE__ */ c(
159
160
  "input",
160
161
  {
161
- ref: P,
162
+ ref: W,
162
163
  type: E,
163
164
  id: F,
164
- className: X,
165
- onFocus: H,
166
- onBlur: W,
165
+ className: Y,
166
+ onFocus: J,
167
+ onBlur: H,
167
168
  readOnly: n,
168
169
  value: a,
169
- onChange: K,
170
+ onChange: Q,
170
171
  maxLength: w,
171
172
  disabled: s,
172
173
  required: v,
173
- ...G
174
+ autoComplete: G,
175
+ ...P
174
176
  }
175
177
  ),
176
178
  k && /* @__PURE__ */ c(
177
179
  "span",
178
180
  {
179
- className: o(e["right-slot"], j, {
181
+ className: r(e["right-slot"], j, {
180
182
  [e.focused]: q,
181
183
  [e["has-label"]]: !!u,
182
184
  [e.disabled]: s
@@ -184,10 +186,10 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
184
186
  children: k
185
187
  }
186
188
  ),
187
- v && !b && !_ && /* @__PURE__ */ c(
189
+ v && !b && !p && /* @__PURE__ */ c(
188
190
  "span",
189
191
  {
190
- className: o(
192
+ className: r(
191
193
  e["required-mark"],
192
194
  D
193
195
  ),
@@ -195,10 +197,10 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
195
197
  }
196
198
  ),
197
199
  M && b && /* @__PURE__ */ c(
198
- le,
200
+ oe,
199
201
  {
200
202
  tabIndex: -1,
201
- className: o(e.clear, {
203
+ className: r(e.clear, {
202
204
  [e.disabled]: s
203
205
  }),
204
206
  isIconButton: !0,
@@ -207,7 +209,7 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
207
209
  clear: !0,
208
210
  disabled: s || n,
209
211
  variant: "secondary-gray",
210
- onClick: J,
212
+ onClick: K,
211
213
  "data-testid": "clear-button"
212
214
  }
213
215
  )
@@ -217,8 +219,8 @@ import './assets/Input.css';const re = "_label_1bpoc_27", oe = "_input_1bpoc_3",
217
219
  }
218
220
  )
219
221
  );
220
- fe.displayName = "Input";
222
+ he.displayName = "Input";
221
223
  export {
222
- fe as I,
224
+ he as I,
223
225
  e as c
224
226
  };
@@ -1 +1 @@
1
- ._textarea-wrapper_rmhew_2 ._textarea_rmhew_2{min-height:var(--textarea-height);padding-top:var(--textarea-space)!important;padding-bottom:var(--textarea-space);resize:none}._textarea-wrapper_rmhew_2 ._textarea_rmhew_2._has-label_rmhew_8{padding-top:var(--textarea-top-space)!important}._textarea-wrapper_rmhew_2 ._required-mark_rmhew_11{display:block;flex:0 0 var(--input-required-mark-size);align-self:flex-start;width:var(--input-required-mark-size);height:var(--input-required-mark-size);margin-top:var(--textarea-space);margin-left:var(--mimir-space-m);background-color:var(--citrine-normal);border-radius:50%}._textarea-wrapper_rmhew_2 ._label_rmhew_22{position:absolute;top:calc(var(--input-height) / 2 - var(--input-font-size) / 2);left:var(--mimir-space-m);z-index:1;display:flex;color:var(--label-color);font-size:var(--input-font-size);white-space:nowrap;-moz-column-gap:var(--mimir-space-xs);column-gap:var(--mimir-space-xs);transform-origin:left center;transition:transform .15s ease-out,left .15s ease-out,color .15s ease-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;pointer-events:none}._textarea-wrapper_rmhew_2 ._label_rmhew_22._has-left-slot_rmhew_37{left:calc(var(--mimir-space-m) + var(--icon-size) + var(--clear-button-mg))}._textarea-wrapper_rmhew_2 ._label_rmhew_22._active-label_rmhew_40{font-size:var(--label-font-size-active);transform:translateY(calc(var(--label-font-size-active) * -1))}._textarea-wrapper_rmhew_2 ._label_rmhew_22._active-label_rmhew_40._has-left-slot_rmhew_37{left:var(--mimir-space-m)}._textarea-wrapper_rmhew_2 ._label_rmhew_22._active-label_rmhew_40 ._required-mark_rmhew_11{align-self:center;margin-top:0;margin-left:0}._s_rmhew_53{--textarea-space: var(--mimir-space-2s);--textarea-top-space: var(--mimir-space-l);--textarea-height: 76px;--textarea-padding: var(--mimir-space-xs) var(--mimir-space-s)}._m_rmhew_60{--textarea-space: var(--mimir-space-2s);--textarea-top-space: var(--mimir-space-l);--textarea-height: 88px;--textarea-padding: var(--mimir-space-xs) var(--mimir-space-s)}._l_rmhew_22{--textarea-space: var(--mimir-space-2m);--textarea-top-space: 25px;--textarea-height: 120px;--textarea-padding: var(--mimir-space-2m)}
1
+ ._textarea-wrapper_1b24r_2 ._textarea_1b24r_2{min-height:var(--textarea-height);padding-top:var(--textarea-space)!important;padding-bottom:var(--textarea-space);resize:none}._textarea-wrapper_1b24r_2 ._textarea_1b24r_2._has-label_1b24r_8{padding-top:var(--textarea-top-space)!important}._textarea-wrapper_1b24r_2 ._required-mark_1b24r_11{display:block;flex:0 0 var(--input-required-mark-size);align-self:flex-start;width:var(--input-required-mark-size);height:var(--input-required-mark-size);margin-top:var(--textarea-space);margin-left:var(--mimir-space-m);background-color:var(--citrine-normal);border-radius:50%}._textarea-wrapper_1b24r_2 ._label_1b24r_22{position:absolute;top:calc(var(--input-height) / 2 - var(--input-font-size) / 2);left:var(--mimir-space-m);z-index:1;display:flex;color:var(--label-color);font-size:var(--input-font-size);white-space:nowrap;-moz-column-gap:var(--mimir-space-xs);column-gap:var(--mimir-space-xs);transform-origin:left center;transition:transform .15s ease-out,font-size .15s ease-out,left .15s ease-out,color .15s ease-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;pointer-events:none}._textarea-wrapper_1b24r_2 ._label_1b24r_22._has-left-slot_1b24r_37{left:calc(var(--mimir-space-m) + var(--icon-size) + var(--clear-button-mg))}._textarea-wrapper_1b24r_2 ._label_1b24r_22._active-label_1b24r_40{font-size:var(--label-font-size-active);transform:translateY(calc(var(--label-font-size-active) * -1))}._textarea-wrapper_1b24r_2 ._label_1b24r_22._active-label_1b24r_40._has-left-slot_1b24r_37{left:var(--mimir-space-m)}._textarea-wrapper_1b24r_2 ._label_1b24r_22._active-label_1b24r_40 ._required-mark_1b24r_11{align-self:center;margin-top:0;margin-left:0}._s_1b24r_53{--textarea-space: var(--mimir-space-2s);--textarea-top-space: var(--mimir-space-l);--textarea-height: 76px;--textarea-padding: var(--mimir-space-xs) var(--mimir-space-s)}._m_1b24r_60{--textarea-space: var(--mimir-space-2s);--textarea-top-space: var(--mimir-space-l);--textarea-height: 88px;--textarea-padding: var(--mimir-space-xs) var(--mimir-space-s)}._l_1b24r_22{--textarea-space: var(--mimir-space-2m);--textarea-top-space: 25px;--textarea-height: 120px;--textarea-padding: var(--mimir-space-2m)}