mimir-ui-kit 1.36.6 → 1.36.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- import { jsxs as V, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as V, jsx as o } from "react/jsx-runtime";
2
2
  import { c as i } from "../../index-DIxK0V-G.js";
3
3
  import { memo as K, forwardRef as Q, useState as B, useRef as U, useEffect as X } from "react";
4
4
  import { useAutoResizeTextArea as Y } from "./hooks.js";
@@ -7,30 +7,30 @@ import { Icon as $ } from "../../icons/Icon.js";
7
7
  import { Button as ee } from "../Button/Button.js";
8
8
  import { c as e } from "../../Input-WnjLXNpw.js";
9
9
  import { EInputVariant as ae } from "../Input/constants.js";
10
- import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_1n8kz_22", re = "_s_1n8kz_54", le = "_m_1n8kz_62", ne = "_l_1n8kz_22", a = {
11
- "textarea-wrapper": "_textarea-wrapper_1n8kz_2",
10
+ import '../../assets/TextArea.css';const te = "_textarea_rmhew_2", se = "_label_rmhew_22", re = "_s_rmhew_53", le = "_m_rmhew_60", oe = "_l_rmhew_22", a = {
11
+ "textarea-wrapper": "_textarea-wrapper_rmhew_2",
12
12
  textarea: te,
13
- "has-label": "_has-label_1n8kz_8",
14
- "required-mark": "_required-mark_1n8kz_11",
13
+ "has-label": "_has-label_rmhew_8",
14
+ "required-mark": "_required-mark_rmhew_11",
15
15
  label: se,
16
- "has-left-slot": "_has-left-slot_1n8kz_37",
17
- "active-label": "_active-label_1n8kz_40",
16
+ "has-left-slot": "_has-left-slot_rmhew_37",
17
+ "active-label": "_active-label_rmhew_40",
18
18
  s: re,
19
19
  m: le,
20
- l: ne
20
+ l: oe
21
21
  }, F = (t) => {
22
- var p, o;
22
+ var f, n;
23
23
  if (!t)
24
24
  return null;
25
25
  switch (t.addonType) {
26
26
  case "icon": {
27
- const _ = (p = t.addonContent) == null ? void 0 : p.includes("16px"), b = (o = t.addonContent) == null ? void 0 : o.includes("24px");
28
- return /* @__PURE__ */ n(
27
+ const p = (f = t.addonContent) == null ? void 0 : f.includes("16px"), b = (n = t.addonContent) == null ? void 0 : n.includes("24px");
28
+ return /* @__PURE__ */ o(
29
29
  $,
30
30
  {
31
31
  style: {
32
32
  "--icon-size": i({
33
- "16px": _,
33
+ "16px": p,
34
34
  "24px": b
35
35
  })
36
36
  },
@@ -44,20 +44,20 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
44
44
  default:
45
45
  return null;
46
46
  }
47
- }, oe = K(
47
+ }, ne = K(
48
48
  Q(
49
- (t, p) => {
49
+ (t, f) => {
50
50
  const {
51
- value: o,
52
- className: _,
51
+ value: n,
52
+ className: p,
53
53
  wrapperClassName: b,
54
- variant: q = ae.DefaultGray,
55
- autofocus: k,
54
+ variant: R = ae.DefaultGray,
55
+ autofocus: w,
56
56
  readonly: s,
57
- status: R,
58
- id: T,
57
+ status: T,
58
+ id: z,
59
59
  onFocus: N,
60
- onBlur: z,
60
+ onBlur: g,
61
61
  label: d,
62
62
  onChange: c,
63
63
  withClearButton: j,
@@ -65,47 +65,47 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
65
65
  rightAddon: E,
66
66
  leftAddon: L,
67
67
  size: m = "m",
68
- required: g,
68
+ required: C,
69
69
  ...D
70
- } = t, [f, C] = B(k), [h, v] = B(!!o), r = U(null), G = Z(r, p);
70
+ } = t, [h, v] = B(w), [_, A] = B(!!n), r = U(null), G = Z(r, f);
71
71
  X(() => {
72
- k && C(!0);
73
- }, [k]);
72
+ w && v(!0);
73
+ }, [w]);
74
74
  const I = Y(r.current), M = (l) => {
75
- const y = l.currentTarget.value;
76
- z == null || z(l), C(!1), v(!!y);
75
+ const q = l.currentTarget.value;
76
+ g == null || g(l), v(!1), A(!!q);
77
77
  }, O = (l) => {
78
- s || (C(!0), N == null || N(l));
78
+ s || (v(!0), N == null || N(l));
79
79
  }, P = () => {
80
- r != null && r.current && (r.current.value = "", r.current.focus(), v(!1), I(), c == null || c({
80
+ r != null && r.current && (r.current.value = "", r.current.focus(), A(!1), I(), c == null || c({
81
81
  target: { value: "" }
82
82
  }));
83
83
  }, S = (l) => {
84
- const y = l.target.value;
85
- v(!!y), I(), c == null || c(l);
86
- }, x = F(L), A = F(E), W = {
84
+ const q = l.target.value;
85
+ A(!!q), I(), c == null || c(l);
86
+ }, x = F(L), y = F(E), W = {
87
87
  [e.readonly]: u || s,
88
- [e.focused]: f,
88
+ [e.focused]: h,
89
89
  [e.disabled]: u || s,
90
90
  [e["has-left-slot"]]: !!x,
91
- [e["has-right-slot"]]: !!A,
91
+ [e["has-right-slot"]]: !!y,
92
92
  [a["has-label"]]: !!d
93
- }, w = f || h || !!o, H = i(
93
+ }, k = h || _ || !!n, H = i(
94
94
  e.label,
95
95
  a.label,
96
96
  {
97
- [a["active-label"]]: w,
97
+ [a["active-label"]]: k,
98
98
  [e.disabled]: u || s,
99
99
  [a["has-left-slot"]]: !!x
100
100
  },
101
- _,
101
+ p,
102
102
  e[m]
103
103
  ), J = i(
104
104
  a.textarea,
105
105
  e.input,
106
106
  W,
107
- _,
108
- [e[q], a[m], e[m], e[R ?? ""]]
107
+ p,
108
+ [e[R], a[m], e[m], e[T ?? ""]]
109
109
  );
110
110
  return /* @__PURE__ */ V(
111
111
  "div",
@@ -113,20 +113,20 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
113
113
  className: i(
114
114
  e["input-wrapper"],
115
115
  a["textarea-wrapper"],
116
- e[q],
117
- e[R ?? ""],
116
+ e[R],
117
+ e[T ?? ""],
118
118
  a[m],
119
119
  e[m],
120
120
  {
121
121
  [e.disabled]: u || s,
122
- [e.focused]: f
122
+ [e.focused]: h
123
123
  },
124
124
  b
125
125
  ),
126
126
  children: [
127
- d && /* @__PURE__ */ V("label", { htmlFor: T, className: H, children: [
127
+ d && /* @__PURE__ */ V("label", { htmlFor: z, className: H, children: [
128
128
  d,
129
- g && (h || f) && /* @__PURE__ */ n(
129
+ C && (_ || h) && /* @__PURE__ */ o(
130
130
  "span",
131
131
  {
132
132
  className: a["required-mark"],
@@ -134,51 +134,51 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
134
134
  }
135
135
  )
136
136
  ] }),
137
- x && /* @__PURE__ */ n(
137
+ x && /* @__PURE__ */ o(
138
138
  "span",
139
139
  {
140
140
  className: i(e["left-slot"], {
141
- [e.focused]: w,
141
+ [e.focused]: k,
142
142
  [e["has-label"]]: !!d
143
143
  }),
144
144
  "data-testid": "left-addon",
145
145
  children: x
146
146
  }
147
147
  ),
148
- /* @__PURE__ */ n(
148
+ /* @__PURE__ */ o(
149
149
  "textarea",
150
150
  {
151
151
  ref: G,
152
- id: T,
152
+ id: z,
153
153
  className: J,
154
154
  onFocus: O,
155
155
  onBlur: M,
156
156
  readOnly: s,
157
- value: o,
157
+ value: n,
158
158
  onChange: S,
159
- required: g,
159
+ required: C,
160
160
  ...D
161
161
  }
162
162
  ),
163
- A && /* @__PURE__ */ n(
163
+ y && /* @__PURE__ */ o(
164
164
  "span",
165
165
  {
166
166
  className: i(e["right-slot"], {
167
- [e.focused]: w,
167
+ [e.focused]: k,
168
168
  [e["has-label"]]: !!d
169
169
  }),
170
170
  "data-testid": "right-addon",
171
- children: A
171
+ children: y
172
172
  }
173
173
  ),
174
- g && !h && !f && /* @__PURE__ */ n(
174
+ C && !_ && !h && /* @__PURE__ */ o(
175
175
  "span",
176
176
  {
177
177
  className: a["required-mark"],
178
178
  "data-testid": "required-mark"
179
179
  }
180
180
  ),
181
- j && h && /* @__PURE__ */ n(
181
+ j && _ && /* @__PURE__ */ o(
182
182
  ee,
183
183
  {
184
184
  tabIndex: -1,
@@ -198,7 +198,7 @@ import '../../assets/TextArea.css';const te = "_textarea_1n8kz_2", se = "_label_
198
198
  }
199
199
  )
200
200
  );
201
- oe.displayName = "TextArea";
201
+ ne.displayName = "TextArea";
202
202
  export {
203
- oe as TextArea
203
+ ne as TextArea
204
204
  };
@@ -1,6 +1,6 @@
1
1
  import l, { useId as u, useMemo as f } from "react";
2
- import { z as p, U as h, a as v, l as E, f as b, W as $ } from "./label-D4GFpe5F.js";
3
- import { W as H, H as W } from "./keyboard-mgWkd2Vh.js";
2
+ import { z as p, U as h, a as v, l as E, f as b, W as $ } from "./label-y3ANLTNC.js";
3
+ import { W as H, H as W } from "./keyboard-B0lm_zyn.js";
4
4
  let P = "div";
5
5
  function _(a, i) {
6
6
  let d = `headlessui-control-${u()}`, [o, n] = p(), [m, s] = h(), c = v(), { disabled: e = c || !1, ...t } = a, r = f(() => ({ disabled: e }), [e]);
@@ -1,4 +1,4 @@
1
- import { u as N, a as v } from "./keyboard-mgWkd2Vh.js";
1
+ import { u as N, a as v } from "./keyboard-B0lm_zyn.js";
2
2
  let m = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(","), F = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
3
3
  var h = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e[e.AutoFocus = 64] = "AutoFocus", e))(h || {}), x = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(x || {}), A = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(A || {});
4
4
  function y(e = document.body) {
@@ -1,4 +1,4 @@
1
- import { W as t, H as a } from "./keyboard-mgWkd2Vh.js";
1
+ import { W as t, H as a } from "./keyboard-B0lm_zyn.js";
2
2
  let l = "span";
3
3
  var p = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(p || {});
4
4
  function s(e, n) {