rharuow-ds 1.3.1 → 1.3.2

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.
@@ -2,40 +2,40 @@ import * as e from "react";
2
2
  import L from "react";
3
3
  import { useFormContext as X, useWatch as G } from "react-hook-form";
4
4
  function se(t) {
5
- var n, a, o = "";
6
- if (typeof t == "string" || typeof t == "number") o += t;
5
+ var o, a, n = "";
6
+ if (typeof t == "string" || typeof t == "number") n += t;
7
7
  else if (typeof t == "object") if (Array.isArray(t)) {
8
- var c = t.length;
9
- for (n = 0; n < c; n++) t[n] && (a = se(t[n])) && (o && (o += " "), o += a);
10
- } else for (a in t) t[a] && (o && (o += " "), o += a);
11
- return o;
8
+ var i = t.length;
9
+ for (o = 0; o < i; o++) t[o] && (a = se(t[o])) && (n && (n += " "), n += a);
10
+ } else for (a in t) t[a] && (n && (n += " "), n += a);
11
+ return n;
12
12
  }
13
13
  function ge() {
14
- for (var t, n, a = 0, o = "", c = arguments.length; a < c; a++) (t = arguments[a]) && (n = se(t)) && (o && (o += " "), o += n);
15
- return o;
14
+ for (var t, o, a = 0, n = "", i = arguments.length; a < i; a++) (t = arguments[a]) && (o = se(t)) && (n && (n += " "), n += o);
15
+ return n;
16
16
  }
17
17
  function s(...t) {
18
18
  return ge(...t);
19
19
  }
20
20
  const Fe = ({
21
21
  children: t,
22
- variant: n = "default",
22
+ variant: o = "default",
23
23
  className: a = "",
24
- ...o
24
+ ...n
25
25
  }) => {
26
- const c = "px-4 py-2 rounded font-medium transition", C = {
26
+ const i = "px-4 py-2 rounded font-medium transition", C = {
27
27
  default: "bg-[var(--primary,#2563eb)] text-[var(--primary-text,#fff)] hover:bg-[var(--primary-hover,#1d4ed8)]",
28
28
  outline: "border border-[var(--primary,#2563eb)] text-[var(--primary,#2563eb)] bg-white hover:bg-[var(--primary-hover,#e0e7ff)]",
29
29
  secondary: "bg-[var(--secondary,#fbbf24)] text-[var(--secondary-text,#222)] hover:bg-[var(--secondary-hover,#f59e42)]"
30
30
  };
31
- return /* @__PURE__ */ L.createElement("button", { className: s(c, C[n], a), ...o }, t);
31
+ return /* @__PURE__ */ L.createElement("button", { className: s(i, C[o], a), ...n }, t);
32
32
  }, he = e.forwardRef(
33
33
  ({
34
34
  name: t,
35
- className: n,
35
+ className: o,
36
36
  type: a = "text",
37
- label: o,
38
- onFocus: c,
37
+ label: n,
38
+ onFocus: i,
39
39
  onBlur: C,
40
40
  Icon: w,
41
41
  iconClassName: z,
@@ -44,7 +44,7 @@ const Fe = ({
44
44
  ...N
45
45
  }, p) => {
46
46
  var A, H, O;
47
- const [u, y] = e.useState(!1), [m, M] = e.useState(!1), x = X(), l = x == null ? void 0 : x.control, h = x == null ? void 0 : x.register, F = l && t ? G({ control: l, name: t }) : void 0, v = N.value ?? F ?? "", g = (O = (H = (A = x == null ? void 0 : x.formState) == null ? void 0 : A.errors) == null ? void 0 : H[t]) == null ? void 0 : O.message, T = u || !!v, R = a === "password" ? m ? "text" : "password" : a, S = () => /* @__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
+ const [d, y] = e.useState(!1), [m, M] = e.useState(!1), x = X(), l = x == null ? void 0 : x.control, g = x == null ? void 0 : x.register, F = l && t ? G({ control: l, name: t }) : void 0, v = N.value ?? F ?? "", h = (O = (H = (A = x == null ? void 0 : x.formState) == null ? void 0 : A.errors) == null ? void 0 : H[t]) == null ? void 0 : O.message, T = d || !!v, R = a === "password" ? m ? "text" : "password" : a, S = () => /* @__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(
48
48
  "path",
49
49
  {
50
50
  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",
@@ -68,20 +68,20 @@ const Fe = ({
68
68
  "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",
69
69
  a === "password" || w ? "pr-12" : "",
70
70
  // espaço extra para qualquer ícone (password ou customizado)
71
- n
71
+ o
72
72
  ),
73
73
  onFocus: (k) => {
74
- y(!0), c && c(k);
74
+ y(!0), i && i(k);
75
75
  },
76
76
  ...x && t ? (() => {
77
- const k = h(t), i = k.onBlur;
77
+ const k = g(t), c = k.onBlur;
78
78
  return {
79
79
  ...k,
80
80
  ref: (r) => {
81
81
  typeof p == "function" ? p(r) : p && (p.current = r), k.ref && k.ref(r);
82
82
  },
83
83
  onBlur: (r) => {
84
- y(!1), C && C(r), i && i(r);
84
+ y(!1), C && C(r), c && c(r);
85
85
  }
86
86
  };
87
87
  })() : {
@@ -92,7 +92,7 @@ const Fe = ({
92
92
  },
93
93
  ...N
94
94
  }
95
- ), o && /* @__PURE__ */ e.createElement(
95
+ ), n && /* @__PURE__ */ e.createElement(
96
96
  "label",
97
97
  {
98
98
  htmlFor: N.id || t,
@@ -101,7 +101,7 @@ const Fe = ({
101
101
  T ? "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
102
  )
103
103
  },
104
- o
104
+ n
105
105
  ), a === "password" && /* @__PURE__ */ e.createElement(
106
106
  "button",
107
107
  {
@@ -122,77 +122,77 @@ const Fe = ({
122
122
  onClick: f
123
123
  },
124
124
  /* @__PURE__ */ e.createElement(w, null)
125
- ), g && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, g));
125
+ ), h && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, h));
126
126
  }
127
127
  );
128
128
  he.displayName = "Input";
129
129
  const we = e.forwardRef(
130
130
  ({
131
131
  name: t,
132
- label: n,
132
+ label: o,
133
133
  options: a,
134
- className: o,
135
- containerClassName: c,
134
+ className: n,
135
+ containerClassName: i,
136
136
  isClearable: C,
137
137
  onFocus: w,
138
138
  onBlur: z,
139
139
  ...f
140
140
  }, E) => {
141
141
  var A, H, O, k;
142
- const [N, p] = e.useState(!1), [u, y] = e.useState(!1), [m, M] = e.useState({
142
+ const [N, p] = e.useState(!1), [d, y] = e.useState(!1), [m, M] = e.useState({
143
143
  top: 0,
144
144
  left: 0,
145
145
  width: 0
146
- }), x = e.useRef(null), l = X(), h = l == null ? void 0 : l.control, F = h && t ? G({ control: h, name: t }) : void 0, v = f.value ?? F ?? "", g = (O = (H = (A = l == null ? void 0 : l.formState) == null ? void 0 : A.errors) == null ? void 0 : H[t]) == null ? void 0 : O.message, T = N || !!v, R = e.useCallback(() => {
147
- if (x.current && u) {
148
- const i = x.current.getBoundingClientRect();
146
+ }), x = e.useRef(null), l = X(), g = l == null ? void 0 : l.control, F = g && t ? G({ control: g, name: t }) : void 0, v = f.value ?? F ?? "", h = (O = (H = (A = l == null ? void 0 : l.formState) == null ? void 0 : A.errors) == null ? void 0 : H[t]) == null ? void 0 : O.message, T = N || !!v, R = e.useCallback(() => {
147
+ if (x.current && d) {
148
+ const c = x.current.getBoundingClientRect();
149
149
  M({
150
- top: i.bottom + window.scrollY + 4,
151
- left: i.left + window.scrollX,
152
- width: i.width
150
+ top: c.bottom + window.scrollY + 4,
151
+ left: c.left + window.scrollX,
152
+ width: c.width
153
153
  });
154
154
  }
155
- }, [u]);
155
+ }, [d]);
156
156
  e.useEffect(() => {
157
- if (R(), u) {
158
- const i = () => R(), r = () => R();
159
- return window.addEventListener("resize", i), window.addEventListener("scroll", r, !0), () => {
160
- window.removeEventListener("resize", i), window.removeEventListener("scroll", r, !0);
157
+ if (R(), d) {
158
+ const c = () => R(), r = () => R();
159
+ return window.addEventListener("resize", c), window.addEventListener("scroll", r, !0), () => {
160
+ window.removeEventListener("resize", c), window.removeEventListener("scroll", r, !0);
161
161
  };
162
162
  }
163
- }, [u, R]), e.useEffect(() => {
164
- const i = (r) => {
163
+ }, [d, R]), e.useEffect(() => {
164
+ const c = (r) => {
165
165
  x.current && !x.current.contains(r.target) && (y(!1), p(!1));
166
166
  };
167
- return document.addEventListener("mousedown", i), () => {
168
- document.removeEventListener("mousedown", i);
167
+ return document.addEventListener("mousedown", c), () => {
168
+ document.removeEventListener("mousedown", c);
169
169
  };
170
170
  }, []);
171
171
  const S = () => {
172
- y((i) => !i), p(!0);
173
- }, V = (i) => {
174
- p(!0), w && w(i);
175
- }, I = (i) => {
176
- z && z(i);
172
+ y((c) => !c), p(!0);
173
+ }, V = (c) => {
174
+ p(!0), w && w(c);
175
+ }, I = (c) => {
176
+ z && z(c);
177
177
  };
178
- return /* @__PURE__ */ e.createElement("div", { className: s("relative", c), ref: x }, /* @__PURE__ */ e.createElement(
178
+ return /* @__PURE__ */ e.createElement("div", { className: s("relative", i), ref: x }, /* @__PURE__ */ e.createElement(
179
179
  "div",
180
180
  {
181
181
  id: f.id || t,
182
182
  tabIndex: 0,
183
183
  role: "button",
184
184
  "aria-haspopup": "listbox",
185
- "aria-expanded": u,
185
+ "aria-expanded": d,
186
186
  className: s(
187
187
  "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",
188
- o
188
+ n
189
189
  ),
190
190
  onClick: S,
191
191
  onFocus: V,
192
192
  onBlur: I,
193
193
  ref: E
194
194
  },
195
- /* @__PURE__ */ e.createElement("span", { className: s("block truncate", !v && "text-gray-400") }, ((k = a.find((i) => i.value === v)) == null ? void 0 : k.label) || !n && "Selecione..."),
195
+ /* @__PURE__ */ e.createElement("span", { className: s("block truncate", !v && "text-gray-400") }, ((k = a.find((c) => c.value === v)) == null ? void 0 : k.label) || !o && "Selecione..."),
196
196
  C && v && /* @__PURE__ */ e.createElement(
197
197
  "button",
198
198
  {
@@ -200,8 +200,8 @@ const we = e.forwardRef(
200
200
  tabIndex: -1,
201
201
  "aria-label": "Limpar seleção",
202
202
  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",
203
- onClick: (i) => {
204
- if (i.stopPropagation(), l && t && l.setValue(t, ""), f.onChange) {
203
+ onClick: (c) => {
204
+ if (c.stopPropagation(), l && t && l.setValue(t, ""), f.onChange) {
205
205
  const r = {
206
206
  target: { value: "" }
207
207
  };
@@ -212,7 +212,7 @@ const we = e.forwardRef(
212
212
  },
213
213
  "✕"
214
214
  )
215
- ), n && /* @__PURE__ */ e.createElement(
215
+ ), o && /* @__PURE__ */ e.createElement(
216
216
  "label",
217
217
  {
218
218
  htmlFor: f.id || t,
@@ -221,57 +221,60 @@ const we = e.forwardRef(
221
221
  T ? "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"
222
222
  )
223
223
  },
224
- n
224
+ o
225
225
  ), /* @__PURE__ */ e.createElement(
226
226
  "div",
227
227
  {
228
228
  className: s(
229
- "absolute left-0 w-full mt-1 rounded-md shadow-lg bg-white z-[9999] transition-all duration-200 overflow-hidden",
230
- u ? "border border-[var(--primary,#2563eb)] max-h-36 opacity-100 scale-100" : "max-h-0 opacity-0 scale-95 pointer-events-none"
229
+ "absolute left-0 w-full mt-1 rounded-md transition-all duration-200 overflow-hidden",
230
+ "bg-[var(--select-dropdown-bg)] border-[var(--select-dropdown-border)] text-[var(--select-dropdown-text)]",
231
+ d ? "border max-h-36 opacity-100 scale-100" : "max-h-0 opacity-0 scale-95 pointer-events-none"
231
232
  ),
232
233
  style: {
233
- maxHeight: u ? "9.5rem" : "0",
234
+ maxHeight: d ? "9.5rem" : "0",
234
235
  // 3 options * 2.5rem + padding
235
236
  overflowY: a.length > 3 ? "auto" : "hidden",
236
237
  position: "fixed",
237
238
  // Use fixed positioning to escape container overflow
238
- top: u ? m.top : "auto",
239
- left: u ? m.left : "auto",
240
- width: u ? m.width : "auto",
241
- zIndex: 9999
239
+ top: d ? m.top : "auto",
240
+ left: d ? m.left : "auto",
241
+ width: d ? m.width : "auto",
242
+ zIndex: 9999,
243
+ boxShadow: d ? "var(--select-dropdown-shadow)" : "none"
242
244
  }
243
245
  },
244
- a.map((i) => /* @__PURE__ */ e.createElement(
246
+ a.map((c) => /* @__PURE__ */ e.createElement(
245
247
  "div",
246
248
  {
247
- key: i.value,
249
+ key: c.value,
248
250
  className: s(
249
- "px-3 py-2 cursor-pointer hover:bg-blue-50 text-sm",
250
- v === i.value && "bg-blue-100"
251
+ "px-3 py-2 cursor-pointer text-sm transition-colors duration-150",
252
+ "hover:bg-[var(--select-dropdown-hover)]",
253
+ v === c.value && "bg-[var(--select-dropdown-selected)]"
251
254
  ),
252
255
  onMouseDown: () => {
253
- if (l && t && l.setValue(t, i.value), f.onChange) {
256
+ if (l && t && l.setValue(t, c.value), f.onChange) {
254
257
  const r = {
255
- target: { value: i.value }
258
+ target: { value: c.value }
256
259
  };
257
260
  f.onChange(r);
258
261
  }
259
262
  p(!0);
260
263
  }
261
264
  },
262
- i.label
265
+ c.label
263
266
  ))
264
- ), g && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, g));
267
+ ), h && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, h));
265
268
  }
266
269
  );
267
270
  we.displayName = "Select";
268
271
  const ye = e.forwardRef(
269
272
  ({
270
273
  name: t,
271
- className: n,
274
+ className: o,
272
275
  label: a,
273
- onFocus: o,
274
- onBlur: c,
276
+ onFocus: n,
277
+ onBlur: i,
275
278
  Icon: C,
276
279
  iconClassName: w,
277
280
  iconAction: z,
@@ -279,8 +282,8 @@ const ye = e.forwardRef(
279
282
  rows: E = 4,
280
283
  ...N
281
284
  }, p) => {
282
- var g, T, R;
283
- const [u, y] = e.useState(!1), m = X(), M = m == null ? void 0 : m.control, x = m == null ? void 0 : m.register, l = M && t ? G({ control: M, name: t }) : void 0, h = N.value ?? l ?? "", F = (R = (T = (g = m == null ? void 0 : m.formState) == null ? void 0 : g.errors) == null ? void 0 : T[t]) == null ? void 0 : R.message, v = u || !!h;
285
+ var h, T, R;
286
+ const [d, y] = e.useState(!1), m = X(), M = m == null ? void 0 : m.control, x = m == null ? void 0 : m.register, l = M && t ? G({ control: M, name: t }) : void 0, g = N.value ?? l ?? "", F = (R = (T = (h = m == null ? void 0 : m.formState) == null ? void 0 : h.errors) == null ? void 0 : T[t]) == null ? void 0 : R.message, v = d || !!g;
284
287
  return /* @__PURE__ */ e.createElement("div", { className: s("relative", f) }, /* @__PURE__ */ e.createElement(
285
288
  "textarea",
286
289
  {
@@ -290,10 +293,10 @@ const ye = e.forwardRef(
290
293
  "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",
291
294
  C ? "pr-12" : "",
292
295
  // espaço extra para ícone customizado
293
- n
296
+ o
294
297
  ),
295
298
  onFocus: (S) => {
296
- y(!0), o && o(S);
299
+ y(!0), n && n(S);
297
300
  },
298
301
  ...m && t ? (() => {
299
302
  const S = x(t), V = S.onBlur;
@@ -303,13 +306,13 @@ const ye = e.forwardRef(
303
306
  typeof p == "function" ? p(I) : p && (p.current = I), S.ref && S.ref(I);
304
307
  },
305
308
  onBlur: (I) => {
306
- y(!1), c && c(I), V && V(I);
309
+ y(!1), i && i(I), V && V(I);
307
310
  }
308
311
  };
309
312
  })() : {
310
313
  ref: p,
311
314
  onBlur: (S) => {
312
- y(!1), c && c(S);
315
+ y(!1), i && i(S);
313
316
  }
314
317
  },
315
318
  ...N
@@ -341,10 +344,10 @@ ye.displayName = "Textarea";
341
344
  const Ee = e.forwardRef(
342
345
  ({
343
346
  name: t,
344
- label: n,
347
+ label: o,
345
348
  loadOptions: a,
346
- className: o,
347
- containerClassName: c,
349
+ className: n,
350
+ containerClassName: i,
348
351
  isClearable: C,
349
352
  defaultOptions: w = !1,
350
353
  loadingMessage: z = "Carregando...",
@@ -352,15 +355,15 @@ const Ee = e.forwardRef(
352
355
  searchable: E = !1,
353
356
  debounceMs: N = 300,
354
357
  onFocus: p,
355
- onBlur: u,
358
+ onBlur: d,
356
359
  ...y
357
360
  }, m) => {
358
361
  var q, te, J;
359
- const [M, x] = e.useState(!1), [l, h] = e.useState(!1), [F, v] = e.useState([]), [g, T] = e.useState(!1), [R, S] = e.useState(""), [V, I] = e.useState(""), [A, H] = e.useState({
362
+ const [M, x] = e.useState(!1), [l, g] = e.useState(!1), [F, v] = e.useState([]), [h, T] = e.useState(!1), [R, S] = e.useState(""), [V, I] = e.useState(""), [A, H] = e.useState({
360
363
  top: 0,
361
364
  left: 0,
362
365
  width: 0
363
- }), O = e.useRef(null), k = e.useRef(null), i = X(), r = i == null ? void 0 : i.control, B = r && t ? G({ control: r, name: t }) : void 0, W = y.value ?? B ?? "", _ = (J = (te = (q = i == null ? void 0 : i.formState) == null ? void 0 : q.errors) == null ? void 0 : te[t]) == null ? void 0 : J.message, Q = M || !!W, $ = e.useCallback(() => {
366
+ }), O = e.useRef(null), k = e.useRef(null), c = X(), r = c == null ? void 0 : c.control, B = r && t ? G({ control: r, name: t }) : void 0, W = y.value ?? B ?? "", _ = (J = (te = (q = c == null ? void 0 : c.formState) == null ? void 0 : q.errors) == null ? void 0 : te[t]) == null ? void 0 : J.message, Q = M || !!W, $ = e.useCallback(() => {
364
367
  if (O.current && l) {
365
368
  const b = O.current.getBoundingClientRect();
366
369
  H({
@@ -400,41 +403,41 @@ const Ee = e.forwardRef(
400
403
  };
401
404
  e.useEffect(() => {
402
405
  const b = (D) => {
403
- O.current && !O.current.contains(D.target) && (h(!1), x(!1), S(""));
406
+ O.current && !O.current.contains(D.target) && (g(!1), x(!1), S(""));
404
407
  };
405
408
  return document.addEventListener("mousedown", b), () => {
406
409
  document.removeEventListener("mousedown", b);
407
410
  };
408
411
  }, []);
409
412
  const U = () => {
410
- l || (h(!0), x(!0), E && k.current && setTimeout(() => {
413
+ l || (g(!0), x(!0), E && k.current && setTimeout(() => {
411
414
  var b;
412
415
  return (b = k.current) == null ? void 0 : b.focus();
413
416
  }, 0));
414
417
  }, Z = (b) => {
415
418
  x(!0), p && p(b);
416
419
  }, K = (b) => {
417
- u && u(b);
420
+ d && d(b);
418
421
  }, ee = (b) => {
419
422
  S(b.target.value);
420
423
  }, ae = (b) => {
421
- if (i && t && i.setValue(t, b), y.onChange) {
424
+ if (c && t && c.setValue(t, b), y.onChange) {
422
425
  const D = {
423
426
  target: { value: b }
424
427
  };
425
428
  y.onChange(D);
426
429
  }
427
- h(!1), x(!1), S("");
428
- }, ne = (b) => {
429
- if (b.stopPropagation(), i && t && i.setValue(t, ""), y.onChange) {
430
+ g(!1), x(!1), S("");
431
+ }, oe = (b) => {
432
+ if (b.stopPropagation(), c && t && c.setValue(t, ""), y.onChange) {
430
433
  const D = {
431
434
  target: { value: "" }
432
435
  };
433
436
  y.onChange(D);
434
437
  }
435
- h(!1), x(!1), S("");
436
- }, Y = F.find((b) => b.value === W), oe = E && l ? R : (Y == null ? void 0 : Y.label) || "";
437
- return /* @__PURE__ */ e.createElement("div", { className: s("relative", c), ref: O }, /* @__PURE__ */ e.createElement(
438
+ g(!1), x(!1), S("");
439
+ }, Y = F.find((b) => b.value === W), ne = E && l ? R : (Y == null ? void 0 : Y.label) || "";
440
+ return /* @__PURE__ */ e.createElement("div", { className: s("relative", i), ref: O }, /* @__PURE__ */ e.createElement(
438
441
  "div",
439
442
  {
440
443
  id: y.id || t,
@@ -444,7 +447,7 @@ const Ee = e.forwardRef(
444
447
  "aria-expanded": l,
445
448
  className: s(
446
449
  "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",
447
- o
450
+ n
448
451
  ),
449
452
  onClick: U,
450
453
  onFocus: E ? void 0 : Z,
@@ -456,30 +459,30 @@ const Ee = e.forwardRef(
456
459
  {
457
460
  ref: k,
458
461
  type: "text",
459
- value: oe,
462
+ value: ne,
460
463
  onChange: ee,
461
464
  onFocus: Z,
462
465
  onBlur: K,
463
- placeholder: n ? "" : "Selecione...",
466
+ placeholder: o ? "" : "Selecione...",
464
467
  className: s(
465
468
  "w-full bg-transparent border-none outline-none text-sm",
466
469
  !W && !R && "text-gray-400"
467
470
  )
468
471
  }
469
- ) : /* @__PURE__ */ e.createElement("span", { className: s("block truncate", !W && "text-gray-400") }, (Y == null ? void 0 : Y.label) || !n && "Selecione..."),
470
- g && /* @__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)]" })),
471
- C && W && !g && /* @__PURE__ */ e.createElement(
472
+ ) : /* @__PURE__ */ e.createElement("span", { className: s("block truncate", !W && "text-gray-400") }, (Y == null ? void 0 : Y.label) || !o && "Selecione..."),
473
+ h && /* @__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)]" })),
474
+ C && W && !h && /* @__PURE__ */ e.createElement(
472
475
  "button",
473
476
  {
474
477
  type: "button",
475
478
  tabIndex: -1,
476
479
  "aria-label": "Limpar seleção",
477
480
  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",
478
- onClick: ne
481
+ onClick: oe
479
482
  },
480
483
  "✕"
481
484
  )
482
- ), n && /* @__PURE__ */ e.createElement(
485
+ ), o && /* @__PURE__ */ e.createElement(
483
486
  "label",
484
487
  {
485
488
  htmlFor: y.id || t,
@@ -488,13 +491,14 @@ const Ee = e.forwardRef(
488
491
  Q ? "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"
489
492
  )
490
493
  },
491
- n
494
+ o
492
495
  ), /* @__PURE__ */ e.createElement(
493
496
  "div",
494
497
  {
495
498
  className: s(
496
- "absolute left-0 w-full mt-1 rounded-md shadow-lg bg-white z-[9999] transition-all duration-200 overflow-hidden",
497
- l ? "border border-[var(--primary,#2563eb)] max-h-36 opacity-100 scale-100" : "max-h-0 opacity-0 scale-95 pointer-events-none"
499
+ "absolute left-0 w-full mt-1 rounded-md transition-all duration-200 overflow-hidden",
500
+ "bg-[var(--select-dropdown-bg)] border-[var(--select-dropdown-border)] text-[var(--select-dropdown-text)]",
501
+ l ? "border max-h-36 opacity-100 scale-100" : "max-h-0 opacity-0 scale-95 pointer-events-none"
498
502
  ),
499
503
  style: {
500
504
  maxHeight: l ? "9.5rem" : "0",
@@ -504,16 +508,18 @@ const Ee = e.forwardRef(
504
508
  top: l ? A.top : "auto",
505
509
  left: l ? A.left : "auto",
506
510
  width: l ? A.width : "auto",
507
- zIndex: 9999
511
+ zIndex: 9999,
512
+ boxShadow: l ? "var(--select-dropdown-shadow)" : "none"
508
513
  }
509
514
  },
510
- g ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, z) : F.length === 0 ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, f) : F.map((b) => /* @__PURE__ */ e.createElement(
515
+ h ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, z) : F.length === 0 ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, f) : F.map((b) => /* @__PURE__ */ e.createElement(
511
516
  "div",
512
517
  {
513
518
  key: b.value,
514
519
  className: s(
515
- "px-3 py-2 cursor-pointer hover:bg-blue-50 text-sm",
516
- W === b.value && "bg-blue-100"
520
+ "px-3 py-2 cursor-pointer text-sm transition-colors duration-150",
521
+ "hover:bg-[var(--select-dropdown-hover)]",
522
+ W === b.value && "bg-[var(--select-dropdown-selected)]"
517
523
  ),
518
524
  onMouseDown: () => ae(b.value)
519
525
  },
@@ -526,22 +532,22 @@ Ee.displayName = "AsyncSelect";
526
532
  const Ne = e.forwardRef(
527
533
  ({
528
534
  name: t,
529
- label: n,
535
+ label: o,
530
536
  options: a,
531
- className: o,
532
- containerClassName: c,
537
+ className: n,
538
+ containerClassName: i,
533
539
  isClearable: C,
534
540
  onFocus: w,
535
541
  onBlur: z,
536
542
  ...f
537
543
  }, E) => {
538
- var O, k, i;
539
- const [N, p] = e.useState(!1), [u, y] = e.useState(!1), [m, M] = e.useState({
544
+ var O, k, c;
545
+ const [N, p] = e.useState(!1), [d, y] = e.useState(!1), [m, M] = e.useState({
540
546
  top: 0,
541
547
  left: 0,
542
548
  width: 0
543
- }), x = e.useRef(null), l = X(), h = l == null ? void 0 : l.control, F = h && t ? G({ control: h, name: t }) : void 0, v = f.value ?? F ?? [], g = (i = (k = (O = l == null ? void 0 : l.formState) == null ? void 0 : O.errors) == null ? void 0 : k[t]) == null ? void 0 : i.message, T = N || v && v.length > 0, R = e.useCallback(() => {
544
- if (x.current && u) {
549
+ }), x = e.useRef(null), l = X(), g = l == null ? void 0 : l.control, F = g && t ? G({ control: g, name: t }) : void 0, v = f.value ?? F ?? [], h = (c = (k = (O = l == null ? void 0 : l.formState) == null ? void 0 : O.errors) == null ? void 0 : k[t]) == null ? void 0 : c.message, T = N || v && v.length > 0, R = e.useCallback(() => {
550
+ if (x.current && d) {
545
551
  const r = x.current.getBoundingClientRect();
546
552
  M({
547
553
  top: r.bottom + window.scrollY + 4,
@@ -549,15 +555,15 @@ const Ne = e.forwardRef(
549
555
  width: r.width
550
556
  });
551
557
  }
552
- }, [u]);
558
+ }, [d]);
553
559
  e.useEffect(() => {
554
- if (R(), u) {
560
+ if (R(), d) {
555
561
  const r = () => R(), B = () => R();
556
562
  return window.addEventListener("resize", r), window.addEventListener("scroll", B, !0), () => {
557
563
  window.removeEventListener("resize", r), window.removeEventListener("scroll", B, !0);
558
564
  };
559
565
  }
560
- }, [u, R]), e.useEffect(() => {
566
+ }, [d, R]), e.useEffect(() => {
561
567
  const r = (B) => {
562
568
  x.current && !x.current.contains(B.target) && (y(!1), p(!1));
563
569
  };
@@ -583,17 +589,17 @@ const Ne = e.forwardRef(
583
589
  target: { value: [] }
584
590
  })), y(!1), p(!1);
585
591
  };
586
- return /* @__PURE__ */ e.createElement("div", { className: s("relative", c), ref: x }, /* @__PURE__ */ e.createElement(
592
+ return /* @__PURE__ */ e.createElement("div", { className: s("relative", i), ref: x }, /* @__PURE__ */ e.createElement(
587
593
  "div",
588
594
  {
589
595
  id: f.id || t,
590
596
  tabIndex: 0,
591
597
  role: "button",
592
598
  "aria-haspopup": "listbox",
593
- "aria-expanded": u,
599
+ "aria-expanded": d,
594
600
  className: s(
595
601
  "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",
596
- o
602
+ n
597
603
  ),
598
604
  onClick: S,
599
605
  onFocus: V,
@@ -649,7 +655,7 @@ const Ne = e.forwardRef(
649
655
  )
650
656
  )
651
657
  )
652
- )) : !n && /* @__PURE__ */ e.createElement("span", { className: "text-gray-400 text-sm" }, "Selecione...")
658
+ )) : !o && /* @__PURE__ */ e.createElement("span", { className: "text-gray-400 text-sm" }, "Selecione...")
653
659
  ),
654
660
  C && v && v.length > 0 && /* @__PURE__ */ e.createElement(
655
661
  "button",
@@ -662,7 +668,7 @@ const Ne = e.forwardRef(
662
668
  },
663
669
  "✕"
664
670
  )
665
- ), n && /* @__PURE__ */ e.createElement(
671
+ ), o && /* @__PURE__ */ e.createElement(
666
672
  "label",
667
673
  {
668
674
  htmlFor: f.id || t,
@@ -671,23 +677,25 @@ const Ne = e.forwardRef(
671
677
  T ? "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"
672
678
  )
673
679
  },
674
- n
680
+ o
675
681
  ), /* @__PURE__ */ e.createElement(
676
682
  "div",
677
683
  {
678
684
  className: s(
679
- "absolute left-0 w-full mt-1 rounded-md shadow-lg bg-white z-[9999] transition-all duration-200 overflow-hidden",
680
- u ? "border border-[var(--primary,#2563eb)] max-h-36 opacity-100 scale-100" : "max-h-0 opacity-0 scale-95 pointer-events-none"
685
+ "absolute left-0 w-full mt-1 rounded-md transition-all duration-200 overflow-hidden",
686
+ "bg-[var(--select-dropdown-bg)] border-[var(--select-dropdown-border)] text-[var(--select-dropdown-text)]",
687
+ d ? "border max-h-36 opacity-100 scale-100" : "max-h-0 opacity-0 scale-95 pointer-events-none"
681
688
  ),
682
689
  style: {
683
- maxHeight: u ? "9.5rem" : "0",
690
+ maxHeight: d ? "9.5rem" : "0",
684
691
  overflowY: a.length > 3 ? "auto" : "hidden",
685
692
  position: "fixed",
686
693
  // Use fixed positioning to escape container overflow
687
- top: u ? m.top : "auto",
688
- left: u ? m.left : "auto",
689
- width: u ? m.width : "auto",
690
- zIndex: 9999
694
+ top: d ? m.top : "auto",
695
+ left: d ? m.left : "auto",
696
+ width: d ? m.width : "auto",
697
+ zIndex: 9999,
698
+ boxShadow: d ? "var(--select-dropdown-shadow)" : "none"
691
699
  }
692
700
  },
693
701
  a.map((r) => /* @__PURE__ */ e.createElement(
@@ -695,8 +703,9 @@ const Ne = e.forwardRef(
695
703
  {
696
704
  key: r.value,
697
705
  className: s(
698
- "px-3 py-2 cursor-pointer hover:bg-blue-50 text-sm flex items-center gap-2",
699
- v.includes(r.value) && "bg-blue-100 font-semibold"
706
+ "px-3 py-2 cursor-pointer text-sm flex items-center gap-2 transition-colors duration-150",
707
+ "hover:bg-[var(--select-dropdown-hover)]",
708
+ v.includes(r.value) && "bg-[var(--select-dropdown-selected)] font-semibold"
700
709
  ),
701
710
  onMouseDown: () => A(r.value)
702
711
  },
@@ -711,17 +720,17 @@ const Ne = e.forwardRef(
711
720
  ),
712
721
  r.label
713
722
  ))
714
- ), g && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, g));
723
+ ), h && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, h));
715
724
  }
716
725
  );
717
726
  Ne.displayName = "MultiSelect";
718
727
  const Ce = e.forwardRef(
719
728
  ({
720
729
  name: t,
721
- label: n,
730
+ label: o,
722
731
  loadOptions: a,
723
- className: o,
724
- containerClassName: c,
732
+ className: n,
733
+ containerClassName: i,
725
734
  isClearable: C,
726
735
  defaultOptions: w = !1,
727
736
  loadingMessage: z = "Carregando...",
@@ -729,121 +738,121 @@ const Ce = e.forwardRef(
729
738
  searchable: E = !1,
730
739
  debounceMs: N = 300,
731
740
  maxSelectedDisplay: p = 3,
732
- onFocus: u,
741
+ onFocus: d,
733
742
  onBlur: y,
734
743
  ...m
735
744
  }, M) => {
736
745
  var b, D, le;
737
- const [x, l] = e.useState(!1), [h, F] = e.useState(!1), [v, g] = e.useState([]), [T, R] = e.useState(!1), [S, V] = e.useState(""), [I, A] = e.useState(""), [H, O] = e.useState({
746
+ const [x, l] = e.useState(!1), [g, F] = e.useState(!1), [v, h] = e.useState([]), [T, R] = e.useState(!1), [S, V] = e.useState(""), [I, A] = e.useState(""), [H, O] = e.useState({
738
747
  top: 0,
739
748
  left: 0,
740
749
  width: 0
741
- }), k = e.useRef(null), i = e.useRef(null), r = X(), B = r == null ? void 0 : r.control, W = B && t ? G({ control: B, name: t }) : void 0, _ = m.value ?? W ?? [], Q = (le = (D = (b = r == null ? void 0 : r.formState) == null ? void 0 : b.errors) == null ? void 0 : D[t]) == null ? void 0 : le.message, $ = x || _ && _.length > 0, j = e.useCallback(() => {
742
- if (k.current && h) {
743
- const d = k.current.getBoundingClientRect();
750
+ }), k = e.useRef(null), c = e.useRef(null), r = X(), B = r == null ? void 0 : r.control, W = B && t ? G({ control: B, name: t }) : void 0, _ = m.value ?? W ?? [], Q = (le = (D = (b = r == null ? void 0 : r.formState) == null ? void 0 : b.errors) == null ? void 0 : D[t]) == null ? void 0 : le.message, $ = x || _ && _.length > 0, j = e.useCallback(() => {
751
+ if (k.current && g) {
752
+ const u = k.current.getBoundingClientRect();
744
753
  O({
745
- top: d.bottom + window.scrollY + 4,
746
- left: d.left + window.scrollX,
747
- width: d.width
754
+ top: u.bottom + window.scrollY + 4,
755
+ left: u.left + window.scrollX,
756
+ width: u.width
748
757
  });
749
758
  }
750
- }, [h]);
759
+ }, [g]);
751
760
  e.useEffect(() => {
752
- if (j(), h) {
753
- const d = () => j(), P = () => j();
754
- return window.addEventListener("resize", d), window.addEventListener("scroll", P, !0), () => {
755
- window.removeEventListener("resize", d), window.removeEventListener("scroll", P, !0);
761
+ if (j(), g) {
762
+ const u = () => j(), P = () => j();
763
+ return window.addEventListener("resize", u), window.addEventListener("scroll", P, !0), () => {
764
+ window.removeEventListener("resize", u), window.removeEventListener("scroll", P, !0);
756
765
  };
757
766
  }
758
- }, [h, j]), e.useEffect(() => {
759
- const d = setTimeout(() => {
767
+ }, [g, j]), e.useEffect(() => {
768
+ const u = setTimeout(() => {
760
769
  A(S);
761
770
  }, N);
762
- return () => clearTimeout(d);
771
+ return () => clearTimeout(u);
763
772
  }, [S, N]), e.useEffect(() => {
764
- (h || w && v.length === 0) && U(E ? I : void 0);
765
- }, [I, h]), e.useEffect(() => {
766
- w === !0 ? U() : Array.isArray(w) && g(w);
773
+ (g || w && v.length === 0) && U(E ? I : void 0);
774
+ }, [I, g]), e.useEffect(() => {
775
+ w === !0 ? U() : Array.isArray(w) && h(w);
767
776
  }, []);
768
- const U = async (d) => {
777
+ const U = async (u) => {
769
778
  try {
770
779
  R(!0);
771
- const P = await a(d);
772
- g(P);
780
+ const P = await a(u);
781
+ h(P);
773
782
  } catch (P) {
774
- console.error("Error loading options:", P), g([]);
783
+ console.error("Error loading options:", P), h([]);
775
784
  } finally {
776
785
  R(!1);
777
786
  }
778
787
  };
779
788
  e.useEffect(() => {
780
- const d = (P) => {
789
+ const u = (P) => {
781
790
  k.current && !k.current.contains(P.target) && (F(!1), l(!1), V(""));
782
791
  };
783
- return document.addEventListener("mousedown", d), () => {
784
- document.removeEventListener("mousedown", d);
792
+ return document.addEventListener("mousedown", u), () => {
793
+ document.removeEventListener("mousedown", u);
785
794
  };
786
795
  }, []);
787
796
  const Z = () => {
788
- h || (F(!0), l(!0), E && i.current && setTimeout(() => {
789
- var d;
790
- return (d = i.current) == null ? void 0 : d.focus();
797
+ g || (F(!0), l(!0), E && c.current && setTimeout(() => {
798
+ var u;
799
+ return (u = c.current) == null ? void 0 : u.focus();
791
800
  }, 0));
792
- }, K = (d) => {
793
- l(!0), u && u(d);
794
- }, ee = (d) => {
795
- y && y(d);
796
- }, ae = (d) => {
797
- V(d.target.value);
798
- }, ne = (d) => {
801
+ }, K = (u) => {
802
+ l(!0), d && d(u);
803
+ }, ee = (u) => {
804
+ y && y(u);
805
+ }, ae = (u) => {
806
+ V(u.target.value);
807
+ }, oe = (u) => {
799
808
  let P;
800
- _.includes(d) ? P = _.filter((re) => re !== d) : P = [..._, d], r && t && r.setValue(t, P), m.onChange && m.onChange({
809
+ _.includes(u) ? P = _.filter((re) => re !== u) : P = [..._, u], r && t && r.setValue(t, P), m.onChange && m.onChange({
801
810
  target: { value: P }
802
811
  }), l(!0);
803
- }, Y = (d, P) => {
812
+ }, Y = (u, P) => {
804
813
  P.stopPropagation();
805
- const re = _.filter((pe) => pe !== d);
814
+ const re = _.filter((pe) => pe !== u);
806
815
  r && t && r.setValue(t, re), m.onChange && m.onChange({
807
816
  target: { value: re }
808
817
  });
809
- }, oe = (d) => {
810
- d.stopPropagation(), r && t && r.setValue(t, []), m.onChange && m.onChange({
818
+ }, ne = (u) => {
819
+ u.stopPropagation(), r && t && r.setValue(t, []), m.onChange && m.onChange({
811
820
  target: { value: [] }
812
821
  }), F(!1), l(!1), V("");
813
- }, q = v.filter((d) => _.includes(d.value)), te = q.slice(0, p), J = q.length - p;
814
- return /* @__PURE__ */ e.createElement("div", { className: s("relative", c), ref: k }, /* @__PURE__ */ e.createElement(
822
+ }, q = v.filter((u) => _.includes(u.value)), te = q.slice(0, p), J = q.length - p;
823
+ return /* @__PURE__ */ e.createElement("div", { className: s("relative", i), ref: k }, /* @__PURE__ */ e.createElement(
815
824
  "div",
816
825
  {
817
826
  id: m.id || t,
818
827
  tabIndex: E ? -1 : 0,
819
828
  role: "button",
820
829
  "aria-haspopup": "listbox",
821
- "aria-expanded": h,
830
+ "aria-expanded": g,
822
831
  className: s(
823
832
  "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",
824
- o
833
+ n
825
834
  ),
826
835
  onClick: Z,
827
836
  onFocus: E ? void 0 : K,
828
837
  onBlur: E ? void 0 : ee,
829
838
  ref: M
830
839
  },
831
- /* @__PURE__ */ e.createElement("div", { className: "flex flex-wrap gap-1 items-center min-h-[1.5rem] w-full" }, te.map((d) => /* @__PURE__ */ e.createElement(
840
+ /* @__PURE__ */ e.createElement("div", { className: "flex flex-wrap gap-1 items-center min-h-[1.5rem] w-full" }, te.map((u) => /* @__PURE__ */ e.createElement(
832
841
  "span",
833
842
  {
834
- key: d.value,
843
+ key: u.value,
835
844
  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",
836
845
  style: { maxWidth: "140px" }
837
846
  },
838
- /* @__PURE__ */ e.createElement("span", { className: "truncate", title: d.label }, d.label),
847
+ /* @__PURE__ */ e.createElement("span", { className: "truncate", title: u.label }, u.label),
839
848
  /* @__PURE__ */ e.createElement(
840
849
  "button",
841
850
  {
842
851
  type: "button",
843
852
  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",
844
- "aria-label": `Remover ${d.label}`,
853
+ "aria-label": `Remover ${u.label}`,
845
854
  tabIndex: -1,
846
- onClick: (P) => Y(d.value, P)
855
+ onClick: (P) => Y(u.value, P)
847
856
  },
848
857
  /* @__PURE__ */ e.createElement(
849
858
  "svg",
@@ -868,16 +877,16 @@ const Ce = e.forwardRef(
868
877
  )), J > 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" }, "+", J, " mais"), E ? /* @__PURE__ */ e.createElement(
869
878
  "input",
870
879
  {
871
- ref: i,
880
+ ref: c,
872
881
  type: "text",
873
882
  value: S,
874
883
  onChange: ae,
875
884
  onFocus: K,
876
885
  onBlur: ee,
877
- placeholder: _.length === 0 && !n ? "Selecione..." : "",
886
+ placeholder: _.length === 0 && !o ? "Selecione..." : "",
878
887
  className: "flex-1 min-w-[120px] bg-transparent border-none outline-none text-sm"
879
888
  }
880
- ) : _.length === 0 && !n && /* @__PURE__ */ e.createElement("span", { className: "text-gray-400 text-sm" }, "Selecione...")),
889
+ ) : _.length === 0 && !o && /* @__PURE__ */ e.createElement("span", { className: "text-gray-400 text-sm" }, "Selecione...")),
881
890
  T && /* @__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)]" })),
882
891
  C && _ && _.length > 0 && !T && /* @__PURE__ */ e.createElement(
883
892
  "button",
@@ -886,11 +895,11 @@ const Ce = e.forwardRef(
886
895
  tabIndex: -1,
887
896
  "aria-label": "Limpar seleção",
888
897
  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",
889
- onClick: oe
898
+ onClick: ne
890
899
  },
891
900
  "✕"
892
901
  )
893
- ), n && /* @__PURE__ */ e.createElement(
902
+ ), o && /* @__PURE__ */ e.createElement(
894
903
  "label",
895
904
  {
896
905
  htmlFor: m.id || t,
@@ -899,45 +908,48 @@ const Ce = e.forwardRef(
899
908
  $ ? "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"
900
909
  )
901
910
  },
902
- n
911
+ o
903
912
  ), /* @__PURE__ */ e.createElement(
904
913
  "div",
905
914
  {
906
915
  className: s(
907
- "absolute left-0 w-full mt-1 rounded-md shadow-lg bg-white z-[9999] transition-all duration-200 overflow-hidden",
908
- h ? "border border-[var(--primary,#2563eb)] max-h-36 opacity-100 scale-100" : "max-h-0 opacity-0 scale-95 pointer-events-none"
916
+ "absolute left-0 w-full mt-1 rounded-md transition-all duration-200 overflow-hidden",
917
+ "bg-[var(--select-dropdown-bg)] border-[var(--select-dropdown-border)] text-[var(--select-dropdown-text)]",
918
+ g ? "border max-h-36 opacity-100 scale-100" : "max-h-0 opacity-0 scale-95 pointer-events-none"
909
919
  ),
910
920
  style: {
911
- maxHeight: h ? "9.5rem" : "0",
921
+ maxHeight: g ? "9.5rem" : "0",
912
922
  overflowY: v.length > 3 ? "auto" : "hidden",
913
923
  position: "fixed",
914
924
  // Use fixed positioning to escape container overflow
915
- top: h ? H.top : "auto",
916
- left: h ? H.left : "auto",
917
- width: h ? H.width : "auto",
918
- zIndex: 9999
925
+ top: g ? H.top : "auto",
926
+ left: g ? H.left : "auto",
927
+ width: g ? H.width : "auto",
928
+ zIndex: 9999,
929
+ boxShadow: g ? "var(--select-dropdown-shadow)" : "none"
919
930
  }
920
931
  },
921
- T ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, z) : v.length === 0 ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, f) : v.map((d) => /* @__PURE__ */ e.createElement(
932
+ T ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, z) : v.length === 0 ? /* @__PURE__ */ e.createElement("div", { className: "px-3 py-2 text-sm text-gray-500 text-center" }, f) : v.map((u) => /* @__PURE__ */ e.createElement(
922
933
  "div",
923
934
  {
924
- key: d.value,
935
+ key: u.value,
925
936
  className: s(
926
- "px-3 py-2 cursor-pointer hover:bg-blue-50 text-sm flex items-center gap-2",
927
- _.includes(d.value) && "bg-blue-100 font-semibold"
937
+ "px-3 py-2 cursor-pointer text-sm flex items-center gap-2 transition-colors duration-150",
938
+ "hover:bg-[var(--select-dropdown-hover)]",
939
+ _.includes(u.value) && "bg-[var(--select-dropdown-selected)] font-semibold"
928
940
  ),
929
- onMouseDown: () => ne(d.value)
941
+ onMouseDown: () => oe(u.value)
930
942
  },
931
943
  /* @__PURE__ */ e.createElement(
932
944
  "input",
933
945
  {
934
946
  type: "checkbox",
935
- checked: _.includes(d.value),
947
+ checked: _.includes(u.value),
936
948
  readOnly: !0,
937
949
  className: "accent-blue-500"
938
950
  }
939
951
  ),
940
- d.label
952
+ u.label
941
953
  ))
942
954
  ), Q && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, Q));
943
955
  }
@@ -950,10 +962,10 @@ const ke = {
950
962
  }, Se = e.forwardRef(
951
963
  ({
952
964
  name: t,
953
- label: n,
965
+ label: o,
954
966
  options: a,
955
- className: o,
956
- containerClassName: c,
967
+ className: n,
968
+ containerClassName: i,
957
969
  optionClassName: C,
958
970
  direction: w = "row",
959
971
  size: z = "md",
@@ -961,11 +973,11 @@ const ke = {
961
973
  onBlur: E,
962
974
  ...N
963
975
  }, p) => {
964
- var h, F, v;
965
- const u = X(), y = u == null ? void 0 : u.control, m = y && t ? G({ control: y, name: t }) : void 0, M = N.value ?? m ?? "", x = (v = (F = (h = u == null ? void 0 : u.formState) == null ? void 0 : h.errors) == null ? void 0 : F[t]) == null ? void 0 : v.message, l = (g) => {
966
- u && t && u.setValue(t, g), N.onChange && N.onChange({ target: { value: g } });
976
+ var g, F, v;
977
+ const d = X(), y = d == null ? void 0 : d.control, m = y && t ? G({ control: y, name: t }) : void 0, M = N.value ?? m ?? "", x = (v = (F = (g = d == null ? void 0 : d.formState) == null ? void 0 : g.errors) == null ? void 0 : F[t]) == null ? void 0 : v.message, l = (h) => {
978
+ d && t && d.setValue(t, h), N.onChange && N.onChange({ target: { value: h } });
967
979
  };
968
- return /* @__PURE__ */ e.createElement("div", { className: s("relative", c), ref: p }, n && /* @__PURE__ */ e.createElement(
980
+ return /* @__PURE__ */ e.createElement("div", { className: s("relative", i), ref: p }, o && /* @__PURE__ */ e.createElement(
969
981
  "label",
970
982
  {
971
983
  htmlFor: t,
@@ -974,7 +986,7 @@ const ke = {
974
986
  "top-0 scale-90 -translate-y-1 text-xs text-[var(--primary,#2563eb)] p-1 rounded-full bg-white"
975
987
  )
976
988
  },
977
- n
989
+ o
978
990
  ), /* @__PURE__ */ e.createElement(
979
991
  "div",
980
992
  {
@@ -982,89 +994,89 @@ const ke = {
982
994
  "flex gap-2 w-full pt-6",
983
995
  // espaço para label flutuante
984
996
  w === "row" ? "flex-row" : "flex-col",
985
- o
997
+ n
986
998
  ),
987
- "aria-label": n,
999
+ "aria-label": o,
988
1000
  tabIndex: -1,
989
1001
  onFocus: f,
990
1002
  onBlur: E
991
1003
  },
992
- a.map((g) => /* @__PURE__ */ e.createElement(
1004
+ a.map((h) => /* @__PURE__ */ e.createElement(
993
1005
  "button",
994
1006
  {
995
- key: g.value,
1007
+ key: h.value,
996
1008
  type: "button",
997
1009
  className: s(
998
1010
  "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)]",
999
1011
  ke[z],
1000
- M === g.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",
1012
+ M === h.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",
1001
1013
  C
1002
1014
  ),
1003
- "aria-pressed": M === g.value,
1004
- "data-selected": M === g.value,
1015
+ "aria-pressed": M === h.value,
1016
+ "data-selected": M === h.value,
1005
1017
  tabIndex: 0,
1006
- onClick: () => l(g.value),
1018
+ onClick: () => l(h.value),
1007
1019
  onKeyDown: (T) => {
1008
- (T.key === "Enter" || T.key === " ") && (T.preventDefault(), l(g.value));
1020
+ (T.key === "Enter" || T.key === " ") && (T.preventDefault(), l(h.value));
1009
1021
  }
1010
1022
  },
1011
- g.icon && /* @__PURE__ */ e.createElement("span", { className: "mr-2 text-lg flex items-center" }, g.icon),
1012
- /* @__PURE__ */ e.createElement("span", { className: "truncate font-medium" }, g.label)
1023
+ h.icon && /* @__PURE__ */ e.createElement("span", { className: "mr-2 text-lg flex items-center" }, h.icon),
1024
+ /* @__PURE__ */ e.createElement("span", { className: "truncate font-medium" }, h.label)
1013
1025
  ))
1014
1026
  ), x && /* @__PURE__ */ e.createElement("span", { className: "text-red-500 text-xs mt-1 block" }, x));
1015
1027
  }
1016
1028
  );
1017
1029
  Se.displayName = "RadioGroup";
1018
- const ie = L.forwardRef(
1019
- ({ children: t, className: n, as: a = "div", ...o }, c) => /* @__PURE__ */ L.createElement(
1030
+ const ce = L.forwardRef(
1031
+ ({ children: t, className: o, as: a = "div", ...n }, i) => /* @__PURE__ */ L.createElement(
1020
1032
  a,
1021
1033
  {
1022
- ref: c,
1034
+ ref: i,
1023
1035
  className: s(
1024
1036
  "px-6 py-4 border-b",
1025
1037
  "bg-[var(--card-header-bg,rgba(249,250,251,0.5))]",
1026
1038
  "border-[var(--card-header-border,#e5e7eb)]",
1027
1039
  "text-[var(--card-text,#111827)]",
1028
- n
1040
+ o
1029
1041
  ),
1030
- ...o
1042
+ ...n
1031
1043
  },
1032
1044
  t
1033
1045
  )
1034
1046
  );
1035
- ie.displayName = "CardHeader";
1036
- const ce = L.forwardRef(
1037
- ({ children: t, className: n, as: a = "div", ...o }, c) => /* @__PURE__ */ L.createElement(
1047
+ ce.displayName = "CardHeader";
1048
+ const ie = L.forwardRef(
1049
+ ({ children: t, className: o, as: a = "div", ...n }, i) => /* @__PURE__ */ L.createElement(
1038
1050
  a,
1039
1051
  {
1040
- ref: c,
1052
+ ref: i,
1041
1053
  className: s(
1042
1054
  "px-6 py-4",
1043
1055
  "flex-1",
1044
1056
  // Para ocupar o espaço disponível
1045
1057
  "bg-[var(--card-bg,#ffffff)]",
1046
1058
  "text-[var(--card-text,#111827)]",
1047
- n
1059
+ o
1048
1060
  ),
1049
- ...o
1061
+ ...n
1050
1062
  },
1051
1063
  t
1052
1064
  )
1053
1065
  );
1054
- ce.displayName = "CardBody";
1066
+ ie.displayName = "CardBody";
1055
1067
  const de = L.forwardRef(
1056
- ({ children: t, className: n, as: a = "div", ...o }, c) => /* @__PURE__ */ L.createElement(
1068
+ ({ children: t, className: o, as: a = "div", ...n }, i) => /* @__PURE__ */ L.createElement(
1057
1069
  a,
1058
1070
  {
1059
- ref: c,
1071
+ ref: i,
1060
1072
  className: s(
1061
1073
  "px-6 py-4 border-t",
1062
1074
  "bg-[var(--card-footer-bg,rgba(249,250,251,0.5))]",
1063
1075
  "border-[var(--card-footer-border,#e5e7eb)]",
1064
1076
  "text-[var(--card-text,#111827)]",
1065
- n
1077
+ o
1066
1078
  ),
1067
- ...o
1079
+ ...n
1068
1080
  },
1069
1081
  t
1070
1082
  )
@@ -1073,10 +1085,10 @@ de.displayName = "CardFooter";
1073
1085
  const Re = L.forwardRef(
1074
1086
  ({
1075
1087
  children: t,
1076
- className: n,
1088
+ className: o,
1077
1089
  variant: a = "default",
1078
- size: o = "md",
1079
- padding: c = "none",
1090
+ size: n = "md",
1091
+ padding: i = "none",
1080
1092
  // none pois cada seção tem seu próprio padding
1081
1093
  rounded: C = "lg",
1082
1094
  constrainWidth: w = !1,
@@ -1097,7 +1109,7 @@ const Re = L.forwardRef(
1097
1109
  sm: "p-3",
1098
1110
  md: "p-4",
1099
1111
  lg: "p-6"
1100
- }, u = {
1112
+ }, d = {
1101
1113
  none: "rounded-none",
1102
1114
  sm: "rounded-sm",
1103
1115
  md: "rounded-md",
@@ -1114,11 +1126,11 @@ const Re = L.forwardRef(
1114
1126
  "overflow-hidden",
1115
1127
  // Para manter os borders radius das seções
1116
1128
  E[a],
1117
- w && N[o],
1129
+ w && N[n],
1118
1130
  // Aplicar max-width apenas se constrainWidth for true
1119
- p[c],
1120
- u[C],
1121
- n
1131
+ p[i],
1132
+ d[C],
1133
+ o
1122
1134
  ),
1123
1135
  ...z
1124
1136
  },
@@ -1126,16 +1138,16 @@ const Re = L.forwardRef(
1126
1138
  );
1127
1139
  }
1128
1140
  ), _e = Object.assign(Re, {
1129
- Header: ie,
1130
- Body: ce,
1141
+ Header: ce,
1142
+ Body: ie,
1131
1143
  Footer: de
1132
1144
  }), ue = L.forwardRef(
1133
1145
  ({
1134
1146
  children: t,
1135
- className: n,
1147
+ className: o,
1136
1148
  variant: a = "default",
1137
- size: o = "md",
1138
- responsive: c = !1,
1149
+ size: n = "md",
1150
+ responsive: i = !1,
1139
1151
  stickyHeader: C = !1,
1140
1152
  ...w
1141
1153
  }, z) => {
@@ -1148,14 +1160,14 @@ const Re = L.forwardRef(
1148
1160
  },
1149
1161
  // Size styles
1150
1162
  {
1151
- "text-sm": o === "sm",
1152
- "text-base": o === "md",
1153
- "text-lg": o === "lg"
1163
+ "text-sm": n === "sm",
1164
+ "text-base": n === "md",
1165
+ "text-lg": n === "lg"
1154
1166
  },
1155
- n
1167
+ o
1156
1168
  ), E = s(
1157
1169
  {
1158
- "overflow-x-auto": c,
1170
+ "overflow-x-auto": i,
1159
1171
  "max-h-96 overflow-y-auto": C
1160
1172
  }
1161
1173
  ), N = /* @__PURE__ */ L.createElement(
@@ -1167,75 +1179,75 @@ const Re = L.forwardRef(
1167
1179
  },
1168
1180
  t
1169
1181
  );
1170
- return c || C ? /* @__PURE__ */ L.createElement("div", { className: E }, N) : N;
1182
+ return i || C ? /* @__PURE__ */ L.createElement("div", { className: E }, N) : N;
1171
1183
  }
1172
1184
  ), fe = L.forwardRef(
1173
- ({ children: t, className: n, as: a = "thead", ...o }, c) => /* @__PURE__ */ L.createElement(
1185
+ ({ children: t, className: o, as: a = "thead", ...n }, i) => /* @__PURE__ */ L.createElement(
1174
1186
  a,
1175
1187
  {
1176
- ref: c,
1188
+ ref: i,
1177
1189
  className: s(
1178
1190
  "border-b border-[var(--table-border)] bg-[var(--table-header-bg)]",
1179
1191
  {
1180
1192
  "sticky top-0 z-10": a === "thead"
1181
1193
  },
1182
- n
1194
+ o
1183
1195
  ),
1184
- ...o
1196
+ ...n
1185
1197
  },
1186
1198
  t
1187
1199
  )
1188
1200
  ), me = L.forwardRef(
1189
- ({ children: t, className: n, as: a = "tbody", ...o }, c) => /* @__PURE__ */ L.createElement(
1201
+ ({ children: t, className: o, as: a = "tbody", ...n }, i) => /* @__PURE__ */ L.createElement(
1190
1202
  a,
1191
1203
  {
1192
- ref: c,
1204
+ ref: i,
1193
1205
  className: s(
1194
1206
  "[&_tr:nth-child(odd)]:bg-[var(--table-row-odd)]",
1195
1207
  "[&_tr:nth-child(even)]:bg-[var(--table-row-even)]",
1196
- n
1208
+ o
1197
1209
  ),
1198
- ...o
1210
+ ...n
1199
1211
  },
1200
1212
  t
1201
1213
  )
1202
1214
  ), be = L.forwardRef(
1203
- ({ children: t, className: n, as: a = "tfoot", ...o }, c) => /* @__PURE__ */ L.createElement(
1215
+ ({ children: t, className: o, as: a = "tfoot", ...n }, i) => /* @__PURE__ */ L.createElement(
1204
1216
  a,
1205
1217
  {
1206
- ref: c,
1218
+ ref: i,
1207
1219
  className: s(
1208
1220
  "border-t border-[var(--table-border)] bg-[var(--table-header-bg)] font-medium",
1209
- n
1221
+ o
1210
1222
  ),
1211
- ...o
1223
+ ...n
1212
1224
  },
1213
1225
  t
1214
1226
  )
1215
1227
  ), ve = L.forwardRef(
1216
- ({ children: t, className: n, variant: a = "default", ...o }, c) => /* @__PURE__ */ L.createElement(
1228
+ ({ children: t, className: o, variant: a = "default", ...n }, i) => /* @__PURE__ */ L.createElement(
1217
1229
  "tr",
1218
1230
  {
1219
- ref: c,
1231
+ ref: i,
1220
1232
  className: s(
1221
1233
  "border-b border-[var(--table-border)] transition-colors",
1222
1234
  {
1223
1235
  "hover:bg-[var(--table-row-hover)]": a === "hover",
1224
1236
  "bg-[var(--table-row-selected)]": a === "selected"
1225
1237
  },
1226
- n
1238
+ o
1227
1239
  ),
1228
- ...o
1240
+ ...n
1229
1241
  },
1230
1242
  t
1231
1243
  )
1232
1244
  ), xe = L.forwardRef(
1233
1245
  ({
1234
1246
  children: t,
1235
- className: n,
1247
+ className: o,
1236
1248
  as: a = "td",
1237
- align: o = "left",
1238
- scope: c,
1249
+ align: n = "left",
1250
+ scope: i,
1239
1251
  colSpan: C,
1240
1252
  rowSpan: w,
1241
1253
  ...z
@@ -1243,7 +1255,7 @@ const Re = L.forwardRef(
1243
1255
  a,
1244
1256
  {
1245
1257
  ref: f,
1246
- scope: a === "th" ? c : void 0,
1258
+ scope: a === "th" ? i : void 0,
1247
1259
  colSpan: C,
1248
1260
  rowSpan: w,
1249
1261
  className: s(
@@ -1251,10 +1263,10 @@ const Re = L.forwardRef(
1251
1263
  {
1252
1264
  "font-semibold": a === "th",
1253
1265
  "text-sm": a === "td",
1254
- "text-center": o === "center",
1255
- "text-right": o === "right"
1266
+ "text-center": n === "center",
1267
+ "text-right": n === "right"
1256
1268
  },
1257
- n
1269
+ o
1258
1270
  ),
1259
1271
  ...z
1260
1272
  },
@@ -1278,9 +1290,9 @@ export {
1278
1290
  Ee as AsyncSelect,
1279
1291
  Fe as Button,
1280
1292
  _e as Card,
1281
- ce as CardBody,
1293
+ ie as CardBody,
1282
1294
  de as CardFooter,
1283
- ie as CardHeader,
1295
+ ce as CardHeader,
1284
1296
  he as Input,
1285
1297
  Ce as MultiAsyncSelect,
1286
1298
  Ne as MultiSelect,