rharuow-ds 1.7.0 → 1.7.1

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,5 +1,5 @@
1
1
  import * as e from "react";
2
- import u, { useState as ue, useRef as pe, useEffect as Le } from "react";
2
+ import l, { useState as ue, useRef as pe, useEffect as Le } from "react";
3
3
  import { useFormContext as ie, useWatch as ce } from "react-hook-form";
4
4
  import { createPortal as ve } from "react-dom";
5
5
  function ge(t) {
@@ -11,12 +11,12 @@ function ge(t) {
11
11
  } else for (r in t) t[r] && (o && (o += " "), o += r);
12
12
  return o;
13
13
  }
14
- function Be() {
14
+ function Me() {
15
15
  for (var t, a, r = 0, o = "", f = arguments.length; r < f; r++) (t = arguments[r]) && (a = ge(t)) && (o && (o += " "), o += a);
16
16
  return o;
17
17
  }
18
- function s(...t) {
19
- return Be(...t);
18
+ function i(...t) {
19
+ return Me(...t);
20
20
  }
21
21
  const je = ({
22
22
  children: t,
@@ -29,8 +29,8 @@ const je = ({
29
29
  outline: "border border-[var(--primary,#2563eb)] text-[var(--primary,#2563eb)] bg-white hover:bg-[var(--primary-hover,#e0e7ff)]",
30
30
  secondary: "bg-[var(--secondary,#fbbf24)] text-[var(--secondary-text,#222)] hover:bg-[var(--secondary-hover,#f59e42)]"
31
31
  };
32
- return /* @__PURE__ */ u.createElement("button", { className: s(f, y[a], r), ...o }, t);
33
- }, Me = e.forwardRef(
32
+ return /* @__PURE__ */ l.createElement("button", { className: i(f, y[a], r), ...o }, t);
33
+ }, Be = e.forwardRef(
34
34
  ({
35
35
  name: t,
36
36
  className: a,
@@ -39,56 +39,56 @@ const je = ({
39
39
  onFocus: f,
40
40
  onBlur: y,
41
41
  Icon: v,
42
- iconClassName: I,
43
- iconAction: _,
44
- containerClassName: R,
42
+ iconClassName: T,
43
+ iconAction: P,
44
+ containerClassName: S,
45
45
  ...x
46
46
  }, h) => {
47
- var q, V, A;
48
- const [p, B] = e.useState(!1), [N, F] = e.useState(!1), m = ie(), g = m == null ? void 0 : m.control, w = m == null ? void 0 : m.register, C = g && t ? ce({ control: g, name: t }) : void 0, c = x.value ?? C ?? "", k = (A = (V = (q = m == null ? void 0 : m.formState) == null ? void 0 : q.errors) == null ? void 0 : V[t]) == null ? void 0 : A.message, M = ["date", "datetime-local", "time", "month", "week"].includes(r), d = p || !!c || M, H = r === "password" ? N ? "text" : "password" : r, D = () => /* @__PURE__ */ e.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ e.createElement(
47
+ var G, V, W;
48
+ const [p, B] = e.useState(!1), [E, F] = e.useState(!1), m = ie(), g = m == null ? void 0 : m.control, w = m == null ? void 0 : m.register, N = g && t ? ce({ control: g, name: t }) : void 0, d = x.value ?? N ?? "", C = (W = (V = (G = m == null ? void 0 : m.formState) == null ? void 0 : G.errors) == null ? void 0 : V[t]) == null ? void 0 : W.message, _ = ["date", "datetime-local", "time", "month", "week"].includes(r), u = p || !!d || _, H = r === "password" ? E ? "text" : "password" : r, D = () => /* @__PURE__ */ e.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ e.createElement(
49
49
  "path",
50
50
  {
51
51
  d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z",
52
52
  fill: "currentColor"
53
53
  }
54
- )), L = () => /* @__PURE__ */ e.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ e.createElement(
54
+ )), R = () => /* @__PURE__ */ e.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ e.createElement(
55
55
  "path",
56
56
  {
57
57
  d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z",
58
58
  fill: "currentColor"
59
59
  }
60
- )), Y = () => {
61
- F(!N);
60
+ )), U = () => {
61
+ F(!E);
62
62
  };
63
- return /* @__PURE__ */ e.createElement("div", { className: s("relative", R) }, /* @__PURE__ */ e.createElement(
63
+ return /* @__PURE__ */ e.createElement("div", { className: i("relative", S) }, /* @__PURE__ */ e.createElement(
64
64
  "input",
65
65
  {
66
66
  id: x.id || t,
67
67
  type: H,
68
- className: s(
68
+ className: i(
69
69
  "peer flex h-12 w-full border border-[var(--primary,#2563eb)] rounded-md bg-[var(--input-bg,#fff)] text-[var(--input-text,#222)] px-3 pt-6 pb-2 text-sm placeholder-transparent transition focus:outline-none focus:border-[var(--primary,#2563eb)] disabled:cursor-not-allowed disabled:opacity-50",
70
70
  r === "password" || v ? "pr-12" : "",
71
71
  // espaço extra para qualquer ícone (password ou customizado)
72
72
  a
73
73
  ),
74
- onFocus: (E) => {
75
- B(!0), f && f(E);
74
+ onFocus: (L) => {
75
+ B(!0), f && f(L);
76
76
  },
77
77
  ...m && t ? (() => {
78
- const E = w(t), j = E.onBlur;
78
+ const L = w(t), q = L.onBlur;
79
79
  return {
80
- ...E,
81
- ref: (z) => {
82
- typeof h == "function" ? h(z) : h && (h.current = z), E.ref && E.ref(z);
80
+ ...L,
81
+ ref: (M) => {
82
+ typeof h == "function" ? h(M) : h && (h.current = M), L.ref && L.ref(M);
83
83
  },
84
- onBlur: (z) => {
85
- B(!1), y && y(z), j && j(z);
84
+ onBlur: (M) => {
85
+ B(!1), y && y(M), q && q(M);
86
86
  }
87
87
  };
88
88
  })() : {
89
89
  ref: h,
90
- onBlur: (E) => {
91
- B(!1), y && y(E);
90
+ onBlur: (L) => {
91
+ B(!1), y && y(L);
92
92
  }
93
93
  },
94
94
  ...x
@@ -97,9 +97,9 @@ const je = ({
97
97
  "label",
98
98
  {
99
99
  htmlFor: x.id || t,
100
- className: s(
100
+ className: i(
101
101
  "absolute left-3 z-10 origin-[0] cursor-text select-none text-sm text-gray-400 transition-all duration-200",
102
- d ? "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white" : "top-3 scale-100 translate-y-0.5"
102
+ u ? "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white" : "top-3 scale-100 translate-y-0.5"
103
103
  )
104
104
  },
105
105
  o
@@ -108,25 +108,25 @@ const je = ({
108
108
  {
109
109
  type: "button",
110
110
  className: "absolute top-1/2 right-3 -translate-y-1/2 text-gray-400 hover:text-[var(--primary,#2563eb)] transition-colors duration-200 focus:outline-none focus:text-[var(--primary,#2563eb)]",
111
- onClick: Y,
112
- "aria-label": N ? "Esconder senha" : "Mostrar senha",
111
+ onClick: U,
112
+ "aria-label": E ? "Esconder senha" : "Mostrar senha",
113
113
  tabIndex: -1
114
114
  },
115
- N ? /* @__PURE__ */ e.createElement(L, null) : /* @__PURE__ */ e.createElement(D, null)
115
+ E ? /* @__PURE__ */ e.createElement(R, null) : /* @__PURE__ */ e.createElement(D, null)
116
116
  ), v && r !== "password" && /* @__PURE__ */ e.createElement(
117
117
  "div",
118
118
  {
119
- className: s(
119
+ className: i(
120
120
  "absolute top-1/2 right-3 -translate-y-1/2 text-gray-400 cursor-pointer hover:text-[var(--primary,#2563eb)] transition-colors duration-200",
121
- I
121
+ T
122
122
  ),
123
- onClick: _
123
+ onClick: P
124
124
  },
125
125
  /* @__PURE__ */ e.createElement(v, null)
126
- ), k && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, k));
126
+ ), C && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, C));
127
127
  }
128
128
  );
129
- Me.displayName = "Input";
129
+ Be.displayName = "Input";
130
130
  const _e = e.forwardRef(
131
131
  ({
132
132
  name: t,
@@ -136,72 +136,72 @@ const _e = e.forwardRef(
136
136
  containerClassName: f,
137
137
  isClearable: y,
138
138
  searchable: v = !1,
139
- filterPlaceholder: I = "Digite para filtrar...",
140
- caseSensitive: _ = !1,
141
- filterFunction: R,
139
+ filterPlaceholder: T = "Digite para filtrar...",
140
+ caseSensitive: P = !1,
141
+ filterFunction: S,
142
142
  onFocus: x,
143
143
  onBlur: h,
144
144
  ...p
145
145
  }, B) => {
146
- var te, ae, l, T;
147
- const [N, F] = e.useState(!1), [m, g] = e.useState(!1), [w, C] = e.useState(""), [c, k] = e.useState({
146
+ var te, ae, s, A;
147
+ const [E, F] = e.useState(!1), [m, g] = e.useState(!1), [w, N] = e.useState(""), [d, C] = e.useState({
148
148
  top: 0,
149
149
  left: 0,
150
150
  width: 0
151
- }), S = e.useRef(null), M = e.useRef(null), d = ie(), H = d == null ? void 0 : d.control, D = H && t ? ce({ control: H, name: t }) : void 0, L = p.value ?? D ?? "", Y = (l = (ae = (te = d == null ? void 0 : d.formState) == null ? void 0 : te.errors) == null ? void 0 : ae[t]) == null ? void 0 : l.message, V = R || ((n, W) => {
152
- const U = _ ? n.label : n.label.toLowerCase(), Q = _ ? W : W.toLowerCase();
153
- return U.includes(Q);
154
- }), A = w.trim() ? r.filter((n) => V(n, w.trim())) : r, E = r.find((n) => n.value === L), j = v && m ? w : (E == null ? void 0 : E.label) || "", z = N || !!L || v && !!w, $ = e.useCallback(() => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 768, []), K = e.useCallback(() => {
155
- if (S.current && m) {
156
- const n = S.current.getBoundingClientRect(), W = $(), U = window.innerHeight, Q = window.innerWidth, G = 152;
151
+ }), k = e.useRef(null), _ = e.useRef(null), u = ie(), H = u == null ? void 0 : u.control, D = H && t ? ce({ control: H, name: t }) : void 0, R = p.value ?? D ?? "", U = (s = (ae = (te = u == null ? void 0 : u.formState) == null ? void 0 : te.errors) == null ? void 0 : ae[t]) == null ? void 0 : s.message, V = S || ((n, $) => {
152
+ const j = P ? n.label : n.label.toLowerCase(), Z = P ? $ : $.toLowerCase();
153
+ return j.includes(Z);
154
+ }), W = w.trim() ? r.filter((n) => V(n, w.trim())) : r, L = r.find((n) => n.value === R), q = v && m ? w : (L == null ? void 0 : L.label) || "", M = E || !!R || v && !!w, z = e.useCallback(() => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 768, []), K = e.useCallback(() => {
155
+ if (k.current && m) {
156
+ const n = k.current.getBoundingClientRect(), $ = z(), j = window.innerHeight, Z = window.innerWidth, Y = 152;
157
157
  let b = n.bottom + 4, O = n.left;
158
- if (W) {
159
- const re = U - n.bottom, i = n.top;
160
- re < G && i > G && (b = n.top - G - 4);
161
- const P = 16, J = Q - n.width - P;
162
- O = Math.min(Math.max(O, P), J);
158
+ if ($) {
159
+ const re = j - n.bottom, c = n.top;
160
+ re < Y && c > Y && (b = n.top - Y - 4);
161
+ const I = 16, X = Z - n.width - I;
162
+ O = Math.min(Math.max(O, I), X);
163
163
  } else
164
- U - n.bottom < G && (b = n.top - G - 4);
165
- k({
164
+ j - n.bottom < Y && (b = n.top - Y - 4);
165
+ C({
166
166
  top: b,
167
167
  left: O,
168
168
  width: n.width
169
169
  });
170
170
  }
171
- }, [m, $]);
171
+ }, [m, z]);
172
172
  e.useEffect(() => {
173
173
  if (K(), m) {
174
- const n = () => K(), W = () => K();
175
- return window.addEventListener("resize", n), window.addEventListener("scroll", W, !0), () => {
176
- window.removeEventListener("resize", n), window.removeEventListener("scroll", W, !0);
174
+ const n = () => K(), $ = () => K();
175
+ return window.addEventListener("resize", n), window.addEventListener("scroll", $, !0), () => {
176
+ window.removeEventListener("resize", n), window.removeEventListener("scroll", $, !0);
177
177
  };
178
178
  }
179
179
  }, [m, K]), e.useEffect(() => {
180
- const n = (W) => {
181
- S.current && !S.current.contains(W.target) && (g(!1), F(!1));
180
+ const n = ($) => {
181
+ k.current && !k.current.contains($.target) && (g(!1), F(!1));
182
182
  };
183
183
  return document.addEventListener("mousedown", n), () => {
184
184
  document.removeEventListener("mousedown", n);
185
185
  };
186
186
  }, []);
187
- const X = () => {
187
+ const ee = () => {
188
188
  g((n) => !n), F(!0);
189
- }, Z = (n) => {
189
+ }, Q = (n) => {
190
190
  F(!0), x && x(n);
191
- }, ee = (n) => {
191
+ }, J = (n) => {
192
192
  h && h(n);
193
193
  }, ne = (n) => {
194
- C(n.target.value);
194
+ N(n.target.value);
195
195
  }, oe = (n) => {
196
- if (d && t && d.setValue(t, n), p.onChange) {
197
- const W = {
196
+ if (u && t && u.setValue(t, n), p.onChange) {
197
+ const $ = {
198
198
  target: { value: n }
199
199
  };
200
- p.onChange(W);
200
+ p.onChange($);
201
201
  }
202
- g(!1), F(!1), C("");
202
+ g(!1), F(!1), N("");
203
203
  };
204
- return /* @__PURE__ */ e.createElement("div", { className: s("relative", f), ref: S }, /* @__PURE__ */ e.createElement(
204
+ return /* @__PURE__ */ e.createElement("div", { className: i("relative", f), ref: k }, /* @__PURE__ */ e.createElement(
205
205
  "div",
206
206
  {
207
207
  id: p.id || t,
@@ -209,21 +209,21 @@ const _e = e.forwardRef(
209
209
  role: "button",
210
210
  "aria-haspopup": "listbox",
211
211
  "aria-expanded": m,
212
- className: s(
212
+ className: i(
213
213
  "peer flex items-center h-12 w-full border border-[var(--primary,#2563eb)] rounded-md bg-[var(--input-bg,#fff)] text-[var(--input-text,#222)] px-3 py-3 text-sm transition focus:outline-none focus:border-[var(--primary,#2563eb)] disabled:cursor-not-allowed disabled:opacity-50 appearance-none cursor-pointer relative",
214
214
  o
215
215
  ),
216
- onClick: v ? void 0 : X,
217
- onFocus: v ? void 0 : Z,
218
- onBlur: v ? void 0 : ee,
216
+ onClick: v ? void 0 : ee,
217
+ onFocus: v ? void 0 : Q,
218
+ onBlur: v ? void 0 : J,
219
219
  ref: B
220
220
  },
221
221
  v ? /* @__PURE__ */ e.createElement(
222
222
  "input",
223
223
  {
224
- ref: M,
224
+ ref: _,
225
225
  type: "text",
226
- value: j,
226
+ value: q,
227
227
  onChange: ne,
228
228
  onFocus: v ? (n) => {
229
229
  F(!0), g(!0), x && x(n);
@@ -231,14 +231,14 @@ const _e = e.forwardRef(
231
231
  onBlur: v ? (n) => {
232
232
  h && h(n);
233
233
  } : void 0,
234
- placeholder: a ? "" : I || "Selecione...",
235
- className: s(
234
+ placeholder: a ? "" : T || "Selecione...",
235
+ className: i(
236
236
  "w-full bg-transparent border-none outline-none text-sm",
237
- !L && !w && "text-gray-400"
237
+ !R && !w && "text-gray-400"
238
238
  )
239
239
  }
240
- ) : /* @__PURE__ */ e.createElement("span", { className: s("block truncate", !L && "text-gray-400") }, ((T = r.find((n) => n.value === L)) == null ? void 0 : T.label) || !a && "Selecione..."),
241
- y && L && /* @__PURE__ */ e.createElement(
240
+ ) : /* @__PURE__ */ e.createElement("span", { className: i("block truncate", !R && "text-gray-400") }, ((A = r.find((n) => n.value === R)) == null ? void 0 : A.label) || !a && "Selecione..."),
241
+ y && R && /* @__PURE__ */ e.createElement(
242
242
  "button",
243
243
  {
244
244
  type: "button",
@@ -246,11 +246,11 @@ const _e = e.forwardRef(
246
246
  "aria-label": "Limpar seleção",
247
247
  className: "absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 bg-transparent p-1 rounded-full focus:outline-none",
248
248
  onClick: (n) => {
249
- if (n.stopPropagation(), d && t && d.setValue(t, ""), p.onChange) {
250
- const W = {
249
+ if (n.stopPropagation(), u && t && u.setValue(t, ""), p.onChange) {
250
+ const $ = {
251
251
  target: { value: "" }
252
252
  };
253
- p.onChange(W);
253
+ p.onChange($);
254
254
  }
255
255
  g(!1), F(!1);
256
256
  }
@@ -261,16 +261,16 @@ const _e = e.forwardRef(
261
261
  "label",
262
262
  {
263
263
  htmlFor: p.id || t,
264
- className: s(
264
+ className: i(
265
265
  "absolute left-3 z-10 origin-[0] cursor-text select-none text-sm text-gray-400 transition-all duration-200",
266
- z ? "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white" : "top-3 scale-100 translate-y-0.5"
266
+ M ? "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white" : "top-3 scale-100 translate-y-0.5"
267
267
  )
268
268
  },
269
269
  a
270
270
  ), /* @__PURE__ */ e.createElement(
271
271
  "div",
272
272
  {
273
- className: s(
273
+ className: i(
274
274
  "absolute left-0 w-full mt-1 rounded-md transition-all duration-200 overflow-hidden",
275
275
  "bg-[var(--select-dropdown-bg)] border-[var(--select-dropdown-border)] text-[var(--select-dropdown-text)]",
276
276
  m ? "border max-h-36 opacity-100 scale-100" : "max-h-0 opacity-0 scale-95 pointer-events-none"
@@ -281,27 +281,27 @@ const _e = e.forwardRef(
281
281
  overflowY: r.length > 3 ? "auto" : "hidden",
282
282
  position: "fixed",
283
283
  // Use fixed positioning to escape container overflow
284
- top: m ? `${c.top}px` : "auto",
285
- left: m ? `${c.left}px` : "auto",
286
- width: m ? `${c.width}px` : "auto",
284
+ top: m ? `${d.top}px` : "auto",
285
+ left: m ? `${d.left}px` : "auto",
286
+ width: m ? `${d.width}px` : "auto",
287
287
  zIndex: 9999,
288
288
  boxShadow: m ? "var(--select-dropdown-shadow)" : "none"
289
289
  }
290
290
  },
291
- A.length === 0 ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, "Nenhuma opção encontrada") : A.map((n) => /* @__PURE__ */ e.createElement(
291
+ W.length === 0 ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, "Nenhuma opção encontrada") : W.map((n) => /* @__PURE__ */ e.createElement(
292
292
  "div",
293
293
  {
294
294
  key: n.value,
295
- className: s(
295
+ className: i(
296
296
  "px-3 py-2 cursor-pointer text-sm transition-colors duration-150",
297
297
  "hover:bg-[var(--select-dropdown-hover)]",
298
- L === n.value && "bg-[var(--select-dropdown-selected)]"
298
+ R === n.value && "bg-[var(--select-dropdown-selected)]"
299
299
  ),
300
300
  onMouseDown: () => oe(n.value)
301
301
  },
302
302
  n.label
303
303
  ))
304
- ), Y && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, Y));
304
+ ), U && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, U));
305
305
  }
306
306
  );
307
307
  _e.displayName = "Select";
@@ -314,33 +314,33 @@ const Pe = e.forwardRef(
314
314
  onBlur: f,
315
315
  Icon: y,
316
316
  iconClassName: v,
317
- iconAction: I,
318
- containerClassName: _,
319
- rows: R = 4,
317
+ iconAction: T,
318
+ containerClassName: P,
319
+ rows: S = 4,
320
320
  ...x
321
321
  }, h) => {
322
- var k, S, M;
323
- const [p, B] = e.useState(!1), N = ie(), F = N == null ? void 0 : N.control, m = N == null ? void 0 : N.register, g = F && t ? ce({ control: F, name: t }) : void 0, w = x.value ?? g ?? "", C = (M = (S = (k = N == null ? void 0 : N.formState) == null ? void 0 : k.errors) == null ? void 0 : S[t]) == null ? void 0 : M.message, c = p || !!w;
324
- return /* @__PURE__ */ e.createElement("div", { className: s("relative", _) }, /* @__PURE__ */ e.createElement(
322
+ var C, k, _;
323
+ const [p, B] = e.useState(!1), E = ie(), F = E == null ? void 0 : E.control, m = E == null ? void 0 : E.register, g = F && t ? ce({ control: F, name: t }) : void 0, w = x.value ?? g ?? "", N = (_ = (k = (C = E == null ? void 0 : E.formState) == null ? void 0 : C.errors) == null ? void 0 : k[t]) == null ? void 0 : _.message, d = p || !!w;
324
+ return /* @__PURE__ */ e.createElement("div", { className: i("relative", P) }, /* @__PURE__ */ e.createElement(
325
325
  "textarea",
326
326
  {
327
327
  id: x.id || t,
328
- rows: R,
329
- className: s(
328
+ rows: S,
329
+ className: i(
330
330
  "peer flex min-h-[80px] w-full border border-[var(--primary,#2563eb)] rounded-md bg-[var(--input-bg,#fff)] text-[var(--input-text,#222)] px-3 pt-6 pb-2 text-sm placeholder-transparent transition focus:outline-none focus:border-[var(--primary,#2563eb)] disabled:cursor-not-allowed disabled:opacity-50 resize-vertical",
331
331
  y ? "pr-12" : "",
332
332
  // espaço extra para ícone customizado
333
333
  a
334
334
  ),
335
- onFocus: (d) => {
336
- B(!0), o && o(d);
335
+ onFocus: (u) => {
336
+ B(!0), o && o(u);
337
337
  },
338
- ...N && t ? (() => {
339
- const d = m(t), H = d.onBlur;
338
+ ...E && t ? (() => {
339
+ const u = m(t), H = u.onBlur;
340
340
  return {
341
- ...d,
341
+ ...u,
342
342
  ref: (D) => {
343
- typeof h == "function" ? h(D) : h && (h.current = D), d.ref && d.ref(D);
343
+ typeof h == "function" ? h(D) : h && (h.current = D), u.ref && u.ref(D);
344
344
  },
345
345
  onBlur: (D) => {
346
346
  B(!1), f && f(D), H && H(D);
@@ -348,8 +348,8 @@ const Pe = e.forwardRef(
348
348
  };
349
349
  })() : {
350
350
  ref: h,
351
- onBlur: (d) => {
352
- B(!1), f && f(d);
351
+ onBlur: (u) => {
352
+ B(!1), f && f(u);
353
353
  }
354
354
  },
355
355
  ...x
@@ -358,23 +358,23 @@ const Pe = e.forwardRef(
358
358
  "label",
359
359
  {
360
360
  htmlFor: x.id || t,
361
- className: s(
361
+ className: i(
362
362
  "absolute left-3 z-10 origin-[0] cursor-text select-none text-sm text-gray-400 transition-all duration-200",
363
- c ? "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white" : "top-3 scale-100 translate-y-0.5"
363
+ d ? "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white" : "top-3 scale-100 translate-y-0.5"
364
364
  )
365
365
  },
366
366
  r
367
367
  ), y && /* @__PURE__ */ e.createElement(
368
368
  "div",
369
369
  {
370
- className: s(
370
+ className: i(
371
371
  "absolute top-3 right-3 text-gray-400 cursor-pointer hover:text-[var(--primary,#2563eb)] transition-colors duration-200",
372
372
  v
373
373
  ),
374
- onClick: I
374
+ onClick: T
375
375
  },
376
376
  /* @__PURE__ */ e.createElement(y, null)
377
- ), C && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, C));
377
+ ), N && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, N));
378
378
  }
379
379
  );
380
380
  Pe.displayName = "Textarea";
@@ -387,75 +387,75 @@ const Ie = e.forwardRef(
387
387
  containerClassName: f,
388
388
  isClearable: y,
389
389
  defaultOptions: v = !1,
390
- loadingMessage: I = "Carregando...",
391
- noOptionsMessage: _ = "Nenhuma opção encontrada",
392
- searchable: R = !1,
390
+ loadingMessage: T = "Carregando...",
391
+ noOptionsMessage: P = "Nenhuma opção encontrada",
392
+ searchable: S = !1,
393
393
  debounceMs: x = 300,
394
394
  onFocus: h,
395
395
  onBlur: p,
396
396
  ...B
397
- }, N) => {
398
- var U, Q, G;
399
- const [F, m] = e.useState(!1), [g, w] = e.useState(!1), [C, c] = e.useState([]), [k, S] = e.useState(!1), [M, d] = e.useState(""), [H, D] = e.useState(""), [L, Y] = e.useState({
397
+ }, E) => {
398
+ var j, Z, Y;
399
+ const [F, m] = e.useState(!1), [g, w] = e.useState(!1), [N, d] = e.useState([]), [C, k] = e.useState(!1), [_, u] = e.useState(""), [H, D] = e.useState(""), [R, U] = e.useState({
400
400
  top: 0,
401
401
  left: 0,
402
402
  width: 0
403
- }), q = e.useRef(null), V = e.useRef(null), A = ie(), E = A == null ? void 0 : A.control, j = E && t ? ce({ control: E, name: t }) : void 0, z = B.value ?? j ?? "", $ = (G = (Q = (U = A == null ? void 0 : A.formState) == null ? void 0 : U.errors) == null ? void 0 : Q[t]) == null ? void 0 : G.message, K = F || !!z, X = e.useCallback(() => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 768, []), Z = e.useCallback(() => {
404
- if (q.current && g) {
405
- const b = q.current.getBoundingClientRect(), O = X(), re = window.innerHeight, i = window.innerWidth, P = 152;
406
- let J = b.bottom + 4, se = b.left;
403
+ }), G = e.useRef(null), V = e.useRef(null), W = ie(), L = W == null ? void 0 : W.control, q = L && t ? ce({ control: L, name: t }) : void 0, M = B.value ?? q ?? "", z = (Y = (Z = (j = W == null ? void 0 : W.formState) == null ? void 0 : j.errors) == null ? void 0 : Z[t]) == null ? void 0 : Y.message, K = F || !!M, ee = e.useCallback(() => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 768, []), Q = e.useCallback(() => {
404
+ if (G.current && g) {
405
+ const b = G.current.getBoundingClientRect(), O = ee(), re = window.innerHeight, c = window.innerWidth, I = 152;
406
+ let X = b.bottom + 4, se = b.left;
407
407
  if (O) {
408
408
  const le = re - b.bottom, fe = b.top;
409
- le < P && fe > P && (J = b.top - P - 4);
410
- const de = 16, me = i - b.width - de;
409
+ le < I && fe > I && (X = b.top - I - 4);
410
+ const de = 16, me = c - b.width - de;
411
411
  se = Math.min(Math.max(se, de), me);
412
412
  } else
413
- re - b.bottom < P && (J = b.top - P - 4);
414
- Y({
415
- top: J,
413
+ re - b.bottom < I && (X = b.top - I - 4);
414
+ U({
415
+ top: X,
416
416
  left: se,
417
417
  width: b.width
418
418
  });
419
419
  }
420
- }, [g, X]);
420
+ }, [g, ee]);
421
421
  e.useEffect(() => {
422
- if (Z(), g) {
423
- const b = () => Z(), O = () => Z();
422
+ if (Q(), g) {
423
+ const b = () => Q(), O = () => Q();
424
424
  return window.addEventListener("resize", b), window.addEventListener("scroll", O, !0), () => {
425
425
  window.removeEventListener("resize", b), window.removeEventListener("scroll", O, !0);
426
426
  };
427
427
  }
428
- }, [g, Z]), e.useEffect(() => {
428
+ }, [g, Q]), e.useEffect(() => {
429
429
  const b = setTimeout(() => {
430
- D(M);
430
+ D(_);
431
431
  }, x);
432
432
  return () => clearTimeout(b);
433
- }, [M, x]), e.useEffect(() => {
434
- (g || v && C.length === 0) && ee(R ? H : void 0);
433
+ }, [_, x]), e.useEffect(() => {
434
+ (g || v && N.length === 0) && J(S ? H : void 0);
435
435
  }, [H, g]), e.useEffect(() => {
436
- v === !0 ? ee() : Array.isArray(v) && c(v);
436
+ v === !0 ? J() : Array.isArray(v) && d(v);
437
437
  }, []);
438
- const ee = async (b) => {
438
+ const J = async (b) => {
439
439
  try {
440
- S(!0);
440
+ k(!0);
441
441
  const O = await r(b);
442
- c(O);
442
+ d(O);
443
443
  } catch (O) {
444
- console.error("Error loading options:", O), c([]);
444
+ console.error("Error loading options:", O), d([]);
445
445
  } finally {
446
- S(!1);
446
+ k(!1);
447
447
  }
448
448
  };
449
449
  e.useEffect(() => {
450
450
  const b = (O) => {
451
- q.current && !q.current.contains(O.target) && (w(!1), m(!1), d(""));
451
+ G.current && !G.current.contains(O.target) && (w(!1), m(!1), u(""));
452
452
  };
453
453
  return document.addEventListener("mousedown", b), () => {
454
454
  document.removeEventListener("mousedown", b);
455
455
  };
456
456
  }, []);
457
457
  const ne = () => {
458
- g || (w(!0), m(!0), R && V.current && setTimeout(() => {
458
+ g || (w(!0), m(!0), S && V.current && setTimeout(() => {
459
459
  var b;
460
460
  return (b = V.current) == null ? void 0 : b.focus();
461
461
  }, 0));
@@ -464,66 +464,66 @@ const Ie = e.forwardRef(
464
464
  }, te = (b) => {
465
465
  p && p(b);
466
466
  }, ae = (b) => {
467
- d(b.target.value);
468
- }, l = (b) => {
469
- if (A && t && A.setValue(t, b), B.onChange) {
467
+ u(b.target.value);
468
+ }, s = (b) => {
469
+ if (W && t && W.setValue(t, b), B.onChange) {
470
470
  const O = {
471
471
  target: { value: b }
472
472
  };
473
473
  B.onChange(O);
474
474
  }
475
- w(!1), m(!1), d("");
476
- }, T = (b) => {
477
- if (b.stopPropagation(), A && t && A.setValue(t, ""), B.onChange) {
475
+ w(!1), m(!1), u("");
476
+ }, A = (b) => {
477
+ if (b.stopPropagation(), W && t && W.setValue(t, ""), B.onChange) {
478
478
  const O = {
479
479
  target: { value: "" }
480
480
  };
481
481
  B.onChange(O);
482
482
  }
483
- w(!1), m(!1), d("");
484
- }, n = C.find((b) => b.value === z), W = R && g ? M : (n == null ? void 0 : n.label) || "";
485
- return /* @__PURE__ */ e.createElement("div", { className: s("relative", f), ref: q }, /* @__PURE__ */ e.createElement(
483
+ w(!1), m(!1), u("");
484
+ }, n = N.find((b) => b.value === M), $ = S && g ? _ : (n == null ? void 0 : n.label) || "";
485
+ return /* @__PURE__ */ e.createElement("div", { className: i("relative", f), ref: G }, /* @__PURE__ */ e.createElement(
486
486
  "div",
487
487
  {
488
488
  id: B.id || t,
489
- tabIndex: R ? -1 : 0,
489
+ tabIndex: S ? -1 : 0,
490
490
  role: "button",
491
491
  "aria-haspopup": "listbox",
492
492
  "aria-expanded": g,
493
- className: s(
493
+ className: i(
494
494
  "peer flex items-center h-12 w-full border border-[var(--primary,#2563eb)] rounded-md bg-[var(--input-bg,#fff)] text-[var(--input-text,#222)] px-3 py-3 text-sm transition focus:outline-none focus:border-[var(--primary,#2563eb)] disabled:cursor-not-allowed disabled:opacity-50 appearance-none cursor-pointer relative",
495
495
  o
496
496
  ),
497
497
  onClick: ne,
498
- onFocus: R ? void 0 : oe,
499
- onBlur: R ? void 0 : te,
500
- ref: N
498
+ onFocus: S ? void 0 : oe,
499
+ onBlur: S ? void 0 : te,
500
+ ref: E
501
501
  },
502
- R ? /* @__PURE__ */ e.createElement(
502
+ S ? /* @__PURE__ */ e.createElement(
503
503
  "input",
504
504
  {
505
505
  ref: V,
506
506
  type: "text",
507
- value: W,
507
+ value: $,
508
508
  onChange: ae,
509
509
  onFocus: oe,
510
510
  onBlur: te,
511
511
  placeholder: a ? "" : "Selecione...",
512
- className: s(
512
+ className: i(
513
513
  "w-full bg-transparent border-none outline-none text-sm",
514
- !z && !M && "text-gray-400"
514
+ !M && !_ && "text-gray-400"
515
515
  )
516
516
  }
517
- ) : /* @__PURE__ */ e.createElement("span", { className: s("block truncate", !z && "text-gray-400") }, (n == null ? void 0 : n.label) || !a && "Selecione..."),
518
- k && /* @__PURE__ */ e.createElement("div", { className: "absolute right-8 top-1/2 -translate-y-1/2" }, /* @__PURE__ */ e.createElement("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-[var(--primary,#2563eb)]" })),
519
- y && z && !k && /* @__PURE__ */ e.createElement(
517
+ ) : /* @__PURE__ */ e.createElement("span", { className: i("block truncate", !M && "text-gray-400") }, (n == null ? void 0 : n.label) || !a && "Selecione..."),
518
+ C && /* @__PURE__ */ e.createElement("div", { className: "absolute right-8 top-1/2 -translate-y-1/2" }, /* @__PURE__ */ e.createElement("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-[var(--primary,#2563eb)]" })),
519
+ y && M && !C && /* @__PURE__ */ e.createElement(
520
520
  "button",
521
521
  {
522
522
  type: "button",
523
523
  tabIndex: -1,
524
524
  "aria-label": "Limpar seleção",
525
525
  className: "absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 bg-transparent p-1 rounded-full focus:outline-none",
526
- onClick: T
526
+ onClick: A
527
527
  },
528
528
  "✕"
529
529
  )
@@ -531,7 +531,7 @@ const Ie = e.forwardRef(
531
531
  "label",
532
532
  {
533
533
  htmlFor: B.id || t,
534
- className: s(
534
+ className: i(
535
535
  "absolute left-3 z-10 origin-[0] cursor-text select-none text-sm text-gray-400 transition-all duration-200",
536
536
  K ? "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white" : "top-3 scale-100 translate-y-0.5"
537
537
  )
@@ -540,37 +540,37 @@ const Ie = e.forwardRef(
540
540
  ), /* @__PURE__ */ e.createElement(
541
541
  "div",
542
542
  {
543
- className: s(
543
+ className: i(
544
544
  "absolute left-0 w-full mt-1 rounded-md transition-all duration-200 overflow-hidden",
545
545
  "bg-[var(--select-dropdown-bg)] border-[var(--select-dropdown-border)] text-[var(--select-dropdown-text)]",
546
546
  g ? "border max-h-36 opacity-100 scale-100" : "max-h-0 opacity-0 scale-95 pointer-events-none"
547
547
  ),
548
548
  style: {
549
549
  maxHeight: g ? "9.5rem" : "0",
550
- overflowY: C.length > 3 ? "auto" : "hidden",
550
+ overflowY: N.length > 3 ? "auto" : "hidden",
551
551
  position: "fixed",
552
552
  // Use fixed positioning to escape container overflow
553
- top: g ? `${L.top}px` : "auto",
554
- left: g ? `${L.left}px` : "auto",
555
- width: g ? `${L.width}px` : "auto",
553
+ top: g ? `${R.top}px` : "auto",
554
+ left: g ? `${R.left}px` : "auto",
555
+ width: g ? `${R.width}px` : "auto",
556
556
  zIndex: 9999,
557
557
  boxShadow: g ? "var(--select-dropdown-shadow)" : "none"
558
558
  }
559
559
  },
560
- k ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, I) : C.length === 0 ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, _) : C.map((b) => /* @__PURE__ */ e.createElement(
560
+ C ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, T) : N.length === 0 ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, P) : N.map((b) => /* @__PURE__ */ e.createElement(
561
561
  "div",
562
562
  {
563
563
  key: b.value,
564
- className: s(
564
+ className: i(
565
565
  "px-3 py-2 cursor-pointer text-sm transition-colors duration-150",
566
566
  "hover:bg-[var(--select-dropdown-hover)]",
567
- z === b.value && "bg-[var(--select-dropdown-selected)]"
567
+ M === b.value && "bg-[var(--select-dropdown-selected)]"
568
568
  ),
569
- onMouseDown: () => l(b.value)
569
+ onMouseDown: () => s(b.value)
570
570
  },
571
571
  b.label
572
572
  ))
573
- ), $ && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, $));
573
+ ), z && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, z));
574
574
  }
575
575
  );
576
576
  Ie.displayName = "AsyncSelect";
@@ -583,75 +583,75 @@ const Te = e.forwardRef(
583
583
  containerClassName: f,
584
584
  isClearable: y,
585
585
  searchable: v = !1,
586
- filterPlaceholder: I = "Digite para filtrar...",
587
- caseSensitive: _ = !1,
588
- filterFunction: R,
586
+ filterPlaceholder: T = "Digite para filtrar...",
587
+ caseSensitive: P = !1,
588
+ filterFunction: S,
589
589
  onFocus: x,
590
590
  onBlur: h,
591
591
  ...p
592
592
  }, B) => {
593
593
  var oe, te, ae;
594
- const [N, F] = e.useState(!1), [m, g] = e.useState(!1), [w, C] = e.useState(""), [c, k] = e.useState({
594
+ const [E, F] = e.useState(!1), [m, g] = e.useState(!1), [w, N] = e.useState(""), [d, C] = e.useState({
595
595
  top: 0,
596
596
  left: 0,
597
597
  width: 0
598
- }), S = e.useRef(null), M = e.useRef(null), d = ie(), H = d == null ? void 0 : d.control, D = H && t ? ce({ control: H, name: t }) : void 0, L = p.value ?? D ?? [], Y = (ae = (te = (oe = d == null ? void 0 : d.formState) == null ? void 0 : oe.errors) == null ? void 0 : te[t]) == null ? void 0 : ae.message, V = R || ((l, T) => {
599
- const n = _ ? l.label : l.label.toLowerCase(), W = _ ? T : T.toLowerCase();
600
- return n.includes(W);
601
- }), A = w.trim() ? r.filter((l) => V(l, w.trim())) : r, E = N || L && L.length > 0 || v && !!w, j = e.useCallback(() => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 768, []), z = e.useCallback(() => {
602
- if (S.current && m) {
603
- const l = S.current.getBoundingClientRect(), T = j(), n = window.innerHeight, W = window.innerWidth, U = 152;
604
- let Q = l.bottom + 4, G = l.left;
605
- if (T) {
606
- const b = n - l.bottom, O = l.top;
607
- b < U && O > U && (Q = l.top - U - 4);
608
- const re = 16, i = W - l.width - re;
609
- G = Math.min(Math.max(G, re), i);
598
+ }), k = e.useRef(null), _ = e.useRef(null), u = ie(), H = u == null ? void 0 : u.control, D = H && t ? ce({ control: H, name: t }) : void 0, R = p.value ?? D ?? [], U = (ae = (te = (oe = u == null ? void 0 : u.formState) == null ? void 0 : oe.errors) == null ? void 0 : te[t]) == null ? void 0 : ae.message, V = S || ((s, A) => {
599
+ const n = P ? s.label : s.label.toLowerCase(), $ = P ? A : A.toLowerCase();
600
+ return n.includes($);
601
+ }), W = w.trim() ? r.filter((s) => V(s, w.trim())) : r, L = E || R && R.length > 0 || v && !!w, q = e.useCallback(() => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 768, []), M = e.useCallback(() => {
602
+ if (k.current && m) {
603
+ const s = k.current.getBoundingClientRect(), A = q(), n = window.innerHeight, $ = window.innerWidth, j = 152;
604
+ let Z = s.bottom + 4, Y = s.left;
605
+ if (A) {
606
+ const b = n - s.bottom, O = s.top;
607
+ b < j && O > j && (Z = s.top - j - 4);
608
+ const re = 16, c = $ - s.width - re;
609
+ Y = Math.min(Math.max(Y, re), c);
610
610
  } else
611
- n - l.bottom < U && (Q = l.top - U - 4);
612
- k({
613
- top: Q,
614
- left: G,
615
- width: l.width
611
+ n - s.bottom < j && (Z = s.top - j - 4);
612
+ C({
613
+ top: Z,
614
+ left: Y,
615
+ width: s.width
616
616
  });
617
617
  }
618
- }, [m, j]);
618
+ }, [m, q]);
619
619
  e.useEffect(() => {
620
- if (z(), m) {
621
- const l = () => z(), T = () => z();
622
- return window.addEventListener("resize", l), window.addEventListener("scroll", T, !0), () => {
623
- window.removeEventListener("resize", l), window.removeEventListener("scroll", T, !0);
620
+ if (M(), m) {
621
+ const s = () => M(), A = () => M();
622
+ return window.addEventListener("resize", s), window.addEventListener("scroll", A, !0), () => {
623
+ window.removeEventListener("resize", s), window.removeEventListener("scroll", A, !0);
624
624
  };
625
625
  }
626
- }, [m, z]), e.useEffect(() => {
627
- const l = (T) => {
628
- S.current && !S.current.contains(T.target) && (g(!1), F(!1));
626
+ }, [m, M]), e.useEffect(() => {
627
+ const s = (A) => {
628
+ k.current && !k.current.contains(A.target) && (g(!1), F(!1));
629
629
  };
630
- return document.addEventListener("mousedown", l), () => {
631
- document.removeEventListener("mousedown", l);
630
+ return document.addEventListener("mousedown", s), () => {
631
+ document.removeEventListener("mousedown", s);
632
632
  };
633
633
  }, []);
634
- const $ = () => {
635
- g((l) => !l), F(!0);
636
- }, K = (l) => {
637
- F(!0), x && x(l);
638
- }, X = (l) => {
639
- h && h(l);
640
- }, Z = (l) => {
634
+ const z = () => {
635
+ g((s) => !s), F(!0);
636
+ }, K = (s) => {
637
+ F(!0), x && x(s);
638
+ }, ee = (s) => {
639
+ h && h(s);
640
+ }, Q = (s) => {
641
641
  var n;
642
- let T;
643
- L.includes(l) ? T = L.filter((W) => W !== l) : T = [...L, l], d && t && d.setValue(t, T), p.onChange && ((n = p.onChange) == null || n.call(p, {
644
- target: { value: T }
642
+ let A;
643
+ R.includes(s) ? A = R.filter(($) => $ !== s) : A = [...R, s], u && t && u.setValue(t, A), p.onChange && ((n = p.onChange) == null || n.call(p, {
644
+ target: { value: A }
645
645
  })), F(!0);
646
- }, ee = (l) => {
647
- var T;
648
- l.stopPropagation(), d && t && d.setValue(t, []), p.onChange && ((T = p.onChange) == null || T.call(p, {
646
+ }, J = (s) => {
647
+ var A;
648
+ s.stopPropagation(), u && t && u.setValue(t, []), p.onChange && ((A = p.onChange) == null || A.call(p, {
649
649
  target: { value: [] }
650
650
  })), g(!1), F(!1);
651
- }, ne = (l) => {
652
- C(l.target.value);
651
+ }, ne = (s) => {
652
+ N(s.target.value);
653
653
  };
654
- return /* @__PURE__ */ e.createElement("div", { className: s("relative", f), ref: S }, /* @__PURE__ */ e.createElement(
654
+ return /* @__PURE__ */ e.createElement("div", { className: i("relative", f), ref: k }, /* @__PURE__ */ e.createElement(
655
655
  "div",
656
656
  {
657
657
  id: p.id || t,
@@ -659,13 +659,13 @@ const Te = e.forwardRef(
659
659
  role: "button",
660
660
  "aria-haspopup": "listbox",
661
661
  "aria-expanded": m,
662
- className: s(
662
+ className: i(
663
663
  "peer flex items-center h-12 w-full border border-[var(--primary,#2563eb)] rounded-md bg-[var(--input-bg,#fff)] text-[var(--input-text,#222)] px-3 py-3 text-sm transition focus:outline-none focus:border-[var(--primary,#2563eb)] disabled:cursor-not-allowed disabled:opacity-50 appearance-none cursor-pointer relative",
664
664
  o
665
665
  ),
666
- onClick: v ? void 0 : $,
666
+ onClick: v ? void 0 : z,
667
667
  onFocus: v ? void 0 : K,
668
- onBlur: v ? void 0 : X,
668
+ onBlur: v ? void 0 : ee,
669
669
  ref: B
670
670
  },
671
671
  /* @__PURE__ */ e.createElement(
@@ -674,25 +674,25 @@ const Te = e.forwardRef(
674
674
  className: "flex flex-nowrap gap-1 items-center min-h-[1.5rem] w-full overflow-x-auto",
675
675
  style: { scrollbarWidth: "none" }
676
676
  },
677
- L && L.length > 0 ? r.filter((l) => L.includes(l.value)).map((l) => /* @__PURE__ */ e.createElement(
677
+ R && R.length > 0 ? r.filter((s) => R.includes(s.value)).map((s) => /* @__PURE__ */ e.createElement(
678
678
  "span",
679
679
  {
680
- key: l.value,
680
+ key: s.value,
681
681
  className: "flex items-center border border-blue-200 bg-blue-50 text-blue-700 rounded-2xl px-3 py-1 text-xs shadow-sm mr-1 gap-2",
682
682
  style: { maxWidth: "140px" }
683
683
  },
684
- /* @__PURE__ */ e.createElement("span", { className: "truncate", title: l.label }, l.label),
684
+ /* @__PURE__ */ e.createElement("span", { className: "truncate", title: s.label }, s.label),
685
685
  /* @__PURE__ */ e.createElement(
686
686
  "button",
687
687
  {
688
688
  type: "button",
689
689
  className: "ml-1 text-[var(--primary,#2563eb)] hover:text-red-500 focus:outline-none w-4 h-4 flex items-center justify-center rounded-full transition-colors duration-150",
690
- "aria-label": `Remover ${l.label}`,
690
+ "aria-label": `Remover ${s.label}`,
691
691
  tabIndex: -1,
692
- onClick: (T) => {
693
- T.stopPropagation();
694
- const n = L.filter((W) => W !== l.value);
695
- d && t && d.setValue(t, n), p.onChange && p.onChange({
692
+ onClick: (A) => {
693
+ A.stopPropagation();
694
+ const n = R.filter(($) => $ !== s.value);
695
+ u && t && u.setValue(t, n), p.onChange && p.onChange({
696
696
  target: { value: n }
697
697
  });
698
698
  }
@@ -721,29 +721,29 @@ const Te = e.forwardRef(
721
721
  v && /* @__PURE__ */ e.createElement(
722
722
  "input",
723
723
  {
724
- ref: M,
724
+ ref: _,
725
725
  type: "text",
726
726
  value: w,
727
727
  onChange: ne,
728
- onFocus: (l) => {
729
- F(!0), g(!0), x && x(l);
728
+ onFocus: (s) => {
729
+ F(!0), g(!0), x && x(s);
730
730
  },
731
- onBlur: (l) => {
732
- h && h(l);
731
+ onBlur: (s) => {
732
+ h && h(s);
733
733
  },
734
- placeholder: a ? L && L.length > 0 ? "" : I : I || "Selecione...",
734
+ placeholder: a ? R && R.length > 0 ? "" : T : T || "Selecione...",
735
735
  className: "flex-1 bg-transparent border-none outline-none text-sm min-w-[100px]"
736
736
  }
737
737
  )
738
738
  ),
739
- y && L && L.length > 0 && /* @__PURE__ */ e.createElement(
739
+ y && R && R.length > 0 && /* @__PURE__ */ e.createElement(
740
740
  "button",
741
741
  {
742
742
  type: "button",
743
743
  tabIndex: -1,
744
744
  "aria-label": "Limpar seleção",
745
745
  className: "absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 bg-transparent p-1 rounded-full focus:outline-none",
746
- onClick: ee
746
+ onClick: J
747
747
  },
748
748
  "✕"
749
749
  )
@@ -751,16 +751,16 @@ const Te = e.forwardRef(
751
751
  "label",
752
752
  {
753
753
  htmlFor: p.id || t,
754
- className: s(
754
+ className: i(
755
755
  "absolute left-3 z-10 origin-[0] cursor-text select-none text-sm text-gray-400 transition-all duration-200",
756
- E ? "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white" : "top-3 scale-100 translate-y-0.5"
756
+ L ? "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white" : "top-3 scale-100 translate-y-0.5"
757
757
  )
758
758
  },
759
759
  a
760
760
  ), /* @__PURE__ */ e.createElement(
761
761
  "div",
762
762
  {
763
- className: s(
763
+ className: i(
764
764
  "absolute left-0 w-full mt-1 rounded-md transition-all duration-200 overflow-hidden",
765
765
  "bg-[var(--select-dropdown-bg)] border-[var(--select-dropdown-border)] text-[var(--select-dropdown-text)]",
766
766
  m ? "border max-h-36 opacity-100 scale-100" : "max-h-0 opacity-0 scale-95 pointer-events-none"
@@ -770,40 +770,40 @@ const Te = e.forwardRef(
770
770
  overflowY: r.length > 3 ? "auto" : "hidden",
771
771
  position: "fixed",
772
772
  // Use fixed positioning to escape container overflow
773
- top: m ? `${c.top}px` : "auto",
774
- left: m ? `${c.left}px` : "auto",
775
- width: m ? `${c.width}px` : "auto",
773
+ top: m ? `${d.top}px` : "auto",
774
+ left: m ? `${d.left}px` : "auto",
775
+ width: m ? `${d.width}px` : "auto",
776
776
  zIndex: 9999,
777
777
  boxShadow: m ? "var(--select-dropdown-shadow)" : "none"
778
778
  }
779
779
  },
780
- A.length === 0 ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, "Nenhuma opção encontrada") : A.map((l) => /* @__PURE__ */ e.createElement(
780
+ W.length === 0 ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, "Nenhuma opção encontrada") : W.map((s) => /* @__PURE__ */ e.createElement(
781
781
  "div",
782
782
  {
783
- key: l.value,
784
- className: s(
783
+ key: s.value,
784
+ className: i(
785
785
  "px-3 py-2 cursor-pointer text-sm flex items-center gap-2 transition-colors duration-150",
786
786
  "hover:bg-[var(--select-dropdown-hover)]",
787
- L.includes(l.value) && "bg-[var(--select-dropdown-selected)] font-semibold"
787
+ R.includes(s.value) && "bg-[var(--select-dropdown-selected)] font-semibold"
788
788
  ),
789
- onMouseDown: () => Z(l.value)
789
+ onMouseDown: () => Q(s.value)
790
790
  },
791
791
  /* @__PURE__ */ e.createElement(
792
792
  "input",
793
793
  {
794
794
  type: "checkbox",
795
- checked: L.includes(l.value),
795
+ checked: R.includes(s.value),
796
796
  readOnly: !0,
797
797
  className: "accent-blue-500"
798
798
  }
799
799
  ),
800
- l.label
800
+ s.label
801
801
  ))
802
- ), Y && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, Y));
802
+ ), U && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, U));
803
803
  }
804
804
  );
805
805
  Te.displayName = "MultiSelect";
806
- const Ae = e.forwardRef(
806
+ const ze = e.forwardRef(
807
807
  ({
808
808
  name: t,
809
809
  label: a,
@@ -812,134 +812,134 @@ const Ae = e.forwardRef(
812
812
  containerClassName: f,
813
813
  isClearable: y,
814
814
  defaultOptions: v = !1,
815
- loadingMessage: I = "Carregando...",
816
- noOptionsMessage: _ = "Nenhuma opção encontrada",
817
- searchable: R = !1,
815
+ loadingMessage: T = "Carregando...",
816
+ noOptionsMessage: P = "Nenhuma opção encontrada",
817
+ searchable: S = !1,
818
818
  debounceMs: x = 300,
819
819
  maxSelectedDisplay: h = 3,
820
820
  onFocus: p,
821
821
  onBlur: B,
822
- ...N
822
+ ...E
823
823
  }, F) => {
824
824
  var b, O, re;
825
- const [m, g] = e.useState(!1), [w, C] = e.useState(!1), [c, k] = e.useState([]), [S, M] = e.useState(!1), [d, H] = e.useState(""), [D, L] = e.useState(""), [Y, q] = e.useState({
825
+ const [m, g] = e.useState(!1), [w, N] = e.useState(!1), [d, C] = e.useState([]), [k, _] = e.useState(!1), [u, H] = e.useState(""), [D, R] = e.useState(""), [U, G] = e.useState({
826
826
  top: 0,
827
827
  left: 0,
828
828
  width: 0
829
- }), V = e.useRef(null), A = e.useRef(null), E = ie(), j = E == null ? void 0 : E.control, z = j && t ? ce({ control: j, name: t }) : void 0, $ = N.value ?? z ?? [], K = (re = (O = (b = E == null ? void 0 : E.formState) == null ? void 0 : b.errors) == null ? void 0 : O[t]) == null ? void 0 : re.message, X = m || $ && $.length > 0, Z = e.useCallback(() => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 768, []), ee = e.useCallback(() => {
829
+ }), V = e.useRef(null), W = e.useRef(null), L = ie(), q = L == null ? void 0 : L.control, M = q && t ? ce({ control: q, name: t }) : void 0, z = E.value ?? M ?? [], K = (re = (O = (b = L == null ? void 0 : L.formState) == null ? void 0 : b.errors) == null ? void 0 : O[t]) == null ? void 0 : re.message, ee = m || z && z.length > 0, Q = e.useCallback(() => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 768, []), J = e.useCallback(() => {
830
830
  if (V.current && w) {
831
- const i = V.current.getBoundingClientRect(), P = Z(), J = window.innerHeight, se = window.innerWidth, le = 152;
832
- let fe = i.bottom + 4, de = i.left;
833
- if (P) {
834
- const me = J - i.bottom, Re = i.top;
835
- me < le && Re > le && (fe = i.top - le - 4);
836
- const be = 16, Fe = se - i.width - be;
831
+ const c = V.current.getBoundingClientRect(), I = Q(), X = window.innerHeight, se = window.innerWidth, le = 152;
832
+ let fe = c.bottom + 4, de = c.left;
833
+ if (I) {
834
+ const me = X - c.bottom, Re = c.top;
835
+ me < le && Re > le && (fe = c.top - le - 4);
836
+ const be = 16, Fe = se - c.width - be;
837
837
  de = Math.min(Math.max(de, be), Fe);
838
838
  } else
839
- J - i.bottom < le && (fe = i.top - le - 4);
840
- q({
839
+ X - c.bottom < le && (fe = c.top - le - 4);
840
+ G({
841
841
  top: fe,
842
842
  left: de,
843
- width: i.width
843
+ width: c.width
844
844
  });
845
845
  }
846
- }, [w, Z]);
846
+ }, [w, Q]);
847
847
  e.useEffect(() => {
848
- if (ee(), w) {
849
- const i = () => ee(), P = () => ee();
850
- return window.addEventListener("resize", i), window.addEventListener("scroll", P, !0), () => {
851
- window.removeEventListener("resize", i), window.removeEventListener("scroll", P, !0);
848
+ if (J(), w) {
849
+ const c = () => J(), I = () => J();
850
+ return window.addEventListener("resize", c), window.addEventListener("scroll", I, !0), () => {
851
+ window.removeEventListener("resize", c), window.removeEventListener("scroll", I, !0);
852
852
  };
853
853
  }
854
- }, [w, ee]), e.useEffect(() => {
855
- const i = setTimeout(() => {
856
- L(d);
854
+ }, [w, J]), e.useEffect(() => {
855
+ const c = setTimeout(() => {
856
+ R(u);
857
857
  }, x);
858
- return () => clearTimeout(i);
859
- }, [d, x]), e.useEffect(() => {
860
- (w || v && c.length === 0) && ne(R ? D : void 0);
858
+ return () => clearTimeout(c);
859
+ }, [u, x]), e.useEffect(() => {
860
+ (w || v && d.length === 0) && ne(S ? D : void 0);
861
861
  }, [D, w]), e.useEffect(() => {
862
- v === !0 ? ne() : Array.isArray(v) && k(v);
862
+ v === !0 ? ne() : Array.isArray(v) && C(v);
863
863
  }, []);
864
- const ne = async (i) => {
864
+ const ne = async (c) => {
865
865
  try {
866
- M(!0);
867
- const P = await r(i);
868
- k(P);
869
- } catch (P) {
870
- console.error("Error loading options:", P), k([]);
866
+ _(!0);
867
+ const I = await r(c);
868
+ C(I);
869
+ } catch (I) {
870
+ console.error("Error loading options:", I), C([]);
871
871
  } finally {
872
- M(!1);
872
+ _(!1);
873
873
  }
874
874
  };
875
875
  e.useEffect(() => {
876
- const i = (P) => {
877
- V.current && !V.current.contains(P.target) && (C(!1), g(!1), H(""));
876
+ const c = (I) => {
877
+ V.current && !V.current.contains(I.target) && (N(!1), g(!1), H(""));
878
878
  };
879
- return document.addEventListener("mousedown", i), () => {
880
- document.removeEventListener("mousedown", i);
879
+ return document.addEventListener("mousedown", c), () => {
880
+ document.removeEventListener("mousedown", c);
881
881
  };
882
882
  }, []);
883
883
  const oe = () => {
884
- w || (C(!0), g(!0), R && A.current && setTimeout(() => {
885
- var i;
886
- return (i = A.current) == null ? void 0 : i.focus();
884
+ w || (N(!0), g(!0), S && W.current && setTimeout(() => {
885
+ var c;
886
+ return (c = W.current) == null ? void 0 : c.focus();
887
887
  }, 0));
888
- }, te = (i) => {
889
- g(!0), p && p(i);
890
- }, ae = (i) => {
891
- B && B(i);
892
- }, l = (i) => {
893
- H(i.target.value);
894
- }, T = (i) => {
895
- let P;
896
- $.includes(i) ? P = $.filter((J) => J !== i) : P = [...$, i], E && t && E.setValue(t, P), N.onChange && N.onChange({
897
- target: { value: P }
888
+ }, te = (c) => {
889
+ g(!0), p && p(c);
890
+ }, ae = (c) => {
891
+ B && B(c);
892
+ }, s = (c) => {
893
+ H(c.target.value);
894
+ }, A = (c) => {
895
+ let I;
896
+ z.includes(c) ? I = z.filter((X) => X !== c) : I = [...z, c], L && t && L.setValue(t, I), E.onChange && E.onChange({
897
+ target: { value: I }
898
898
  }), g(!0);
899
- }, n = (i, P) => {
900
- P.stopPropagation();
901
- const J = $.filter((se) => se !== i);
902
- E && t && E.setValue(t, J), N.onChange && N.onChange({
903
- target: { value: J }
899
+ }, n = (c, I) => {
900
+ I.stopPropagation();
901
+ const X = z.filter((se) => se !== c);
902
+ L && t && L.setValue(t, X), E.onChange && E.onChange({
903
+ target: { value: X }
904
904
  });
905
- }, W = (i) => {
906
- i.stopPropagation(), E && t && E.setValue(t, []), N.onChange && N.onChange({
905
+ }, $ = (c) => {
906
+ c.stopPropagation(), L && t && L.setValue(t, []), E.onChange && E.onChange({
907
907
  target: { value: [] }
908
- }), C(!1), g(!1), H("");
909
- }, U = c.filter((i) => $.includes(i.value)), Q = U.slice(0, h), G = U.length - h;
910
- return /* @__PURE__ */ e.createElement("div", { className: s("relative", f), ref: V }, /* @__PURE__ */ e.createElement(
908
+ }), N(!1), g(!1), H("");
909
+ }, j = d.filter((c) => z.includes(c.value)), Z = j.slice(0, h), Y = j.length - h;
910
+ return /* @__PURE__ */ e.createElement("div", { className: i("relative", f), ref: V }, /* @__PURE__ */ e.createElement(
911
911
  "div",
912
912
  {
913
- id: N.id || t,
914
- tabIndex: R ? -1 : 0,
913
+ id: E.id || t,
914
+ tabIndex: S ? -1 : 0,
915
915
  role: "button",
916
916
  "aria-haspopup": "listbox",
917
917
  "aria-expanded": w,
918
- className: s(
918
+ className: i(
919
919
  "peer flex items-center min-h-12 w-full border border-[var(--primary,#2563eb)] rounded-md bg-[var(--input-bg,#fff)] text-[var(--input-text,#222)] px-3 py-2 text-sm transition focus:outline-none focus:border-[var(--primary,#2563eb)] disabled:cursor-not-allowed disabled:opacity-50 appearance-none cursor-pointer relative",
920
920
  o
921
921
  ),
922
922
  onClick: oe,
923
- onFocus: R ? void 0 : te,
924
- onBlur: R ? void 0 : ae,
923
+ onFocus: S ? void 0 : te,
924
+ onBlur: S ? void 0 : ae,
925
925
  ref: F
926
926
  },
927
- /* @__PURE__ */ e.createElement("div", { className: "flex flex-wrap gap-1 items-center min-h-[1.5rem] w-full" }, Q.map((i) => /* @__PURE__ */ e.createElement(
927
+ /* @__PURE__ */ e.createElement("div", { className: "flex flex-wrap gap-1 items-center min-h-[1.5rem] w-full" }, Z.map((c) => /* @__PURE__ */ e.createElement(
928
928
  "span",
929
929
  {
930
- key: i.value,
930
+ key: c.value,
931
931
  className: "flex items-center border border-blue-200 bg-blue-50 text-blue-700 rounded-2xl px-3 py-1 text-xs shadow-sm gap-2",
932
932
  style: { maxWidth: "140px" }
933
933
  },
934
- /* @__PURE__ */ e.createElement("span", { className: "truncate", title: i.label }, i.label),
934
+ /* @__PURE__ */ e.createElement("span", { className: "truncate", title: c.label }, c.label),
935
935
  /* @__PURE__ */ e.createElement(
936
936
  "button",
937
937
  {
938
938
  type: "button",
939
939
  className: "ml-1 text-[var(--primary,#2563eb)] hover:text-red-500 focus:outline-none w-4 h-4 flex items-center justify-center rounded-full transition-colors duration-150",
940
- "aria-label": `Remover ${i.label}`,
940
+ "aria-label": `Remover ${c.label}`,
941
941
  tabIndex: -1,
942
- onClick: (P) => n(i.value, P)
942
+ onClick: (I) => n(c.value, I)
943
943
  },
944
944
  /* @__PURE__ */ e.createElement(
945
945
  "svg",
@@ -961,88 +961,88 @@ const Ae = e.forwardRef(
961
961
  )
962
962
  )
963
963
  )
964
- )), G > 0 && /* @__PURE__ */ e.createElement("span", { className: "flex items-center border border-gray-200 bg-gray-100 text-gray-600 rounded-2xl px-3 py-1 text-xs" }, "+", G, " mais"), R ? /* @__PURE__ */ e.createElement(
964
+ )), Y > 0 && /* @__PURE__ */ e.createElement("span", { className: "flex items-center border border-gray-200 bg-gray-100 text-gray-600 rounded-2xl px-3 py-1 text-xs" }, "+", Y, " mais"), S ? /* @__PURE__ */ e.createElement(
965
965
  "input",
966
966
  {
967
- ref: A,
967
+ ref: W,
968
968
  type: "text",
969
- value: d,
970
- onChange: l,
969
+ value: u,
970
+ onChange: s,
971
971
  onFocus: te,
972
972
  onBlur: ae,
973
- placeholder: $.length === 0 && !a ? "Selecione..." : "",
973
+ placeholder: z.length === 0 && !a ? "Selecione..." : "",
974
974
  className: "flex-1 min-w-[120px] bg-transparent border-none outline-none text-sm"
975
975
  }
976
- ) : $.length === 0 && !a && /* @__PURE__ */ e.createElement("span", { className: "text-gray-400 text-sm" }, "Selecione...")),
977
- S && /* @__PURE__ */ e.createElement("div", { className: "absolute right-8 top-1/2 -translate-y-1/2" }, /* @__PURE__ */ e.createElement("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-[var(--primary,#2563eb)]" })),
978
- y && $ && $.length > 0 && !S && /* @__PURE__ */ e.createElement(
976
+ ) : z.length === 0 && !a && /* @__PURE__ */ e.createElement("span", { className: "text-gray-400 text-sm" }, "Selecione...")),
977
+ k && /* @__PURE__ */ e.createElement("div", { className: "absolute right-8 top-1/2 -translate-y-1/2" }, /* @__PURE__ */ e.createElement("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-[var(--primary,#2563eb)]" })),
978
+ y && z && z.length > 0 && !k && /* @__PURE__ */ e.createElement(
979
979
  "button",
980
980
  {
981
981
  type: "button",
982
982
  tabIndex: -1,
983
983
  "aria-label": "Limpar seleção",
984
984
  className: "absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 bg-transparent p-1 rounded-full focus:outline-none",
985
- onClick: W
985
+ onClick: $
986
986
  },
987
987
  "✕"
988
988
  )
989
989
  ), a && /* @__PURE__ */ e.createElement(
990
990
  "label",
991
991
  {
992
- htmlFor: N.id || t,
993
- className: s(
992
+ htmlFor: E.id || t,
993
+ className: i(
994
994
  "absolute left-3 z-10 origin-[0] cursor-text select-none text-sm text-gray-400 transition-all duration-200",
995
- X ? "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white" : "top-3 scale-100 translate-y-0.5"
995
+ ee ? "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white" : "top-3 scale-100 translate-y-0.5"
996
996
  )
997
997
  },
998
998
  a
999
999
  ), /* @__PURE__ */ e.createElement(
1000
1000
  "div",
1001
1001
  {
1002
- className: s(
1002
+ className: i(
1003
1003
  "absolute left-0 w-full mt-1 rounded-md transition-all duration-200 overflow-hidden",
1004
1004
  "bg-[var(--select-dropdown-bg)] border-[var(--select-dropdown-border)] text-[var(--select-dropdown-text)]",
1005
1005
  w ? "border max-h-36 opacity-100 scale-100" : "max-h-0 opacity-0 scale-95 pointer-events-none"
1006
1006
  ),
1007
1007
  style: {
1008
1008
  maxHeight: w ? "9.5rem" : "0",
1009
- overflowY: c.length > 3 ? "auto" : "hidden",
1009
+ overflowY: d.length > 3 ? "auto" : "hidden",
1010
1010
  position: "fixed",
1011
1011
  // Use fixed positioning to escape container overflow
1012
- top: w ? `${Y.top}px` : "auto",
1013
- left: w ? `${Y.left}px` : "auto",
1014
- width: w ? `${Y.width}px` : "auto",
1012
+ top: w ? `${U.top}px` : "auto",
1013
+ left: w ? `${U.left}px` : "auto",
1014
+ width: w ? `${U.width}px` : "auto",
1015
1015
  zIndex: 9999,
1016
1016
  boxShadow: w ? "var(--select-dropdown-shadow)" : "none"
1017
1017
  }
1018
1018
  },
1019
- S ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, I) : c.length === 0 ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, _) : c.map((i) => /* @__PURE__ */ e.createElement(
1019
+ k ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, T) : d.length === 0 ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, P) : d.map((c) => /* @__PURE__ */ e.createElement(
1020
1020
  "div",
1021
1021
  {
1022
- key: i.value,
1023
- className: s(
1022
+ key: c.value,
1023
+ className: i(
1024
1024
  "px-3 py-2 cursor-pointer text-sm flex items-center gap-2 transition-colors duration-150",
1025
1025
  "hover:bg-[var(--select-dropdown-hover)]",
1026
- $.includes(i.value) && "bg-[var(--select-dropdown-selected)] font-semibold"
1026
+ z.includes(c.value) && "bg-[var(--select-dropdown-selected)] font-semibold"
1027
1027
  ),
1028
- onMouseDown: () => T(i.value)
1028
+ onMouseDown: () => A(c.value)
1029
1029
  },
1030
1030
  /* @__PURE__ */ e.createElement(
1031
1031
  "input",
1032
1032
  {
1033
1033
  type: "checkbox",
1034
- checked: $.includes(i.value),
1034
+ checked: z.includes(c.value),
1035
1035
  readOnly: !0,
1036
1036
  className: "accent-blue-500"
1037
1037
  }
1038
1038
  ),
1039
- i.label
1039
+ c.label
1040
1040
  ))
1041
1041
  ), K && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, K));
1042
1042
  }
1043
1043
  );
1044
- Ae.displayName = "MultiAsyncSelect";
1045
- const ze = {
1044
+ ze.displayName = "MultiAsyncSelect";
1045
+ const Ae = {
1046
1046
  sm: "h-10 text-sm px-3",
1047
1047
  md: "h-12 text-base px-4",
1048
1048
  lg: "h-16 text-lg px-6"
@@ -1055,20 +1055,20 @@ const ze = {
1055
1055
  containerClassName: f,
1056
1056
  optionClassName: y,
1057
1057
  direction: v = "row",
1058
- size: I = "md",
1059
- onFocus: _,
1060
- onBlur: R,
1058
+ size: T = "md",
1059
+ onFocus: P,
1060
+ onBlur: S,
1061
1061
  ...x
1062
1062
  }, h) => {
1063
- var w, C, c;
1064
- const p = ie(), B = p == null ? void 0 : p.control, N = B && t ? ce({ control: B, name: t }) : void 0, F = x.value ?? N ?? "", m = (c = (C = (w = p == null ? void 0 : p.formState) == null ? void 0 : w.errors) == null ? void 0 : C[t]) == null ? void 0 : c.message, g = (k) => {
1065
- p && t && p.setValue(t, k), x.onChange && x.onChange({ target: { value: k } });
1063
+ var w, N, d;
1064
+ const p = ie(), B = p == null ? void 0 : p.control, E = B && t ? ce({ control: B, name: t }) : void 0, F = x.value ?? E ?? "", m = (d = (N = (w = p == null ? void 0 : p.formState) == null ? void 0 : w.errors) == null ? void 0 : N[t]) == null ? void 0 : d.message, g = (C) => {
1065
+ p && t && p.setValue(t, C), x.onChange && x.onChange({ target: { value: C } });
1066
1066
  };
1067
- return /* @__PURE__ */ e.createElement("div", { className: s("relative", f), ref: h }, a && /* @__PURE__ */ e.createElement(
1067
+ return /* @__PURE__ */ e.createElement("div", { className: i("relative", f), ref: h }, a && /* @__PURE__ */ e.createElement(
1068
1068
  "label",
1069
1069
  {
1070
1070
  htmlFor: t,
1071
- className: s(
1071
+ className: i(
1072
1072
  "absolute left-3 z-10 origin-[0] cursor-text select-none text-sm transition-all duration-200",
1073
1073
  "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white"
1074
1074
  )
@@ -1077,7 +1077,7 @@ const ze = {
1077
1077
  ), /* @__PURE__ */ e.createElement(
1078
1078
  "div",
1079
1079
  {
1080
- className: s(
1080
+ className: i(
1081
1081
  "flex gap-2 w-full pt-6",
1082
1082
  // espaço para label flutuante
1083
1083
  v === "row" ? "flex-row" : "flex-col",
@@ -1085,41 +1085,41 @@ const ze = {
1085
1085
  ),
1086
1086
  "aria-label": a,
1087
1087
  tabIndex: -1,
1088
- onFocus: _,
1089
- onBlur: R
1088
+ onFocus: P,
1089
+ onBlur: S
1090
1090
  },
1091
- r.map((k) => /* @__PURE__ */ e.createElement(
1091
+ r.map((C) => /* @__PURE__ */ e.createElement(
1092
1092
  "button",
1093
1093
  {
1094
- key: k.value,
1094
+ key: C.value,
1095
1095
  type: "button",
1096
- className: s(
1096
+ className: i(
1097
1097
  "relative flex items-center justify-center border rounded-lg transition-all duration-200 shadow-sm px-4 focus:outline-none focus:ring-2 focus:ring-[var(--primary-hover,#dbeafe)]",
1098
- ze[I],
1099
- F === k.value ? "border-[var(--primary,#2563eb)] bg-[var(--primary-hover,#dbeafe)] text-[var(--primary,#2563eb)] ring-2 ring-[var(--primary-hover,#dbeafe)] shadow-md transform scale-[1.02]" : "border-gray-200 bg-white text-gray-600 hover:border-[var(--primary,#2563eb)] hover:bg-[var(--primary-hover,#dbeafe)] hover:text-[var(--primary,#2563eb)] hover:shadow-md",
1098
+ Ae[T],
1099
+ F === C.value ? "border-[var(--primary,#2563eb)] bg-[var(--primary-hover,#dbeafe)] text-[var(--primary,#2563eb)] ring-2 ring-[var(--primary-hover,#dbeafe)] shadow-md transform scale-[1.02]" : "border-gray-200 bg-white text-gray-600 hover:border-[var(--primary,#2563eb)] hover:bg-[var(--primary-hover,#dbeafe)] hover:text-[var(--primary,#2563eb)] hover:shadow-md",
1100
1100
  y
1101
1101
  ),
1102
- "aria-pressed": F === k.value,
1103
- "data-selected": F === k.value,
1102
+ "aria-pressed": F === C.value,
1103
+ "data-selected": F === C.value,
1104
1104
  tabIndex: 0,
1105
- onClick: () => g(k.value),
1106
- onKeyDown: (S) => {
1107
- (S.key === "Enter" || S.key === " ") && (S.preventDefault(), g(k.value));
1105
+ onClick: () => g(C.value),
1106
+ onKeyDown: (k) => {
1107
+ (k.key === "Enter" || k.key === " ") && (k.preventDefault(), g(C.value));
1108
1108
  }
1109
1109
  },
1110
- k.icon && /* @__PURE__ */ e.createElement("span", { className: "mr-2 text-lg flex items-center" }, k.icon),
1111
- /* @__PURE__ */ e.createElement("span", { className: "truncate font-medium" }, k.label)
1110
+ C.icon && /* @__PURE__ */ e.createElement("span", { className: "mr-2 text-lg flex items-center" }, C.icon),
1111
+ /* @__PURE__ */ e.createElement("span", { className: "truncate font-medium" }, C.label)
1112
1112
  ))
1113
1113
  ), m && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, m));
1114
1114
  }
1115
1115
  );
1116
1116
  We.displayName = "RadioGroup";
1117
- const xe = u.forwardRef(
1118
- ({ children: t, className: a, as: r = "div", ...o }, f) => /* @__PURE__ */ u.createElement(
1117
+ const xe = l.forwardRef(
1118
+ ({ children: t, className: a, as: r = "div", ...o }, f) => /* @__PURE__ */ l.createElement(
1119
1119
  r,
1120
1120
  {
1121
1121
  ref: f,
1122
- className: s(
1122
+ className: i(
1123
1123
  "px-6 py-4 border-b",
1124
1124
  "bg-[var(--card-header-bg,rgba(249,250,251,0.5))]",
1125
1125
  "border-[var(--card-header-border,#e5e7eb)]",
@@ -1132,12 +1132,12 @@ const xe = u.forwardRef(
1132
1132
  )
1133
1133
  );
1134
1134
  xe.displayName = "CardHeader";
1135
- const he = u.forwardRef(
1136
- ({ children: t, className: a, as: r = "div", ...o }, f) => /* @__PURE__ */ u.createElement(
1135
+ const he = l.forwardRef(
1136
+ ({ children: t, className: a, as: r = "div", ...o }, f) => /* @__PURE__ */ l.createElement(
1137
1137
  r,
1138
1138
  {
1139
1139
  ref: f,
1140
- className: s(
1140
+ className: i(
1141
1141
  "px-6 py-4",
1142
1142
  "flex-1",
1143
1143
  // Para ocupar o espaço disponível
@@ -1151,12 +1151,12 @@ const he = u.forwardRef(
1151
1151
  )
1152
1152
  );
1153
1153
  he.displayName = "CardBody";
1154
- const we = u.forwardRef(
1155
- ({ children: t, className: a, as: r = "div", ...o }, f) => /* @__PURE__ */ u.createElement(
1154
+ const we = l.forwardRef(
1155
+ ({ children: t, className: a, as: r = "div", ...o }, f) => /* @__PURE__ */ l.createElement(
1156
1156
  r,
1157
1157
  {
1158
1158
  ref: f,
1159
- className: s(
1159
+ className: i(
1160
1160
  "px-6 py-4 border-t",
1161
1161
  "bg-[var(--card-footer-bg,rgba(249,250,251,0.5))]",
1162
1162
  "border-[var(--card-footer-border,#e5e7eb)]",
@@ -1169,7 +1169,7 @@ const we = u.forwardRef(
1169
1169
  )
1170
1170
  );
1171
1171
  we.displayName = "CardFooter";
1172
- const $e = u.forwardRef(
1172
+ const $e = l.forwardRef(
1173
1173
  ({
1174
1174
  children: t,
1175
1175
  className: a,
@@ -1180,10 +1180,10 @@ const $e = u.forwardRef(
1180
1180
  rounded: y = "lg",
1181
1181
  constrainWidth: v = !1,
1182
1182
  // Por padrão, não aplicar max-width
1183
- allowOverflow: I = !1,
1183
+ allowOverflow: T = !1,
1184
1184
  // Por padrão, aplicar overflow hidden para interface limpa
1185
- ..._
1186
- }, R) => {
1185
+ ...P
1186
+ }, S) => {
1187
1187
  const x = {
1188
1188
  default: "bg-[var(--card-bg,#ffffff)] border border-[var(--card-border,#e5e7eb)] shadow-[var(--card-shadow-sm,0_1px_2px_0_rgb(0_0_0_/_0.05))]",
1189
1189
  outlined: "bg-[var(--card-bg,#ffffff)] border-2 border-[var(--primary,#2563eb)]",
@@ -1205,14 +1205,14 @@ const $e = u.forwardRef(
1205
1205
  lg: "rounded-lg",
1206
1206
  xl: "rounded-xl"
1207
1207
  };
1208
- return /* @__PURE__ */ u.createElement(
1208
+ return /* @__PURE__ */ l.createElement(
1209
1209
  "div",
1210
1210
  {
1211
- ref: R,
1212
- className: s(
1211
+ ref: S,
1212
+ className: i(
1213
1213
  "flex flex-col",
1214
1214
  // Flex column para organizar header, body, footer
1215
- !I && "overflow-hidden",
1215
+ !T && "overflow-hidden",
1216
1216
  // Overflow hidden por padrão para bordas limpas
1217
1217
  x[r],
1218
1218
  v && h[o],
@@ -1221,7 +1221,7 @@ const $e = u.forwardRef(
1221
1221
  B[y],
1222
1222
  a
1223
1223
  ),
1224
- ..._
1224
+ ...P
1225
1225
  },
1226
1226
  t
1227
1227
  );
@@ -1230,7 +1230,7 @@ const $e = u.forwardRef(
1230
1230
  Header: xe,
1231
1231
  Body: he,
1232
1232
  Footer: we
1233
- }), ye = u.forwardRef(
1233
+ }), ye = l.forwardRef(
1234
1234
  ({
1235
1235
  children: t,
1236
1236
  className: a,
@@ -1239,8 +1239,8 @@ const $e = u.forwardRef(
1239
1239
  responsive: f = !1,
1240
1240
  stickyHeader: y = !1,
1241
1241
  ...v
1242
- }, I) => {
1243
- const _ = s(
1242
+ }, T) => {
1243
+ const P = i(
1244
1244
  // Base styles
1245
1245
  "w-full border-collapse bg-[var(--table-bg)] text-[var(--table-text)]",
1246
1246
  // Variant styles
@@ -1254,28 +1254,28 @@ const $e = u.forwardRef(
1254
1254
  "text-lg": o === "lg"
1255
1255
  },
1256
1256
  a
1257
- ), R = s(
1257
+ ), S = i(
1258
1258
  {
1259
1259
  "overflow-x-auto": f,
1260
1260
  "max-h-96 overflow-y-auto": y
1261
1261
  }
1262
- ), x = /* @__PURE__ */ u.createElement(
1262
+ ), x = /* @__PURE__ */ l.createElement(
1263
1263
  "table",
1264
1264
  {
1265
- ref: I,
1266
- className: _,
1265
+ ref: T,
1266
+ className: P,
1267
1267
  ...v
1268
1268
  },
1269
1269
  t
1270
1270
  );
1271
- return f || y ? /* @__PURE__ */ u.createElement("div", { className: R }, x) : x;
1271
+ return f || y ? /* @__PURE__ */ l.createElement("div", { className: S }, x) : x;
1272
1272
  }
1273
- ), Ee = u.forwardRef(
1274
- ({ children: t, className: a, as: r = "thead", ...o }, f) => /* @__PURE__ */ u.createElement(
1273
+ ), Ee = l.forwardRef(
1274
+ ({ children: t, className: a, as: r = "thead", ...o }, f) => /* @__PURE__ */ l.createElement(
1275
1275
  r,
1276
1276
  {
1277
1277
  ref: f,
1278
- className: s(
1278
+ className: i(
1279
1279
  "border-b border-[var(--table-border)] bg-[var(--table-header-bg)]",
1280
1280
  {
1281
1281
  "sticky top-0 z-10": r === "thead"
@@ -1286,12 +1286,12 @@ const $e = u.forwardRef(
1286
1286
  },
1287
1287
  t
1288
1288
  )
1289
- ), Ne = u.forwardRef(
1290
- ({ children: t, className: a, as: r = "tbody", ...o }, f) => /* @__PURE__ */ u.createElement(
1289
+ ), Ne = l.forwardRef(
1290
+ ({ children: t, className: a, as: r = "tbody", ...o }, f) => /* @__PURE__ */ l.createElement(
1291
1291
  r,
1292
1292
  {
1293
1293
  ref: f,
1294
- className: s(
1294
+ className: i(
1295
1295
  "[&_tr:nth-child(odd)]:bg-[var(--table-row-odd)]",
1296
1296
  "[&_tr:nth-child(even)]:bg-[var(--table-row-even)]",
1297
1297
  a
@@ -1300,12 +1300,12 @@ const $e = u.forwardRef(
1300
1300
  },
1301
1301
  t
1302
1302
  )
1303
- ), Ce = u.forwardRef(
1304
- ({ children: t, className: a, as: r = "tfoot", ...o }, f) => /* @__PURE__ */ u.createElement(
1303
+ ), Ce = l.forwardRef(
1304
+ ({ children: t, className: a, as: r = "tfoot", ...o }, f) => /* @__PURE__ */ l.createElement(
1305
1305
  r,
1306
1306
  {
1307
1307
  ref: f,
1308
- className: s(
1308
+ className: i(
1309
1309
  "border-t border-[var(--table-border)] bg-[var(--table-header-bg)] font-medium",
1310
1310
  a
1311
1311
  ),
@@ -1313,12 +1313,12 @@ const $e = u.forwardRef(
1313
1313
  },
1314
1314
  t
1315
1315
  )
1316
- ), ke = u.forwardRef(
1317
- ({ children: t, className: a, variant: r = "default", ...o }, f) => /* @__PURE__ */ u.createElement(
1316
+ ), ke = l.forwardRef(
1317
+ ({ children: t, className: a, variant: r = "default", ...o }, f) => /* @__PURE__ */ l.createElement(
1318
1318
  "tr",
1319
1319
  {
1320
1320
  ref: f,
1321
- className: s(
1321
+ className: i(
1322
1322
  "border-b border-[var(--table-border)] transition-colors",
1323
1323
  {
1324
1324
  "hover:bg-[var(--table-row-hover)]": r === "hover",
@@ -1330,7 +1330,7 @@ const $e = u.forwardRef(
1330
1330
  },
1331
1331
  t
1332
1332
  )
1333
- ), Se = u.forwardRef(
1333
+ ), Se = l.forwardRef(
1334
1334
  ({
1335
1335
  children: t,
1336
1336
  className: a,
@@ -1339,15 +1339,15 @@ const $e = u.forwardRef(
1339
1339
  scope: f,
1340
1340
  colSpan: y,
1341
1341
  rowSpan: v,
1342
- ...I
1343
- }, _) => /* @__PURE__ */ u.createElement(
1342
+ ...T
1343
+ }, P) => /* @__PURE__ */ l.createElement(
1344
1344
  r,
1345
1345
  {
1346
- ref: _,
1346
+ ref: P,
1347
1347
  scope: r === "th" ? f : void 0,
1348
1348
  colSpan: y,
1349
1349
  rowSpan: v,
1350
- className: s(
1350
+ className: i(
1351
1351
  "px-4 py-3 text-left",
1352
1352
  {
1353
1353
  "font-semibold": r === "th",
@@ -1357,7 +1357,7 @@ const $e = u.forwardRef(
1357
1357
  },
1358
1358
  a
1359
1359
  ),
1360
- ...I
1360
+ ...T
1361
1361
  },
1362
1362
  t
1363
1363
  )
@@ -1381,91 +1381,91 @@ const Ye = Object.assign(ye, {
1381
1381
  className: o = "",
1382
1382
  disabled: f = !1
1383
1383
  }) => {
1384
- const [y, v] = ue(!1), [I, _] = ue(r), [R, x] = ue({}), h = pe(null), p = pe(null);
1384
+ const [y, v] = ue(!1), [T, P] = ue(r), [S, x] = ue({}), h = pe(null), p = pe(null);
1385
1385
  Le(() => {
1386
1386
  if (!y || !p.current) return;
1387
- const c = p.current.getBoundingClientRect();
1388
- let k = r, S = 0, M = 0;
1387
+ const d = p.current.getBoundingClientRect();
1388
+ let C = r, k = 0, _ = 0;
1389
1389
  switch (r) {
1390
1390
  case "top":
1391
- S = c.top - 8, M = c.left + c.width / 2;
1391
+ k = d.top - 8, _ = d.left + d.width / 2;
1392
1392
  break;
1393
1393
  case "bottom":
1394
- S = c.bottom + 8, M = c.left + c.width / 2;
1394
+ k = d.bottom + 8, _ = d.left + d.width / 2;
1395
1395
  break;
1396
1396
  case "left":
1397
- S = c.top + c.height / 2, M = c.left - 8;
1397
+ k = d.top + d.height / 2, _ = d.left - 8;
1398
1398
  break;
1399
1399
  case "right":
1400
- S = c.top + c.height / 2, M = c.right + 8;
1400
+ k = d.top + d.height / 2, _ = d.right + 8;
1401
1401
  break;
1402
1402
  }
1403
1403
  if (h.current) {
1404
- const d = h.current.getBoundingClientRect(), H = window.innerWidth, D = window.innerHeight;
1405
- r === "top" && c.top < d.height + 16 ? (k = "bottom", S = c.bottom + 8) : r === "bottom" && c.bottom + d.height + 16 > D ? (k = "top", S = c.top - 8) : r === "left" && c.left < d.width + 16 ? (k = "right", M = c.right + 8) : r === "right" && c.right + d.width + 16 > H && (k = "left", M = c.left - 8);
1404
+ const u = h.current.getBoundingClientRect(), H = window.innerWidth, D = window.innerHeight;
1405
+ r === "top" && d.top < u.height + 16 ? (C = "bottom", k = d.bottom + 8) : r === "bottom" && d.bottom + u.height + 16 > D ? (C = "top", k = d.top - 8) : r === "left" && d.left < u.width + 16 ? (C = "right", _ = d.right + 8) : r === "right" && d.right + u.width + 16 > H && (C = "left", _ = d.left - 8);
1406
1406
  }
1407
- _(k), x({
1407
+ P(C), x({
1408
1408
  position: "fixed",
1409
- top: `${S}px`,
1410
- left: `${M}px`,
1409
+ top: `${k}px`,
1410
+ left: `${_}px`,
1411
1411
  zIndex: 9999
1412
1412
  });
1413
1413
  }, [y, r]);
1414
1414
  const B = () => {
1415
1415
  f || v(!0);
1416
- }, N = () => {
1416
+ }, E = () => {
1417
1417
  v(!1);
1418
1418
  }, F = () => {
1419
1419
  f || v(!0);
1420
1420
  }, m = () => {
1421
1421
  v(!1);
1422
1422
  }, g = () => {
1423
- const C = "pointer-events-none";
1424
- switch (I) {
1423
+ const N = "pointer-events-none";
1424
+ switch (T) {
1425
1425
  case "top":
1426
- return `${C} transform -translate-x-1/2 -translate-y-full`;
1426
+ return `${N} transform -translate-x-1/2 -translate-y-full`;
1427
1427
  case "bottom":
1428
- return `${C} transform -translate-x-1/2`;
1428
+ return `${N} transform -translate-x-1/2`;
1429
1429
  case "left":
1430
- return `${C} transform -translate-x-full -translate-y-1/2`;
1430
+ return `${N} transform -translate-x-full -translate-y-1/2`;
1431
1431
  case "right":
1432
- return `${C} transform -translate-y-1/2`;
1432
+ return `${N} transform -translate-y-1/2`;
1433
1433
  default:
1434
- return `${C} transform -translate-x-1/2 -translate-y-full`;
1434
+ return `${N} transform -translate-x-1/2 -translate-y-full`;
1435
1435
  }
1436
1436
  }, w = () => {
1437
- const C = "absolute w-2 h-2 bg-[var(--tooltip-bg,#374151)] transform rotate-45";
1438
- switch (I) {
1437
+ const N = "absolute w-2 h-2 bg-[var(--tooltip-bg,#374151)] transform rotate-45";
1438
+ switch (T) {
1439
1439
  case "top":
1440
- return `${C} top-full left-1/2 -translate-x-1/2 -translate-y-1/2`;
1440
+ return `${N} top-full left-1/2 -translate-x-1/2 -translate-y-1/2`;
1441
1441
  case "bottom":
1442
- return `${C} bottom-full left-1/2 -translate-x-1/2 translate-y-1/2`;
1442
+ return `${N} bottom-full left-1/2 -translate-x-1/2 translate-y-1/2`;
1443
1443
  case "left":
1444
- return `${C} left-full top-1/2 -translate-y-1/2 -translate-x-1/2`;
1444
+ return `${N} left-full top-1/2 -translate-y-1/2 -translate-x-1/2`;
1445
1445
  case "right":
1446
- return `${C} right-full top-1/2 -translate-y-1/2 translate-x-1/2`;
1446
+ return `${N} right-full top-1/2 -translate-y-1/2 translate-x-1/2`;
1447
1447
  default:
1448
- return `${C} top-full left-1/2 -translate-x-1/2 -translate-y-1/2`;
1448
+ return `${N} top-full left-1/2 -translate-x-1/2 -translate-y-1/2`;
1449
1449
  }
1450
1450
  };
1451
- return f || !t ? /* @__PURE__ */ u.createElement(u.Fragment, null, a) : /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement(
1451
+ return f || !t ? /* @__PURE__ */ l.createElement(l.Fragment, null, a) : /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(
1452
1452
  "div",
1453
1453
  {
1454
1454
  className: "relative inline-block",
1455
1455
  ref: p,
1456
1456
  onMouseEnter: B,
1457
- onMouseLeave: N,
1457
+ onMouseLeave: E,
1458
1458
  onFocus: F,
1459
1459
  onBlur: m
1460
1460
  },
1461
1461
  a
1462
1462
  ), y && typeof document < "u" && ve(
1463
- /* @__PURE__ */ u.createElement(
1463
+ /* @__PURE__ */ l.createElement(
1464
1464
  "div",
1465
1465
  {
1466
1466
  ref: h,
1467
- style: R,
1468
- className: s(
1467
+ style: S,
1468
+ className: i(
1469
1469
  g(),
1470
1470
  "px-2 py-1 text-sm rounded whitespace-nowrap",
1471
1471
  "bg-[var(--tooltip-bg,#374151)] text-[var(--tooltip-text,#fff)]",
@@ -1477,7 +1477,7 @@ const Ye = Object.assign(ye, {
1477
1477
  "aria-hidden": !y
1478
1478
  },
1479
1479
  t,
1480
- /* @__PURE__ */ u.createElement("div", { className: w() })
1480
+ /* @__PURE__ */ l.createElement("div", { className: w() })
1481
1481
  ),
1482
1482
  document.body
1483
1483
  ));
@@ -1489,21 +1489,21 @@ const Ye = Object.assign(ye, {
1489
1489
  closeOnOverlayClick: f = !0,
1490
1490
  children: y,
1491
1491
  className: v = "",
1492
- ...I
1492
+ ...T
1493
1493
  }) => {
1494
- const _ = typeof document < "u" ? document.body : null, R = o === "sm" ? "w-64" : o === "md" ? "w-96" : o === "lg" ? "w-[36rem]" : void 0, x = typeof o == "string" && !["sm", "md", "lg"].includes(o) ? { width: o } : void 0, h = /* @__PURE__ */ u.createElement(
1494
+ const P = typeof document < "u" ? document.body : null, S = o === "sm" ? "w-64" : o === "md" ? "w-96" : o === "lg" ? "w-[36rem]" : void 0, x = typeof o == "string" && !["sm", "md", "lg"].includes(o) ? { width: o } : void 0, h = /* @__PURE__ */ l.createElement(
1495
1495
  "div",
1496
1496
  {
1497
1497
  "aria-hidden": !t,
1498
- className: s(
1498
+ className: i(
1499
1499
  "fixed inset-0 z-50 flex",
1500
1500
  t ? "pointer-events-auto" : "pointer-events-none"
1501
1501
  )
1502
1502
  },
1503
- /* @__PURE__ */ u.createElement(
1503
+ /* @__PURE__ */ l.createElement(
1504
1504
  "div",
1505
1505
  {
1506
- className: s(
1506
+ className: i(
1507
1507
  "absolute inset-0 bg-black/40 transition-opacity duration-200",
1508
1508
  t ? "opacity-100" : "opacity-0"
1509
1509
  ),
@@ -1512,10 +1512,10 @@ const Ye = Object.assign(ye, {
1512
1512
  }
1513
1513
  }
1514
1514
  ),
1515
- /* @__PURE__ */ u.createElement(
1515
+ /* @__PURE__ */ l.createElement(
1516
1516
  "div",
1517
1517
  {
1518
- className: s(
1518
+ className: i(
1519
1519
  "relative h-full",
1520
1520
  r === "right" ? "ml-auto" : "mr-auto",
1521
1521
  // ensure the sheet doesn't shrink
@@ -1523,25 +1523,25 @@ const Ye = Object.assign(ye, {
1523
1523
  ),
1524
1524
  style: x
1525
1525
  },
1526
- /* @__PURE__ */ u.createElement(
1526
+ /* @__PURE__ */ l.createElement(
1527
1527
  "aside",
1528
1528
  {
1529
1529
  role: "dialog",
1530
1530
  "aria-modal": !0,
1531
- className: s(
1531
+ className: i(
1532
1532
  "h-full bg-white shadow-xl border-l border-gray-100 overflow-auto transition-transform duration-300",
1533
1533
  r === "right" ? t ? "translate-x-0" : "translate-x-full" : t ? "translate-x-0" : "-translate-x-full",
1534
- R,
1534
+ S,
1535
1535
  v
1536
1536
  ),
1537
1537
  style: x,
1538
- ...I
1538
+ ...T
1539
1539
  },
1540
1540
  y
1541
1541
  )
1542
1542
  )
1543
1543
  );
1544
- return _ ? ve(h, _) : null;
1544
+ return P ? ve(h, P) : null;
1545
1545
  };
1546
1546
  Oe.displayName = "AsideSheet";
1547
1547
  const qe = ({
@@ -1552,94 +1552,94 @@ const qe = ({
1552
1552
  accept: f = "image/*",
1553
1553
  maxSize: y,
1554
1554
  placeholder: v = "Selecionar imagem",
1555
- loading: I = !1,
1556
- size: _ = "md",
1557
- label: R,
1555
+ loading: T = !1,
1556
+ size: P = "md",
1557
+ label: S,
1558
1558
  error: x,
1559
1559
  disabled: h,
1560
1560
  className: p,
1561
1561
  ...B
1562
1562
  }) => {
1563
- const [N, F] = ue(null), [m, g] = ue(""), [w, C] = ue(!1), c = pe(null), k = !!a, S = !!N, M = k || S, d = I || w, H = {
1563
+ const [E, F] = ue(null), [m, g] = ue(""), [w, N] = ue(!1), d = pe(null), C = !!a, k = !!E, _ = C || k, u = T || w, H = {
1564
1564
  sm: t ? "w-16 h-16" : "w-24 h-16",
1565
1565
  md: t ? "w-24 h-24" : "w-32 h-24",
1566
1566
  lg: t ? "w-32 h-32" : "w-40 h-32"
1567
- }, D = (E) => {
1568
- var $;
1569
- const j = ($ = E.target.files) == null ? void 0 : $[0];
1570
- if (!j) return;
1571
- if (y && j.size > y) {
1567
+ }, R = v || (t ? "Adicionar foto" : "Selecionar imagem"), U = (M) => {
1568
+ var ee;
1569
+ const z = (ee = M.target.files) == null ? void 0 : ee[0];
1570
+ if (!z) return;
1571
+ if (y && z.size > y) {
1572
1572
  alert(`Arquivo muito grande. Tamanho máximo: ${(y / 1024 / 1024).toFixed(1)}MB`);
1573
1573
  return;
1574
1574
  }
1575
- const z = new FileReader();
1576
- z.onload = (K) => {
1577
- var X;
1578
- g((X = K.target) == null ? void 0 : X.result), F(j);
1579
- }, z.readAsDataURL(j);
1580
- }, L = async () => {
1581
- if (!(!N || !r))
1575
+ const K = new FileReader();
1576
+ K.onload = (Q) => {
1577
+ var J;
1578
+ g((J = Q.target) == null ? void 0 : J.result), F(z);
1579
+ }, K.readAsDataURL(z);
1580
+ }, G = async () => {
1581
+ if (!(!E || !r))
1582
1582
  try {
1583
- C(!0);
1584
- const E = await r(N);
1585
- F(null), g(""), c.current && (c.current.value = "");
1586
- } catch (E) {
1587
- console.error("Erro ao fazer upload:", E), alert("Erro ao fazer upload da imagem");
1583
+ N(!0);
1584
+ const M = await r(E);
1585
+ F(null), g(""), d.current && (d.current.value = "");
1586
+ } catch (M) {
1587
+ console.error("Erro ao fazer upload:", M), alert("Erro ao fazer upload da imagem");
1588
1588
  } finally {
1589
- C(!1);
1589
+ N(!1);
1590
1590
  }
1591
- }, Y = () => {
1592
- F(null), g(""), c.current && (c.current.value = "");
1593
- }, q = async () => {
1591
+ }, V = () => {
1592
+ F(null), g(""), d.current && (d.current.value = "");
1593
+ }, W = async () => {
1594
1594
  try {
1595
- o && await o(a), F(null), g(""), c.current && (c.current.value = "");
1596
- } catch (E) {
1597
- console.error("Erro ao remover imagem:", E), alert("Erro ao remover imagem");
1595
+ o && await o(a), F(null), g(""), d.current && (d.current.value = "");
1596
+ } catch (M) {
1597
+ console.error("Erro ao remover imagem:", M), alert("Erro ao remover imagem");
1598
1598
  }
1599
- }, V = () => {
1600
- var E;
1601
- h || d || (E = c.current) == null || E.click();
1602
- }, A = m || a;
1603
- return /* @__PURE__ */ u.createElement("div", { className: s("flex flex-col space-y-2", p) }, R && /* @__PURE__ */ u.createElement("label", { className: "text-sm font-medium text-gray-700" }, R), /* @__PURE__ */ u.createElement("div", { className: "relative" }, /* @__PURE__ */ u.createElement(
1599
+ }, L = () => {
1600
+ var M;
1601
+ h || u || (M = d.current) == null || M.click();
1602
+ }, q = m || a;
1603
+ return /* @__PURE__ */ l.createElement("div", { className: i("flex flex-col space-y-2", p) }, S && /* @__PURE__ */ l.createElement("label", { className: "text-sm font-medium text-gray-700" }, S), /* @__PURE__ */ l.createElement("div", { className: "relative flex flex-col items-center" }, /* @__PURE__ */ l.createElement(
1604
1604
  "input",
1605
1605
  {
1606
- ref: c,
1606
+ ref: d,
1607
1607
  type: "file",
1608
1608
  accept: f,
1609
- onChange: D,
1610
- disabled: h || d,
1609
+ onChange: U,
1610
+ disabled: h || u,
1611
1611
  className: "hidden",
1612
1612
  ...B
1613
1613
  }
1614
- ), /* @__PURE__ */ u.createElement(
1614
+ ), /* @__PURE__ */ l.createElement(
1615
1615
  "div",
1616
1616
  {
1617
- onClick: V,
1618
- className: s(
1617
+ onClick: L,
1618
+ className: i(
1619
1619
  // Base styles
1620
1620
  "relative border-2 border-dashed border-gray-300 transition-colors cursor-pointer",
1621
1621
  "hover:border-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",
1622
1622
  // Shape
1623
1623
  t ? "rounded-full" : "rounded-lg",
1624
1624
  // Size
1625
- H[_],
1625
+ H[P],
1626
1626
  // States
1627
1627
  h && "opacity-50 cursor-not-allowed",
1628
- d && "cursor-wait",
1628
+ u && "cursor-wait",
1629
1629
  x && "border-red-300",
1630
1630
  // Background
1631
- !M && "bg-gray-50 hover:bg-gray-100",
1632
- M && "border-solid border-gray-200"
1631
+ !_ && "bg-gray-50 hover:bg-gray-100",
1632
+ _ && "border-solid border-gray-200"
1633
1633
  )
1634
1634
  },
1635
- M ? (
1635
+ _ ? (
1636
1636
  // Preview da imagem
1637
- /* @__PURE__ */ u.createElement(
1637
+ /* @__PURE__ */ l.createElement(
1638
1638
  "img",
1639
1639
  {
1640
- src: A,
1640
+ src: q,
1641
1641
  alt: "Preview",
1642
- className: s(
1642
+ className: i(
1643
1643
  "w-full h-full object-cover",
1644
1644
  t ? "rounded-full" : "rounded-lg"
1645
1645
  )
@@ -1647,59 +1647,82 @@ const qe = ({
1647
1647
  )
1648
1648
  ) : (
1649
1649
  // Estado vazio
1650
- /* @__PURE__ */ u.createElement("div", { className: "flex flex-col items-center justify-center h-full text-gray-500 text-sm" }, /* @__PURE__ */ u.createElement(
1651
- "svg",
1652
- {
1653
- className: "w-6 h-6 mb-1",
1654
- fill: "none",
1655
- stroke: "currentColor",
1656
- viewBox: "0 0 24 24"
1657
- },
1658
- /* @__PURE__ */ u.createElement(
1659
- "path",
1650
+ /* @__PURE__ */ l.createElement("div", { className: "flex flex-col items-center justify-center h-full text-gray-500 text-sm" }, t ? (
1651
+ // Ícone de usuário para avatar
1652
+ /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(
1653
+ "svg",
1660
1654
  {
1661
- strokeLinecap: "round",
1662
- strokeLinejoin: "round",
1663
- strokeWidth: 2,
1664
- d: "M12 6v6m0 0v6m0-6h6m-6 0H6"
1665
- }
1666
- )
1667
- ), /* @__PURE__ */ u.createElement("span", { className: "text-center px-2" }, v))
1655
+ className: "w-8 h-8 mb-1",
1656
+ fill: "none",
1657
+ stroke: "currentColor",
1658
+ viewBox: "0 0 24 24"
1659
+ },
1660
+ /* @__PURE__ */ l.createElement(
1661
+ "path",
1662
+ {
1663
+ strokeLinecap: "round",
1664
+ strokeLinejoin: "round",
1665
+ strokeWidth: 1.5,
1666
+ d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
1667
+ }
1668
+ )
1669
+ ), /* @__PURE__ */ l.createElement("span", { className: "text-center px-2 text-xs" }, R))
1670
+ ) : (
1671
+ // Ícone de adicionar imagem genérica
1672
+ /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(
1673
+ "svg",
1674
+ {
1675
+ className: "w-6 h-6 mb-1",
1676
+ fill: "none",
1677
+ stroke: "currentColor",
1678
+ viewBox: "0 0 24 24"
1679
+ },
1680
+ /* @__PURE__ */ l.createElement(
1681
+ "path",
1682
+ {
1683
+ strokeLinecap: "round",
1684
+ strokeLinejoin: "round",
1685
+ strokeWidth: 2,
1686
+ d: "M12 6v6m0 0v6m0-6h6m-6 0H6"
1687
+ }
1688
+ )
1689
+ ), /* @__PURE__ */ l.createElement("span", { className: "text-center px-2" }, R))
1690
+ ))
1668
1691
  ),
1669
- d && /* @__PURE__ */ u.createElement("div", { className: s(
1692
+ u && /* @__PURE__ */ l.createElement("div", { className: i(
1670
1693
  "absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center",
1671
1694
  t ? "rounded-full" : "rounded-lg"
1672
- ) }, /* @__PURE__ */ u.createElement("div", { className: "w-6 h-6 border-2 border-white border-t-transparent rounded-full animate-spin" }))
1673
- ), M && !d && /* @__PURE__ */ u.createElement("div", { className: "flex justify-center space-x-2 mt-3" }, S ? (
1695
+ ) }, /* @__PURE__ */ l.createElement("div", { className: "w-6 h-6 border-2 border-white border-t-transparent rounded-full animate-spin" }))
1696
+ ), _ && !u && /* @__PURE__ */ l.createElement("div", { className: "flex justify-center space-x-2 mt-3" }, k ? (
1674
1697
  // Ações para arquivo selecionado (não salvo ainda)
1675
- /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement(
1698
+ /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(
1676
1699
  "button",
1677
1700
  {
1678
- onClick: L,
1701
+ onClick: G,
1679
1702
  disabled: !r,
1680
1703
  className: "px-3 py-1 bg-blue-600 text-white text-sm rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed"
1681
1704
  },
1682
1705
  "Confirmar"
1683
- ), /* @__PURE__ */ u.createElement(
1706
+ ), /* @__PURE__ */ l.createElement(
1684
1707
  "button",
1685
1708
  {
1686
- onClick: Y,
1709
+ onClick: V,
1687
1710
  className: "px-3 py-1 bg-gray-600 text-white text-sm rounded hover:bg-gray-700"
1688
1711
  },
1689
1712
  "Cancelar"
1690
1713
  ))
1691
1714
  ) : (
1692
1715
  // Ações para imagem já salva
1693
- /* @__PURE__ */ u.createElement(
1716
+ /* @__PURE__ */ l.createElement(
1694
1717
  "button",
1695
1718
  {
1696
- onClick: q,
1719
+ onClick: W,
1697
1720
  disabled: !o,
1698
1721
  className: "px-3 py-1 bg-red-600 text-white text-sm rounded hover:bg-red-700 disabled:opacity-50 disabled:cursor-not-allowed"
1699
1722
  },
1700
1723
  "Remover"
1701
1724
  )
1702
- ))), x && /* @__PURE__ */ u.createElement("p", { className: "text-sm text-red-600" }, x), y && !M && /* @__PURE__ */ u.createElement("p", { className: "text-xs text-gray-500" }, "Tamanho máximo: ", (y / 1024 / 1024).toFixed(1), "MB"));
1725
+ ))), x && /* @__PURE__ */ l.createElement("p", { className: "text-sm text-red-600" }, x), y && !_ && /* @__PURE__ */ l.createElement("p", { className: "text-xs text-gray-500" }, "Tamanho máximo: ", (y / 1024 / 1024).toFixed(1), "MB"), t && !_ && /* @__PURE__ */ l.createElement("p", { className: "text-xs text-gray-500 text-center" }, "Use uma foto com seu rosto centralizado e bem visível"));
1703
1726
  };
1704
1727
  export {
1705
1728
  Oe as AsideSheet,
@@ -1710,8 +1733,8 @@ export {
1710
1733
  we as CardFooter,
1711
1734
  xe as CardHeader,
1712
1735
  qe as ImageInput,
1713
- Me as Input,
1714
- Ae as MultiAsyncSelect,
1736
+ Be as Input,
1737
+ ze as MultiAsyncSelect,
1715
1738
  Te as MultiSelect,
1716
1739
  We as RadioGroup,
1717
1740
  _e as Select,