@ufal-lccv/gpsub-ds 0.2.47 → 0.2.48

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,37 +1,37 @@
1
- import { a0 as t, c as P, q as ie, ao as K, C as ae, D as de, n as oe, Y as ce, _ as U, ap as he, aq as ue, ar as fe, as as xe, W as ge, E as ne, at as pe, au as me, av as be, aw as je, ax as Z, ay as z, az as we, aA as We, aB as Ie, aC as ye } from "./GenericAGGridTable-CizvYJ68.js";
1
+ import { a0 as t, c as q, r as ie, ao as K, C as ae, D as de, o as oe, Y as ce, _ as U, ap as he, aq as ue, ar as fe, as as xe, W as ge, E as re, at as pe, au as me, av as be, aw as je, ax as Z, ay as z, az as we, aA as We, aB as Ie, aC as ye } from "./GenericAGGridTable-17IhgzCP.js";
2
2
  import { useState as J, useEffect as Q, useMemo as G, useRef as X, useLayoutEffect as Ae } from "react";
3
3
  import { Icon as te } from "sbwb-ds";
4
4
  import { Controller as v, useController as Re } from "react-hook-form";
5
- import { v as q, s as Se } from "./index-YF_5f0O1.js";
5
+ import { v as _, s as Se } from "./index-YF_5f0O1.js";
6
6
  import { p as se } from "./parseDate-ihxA2lUF.js";
7
7
  const le = 350, De = ({
8
8
  title: d,
9
9
  children: i,
10
10
  endAdornment: f = null,
11
11
  marginBottom: p = "16px",
12
- customStyles: c = {},
12
+ customStyles: h = {},
13
13
  wrapperCustomStyles: l = {},
14
14
  animationContainerCustomStyles: a = {},
15
- hideAdornmentOnCollapse: h = !1,
16
- maxHeight: k = "none",
15
+ hideAdornmentOnCollapse: o = !1,
16
+ maxHeight: W = "none",
17
17
  // Default to 'none' to allow full expansion
18
18
  height: H = "fit-content"
19
19
  }) => {
20
- const [N, T] = J(!1), [m, W] = J(!0);
20
+ const [k, N] = J(!1), [m, y] = J(!0);
21
21
  Q(() => {
22
- if (h)
23
- if (N) {
22
+ if (o)
23
+ if (k) {
24
24
  const w = setTimeout(
25
- () => W(!1),
25
+ () => y(!1),
26
26
  le
27
27
  );
28
28
  return () => clearTimeout(w);
29
29
  } else
30
- W(!0);
31
- }, [N, h]);
32
- const M = h && !m ? null : f;
30
+ y(!0);
31
+ }, [k, o]);
32
+ const M = o && !m ? null : f;
33
33
  return /* @__PURE__ */ t.jsxs(
34
- P,
34
+ q,
35
35
  {
36
36
  width: "100%",
37
37
  flex: "1",
@@ -45,22 +45,22 @@ const le = 350, De = ({
45
45
  divider: !0,
46
46
  marginBottom: p,
47
47
  collapse: {
48
- collapsed: N,
49
- setCollapsed: T
48
+ collapsed: k,
49
+ setCollapsed: N
50
50
  },
51
51
  endAdornment: M,
52
- customStyles: c
52
+ customStyles: h
53
53
  }
54
54
  ),
55
55
  /* @__PURE__ */ t.jsx(
56
- P,
56
+ q,
57
57
  {
58
58
  gap: "8px",
59
59
  width: "100%",
60
60
  height: H,
61
61
  customStyles: {
62
62
  ...a,
63
- maxHeight: N ? "0" : k,
63
+ maxHeight: k ? "0" : W,
64
64
  transition: `max-height ${le}ms ease-in-out`
65
65
  },
66
66
  children: i
@@ -75,51 +75,51 @@ function Fe({
75
75
  name: i,
76
76
  id: f = i,
77
77
  label: p,
78
- readonly: c = !1,
78
+ readonly: h = !1,
79
79
  disabled: l = !1,
80
80
  afterCheck: a,
81
- width: h = "100%",
82
- formatter: k,
81
+ width: o = "100%",
82
+ formatter: W,
83
83
  parser: H,
84
- flex: N,
85
- size: T = "Medium",
84
+ flex: k,
85
+ size: N = "Medium",
86
86
  checkColor: m,
87
- triggerFormField: W = null,
87
+ triggerFormField: y = null,
88
88
  ...M
89
89
  }) {
90
90
  const { onChangeTrigger: w } = K({
91
91
  form: d,
92
92
  fieldName: i,
93
- triggerType: W,
93
+ triggerType: y,
94
94
  debounceTime: 0
95
- }), u = (b, y) => {
96
- y(b), a == null || a(b), w == null || w();
95
+ }), u = (b, S) => {
96
+ S(b), a == null || a(b), w == null || w();
97
97
  };
98
- return /* @__PURE__ */ t.jsx(P, { width: h, flex: N, children: /* @__PURE__ */ t.jsx(
98
+ return /* @__PURE__ */ t.jsx(q, { width: o, flex: k, children: /* @__PURE__ */ t.jsx(
99
99
  v,
100
100
  {
101
101
  name: i,
102
102
  control: d.control,
103
103
  render: ({
104
- field: { onChange: b, value: y, onBlur: S },
105
- fieldState: { error: $ = null }
104
+ field: { onChange: b, value: S, onBlur: L },
105
+ fieldState: { error: T = null }
106
106
  }) => {
107
- const L = $ == null ? void 0 : $.message;
108
- return L && console.log("Error on checkbox!", L), /* @__PURE__ */ t.jsx(
107
+ const $ = T == null ? void 0 : T.message;
108
+ return $ && console.log("Error on checkbox!", $), /* @__PURE__ */ t.jsx(
109
109
  ae,
110
110
  {
111
111
  id: `form-checkbox-${f}`,
112
- checked: k ? k(y) : !!y,
112
+ checked: W ? W(S) : !!S,
113
113
  name: i,
114
114
  label: p,
115
- disabled: l || c,
115
+ disabled: l || h,
116
116
  onChange: (g) => {
117
117
  u(
118
- (H == null ? void 0 : H(g.target.checked, y)) ?? g.target.checked,
118
+ (H == null ? void 0 : H(g.target.checked, S)) ?? g.target.checked,
119
119
  b
120
- ), S == null || S();
120
+ ), L == null || L();
121
121
  },
122
- size: T,
122
+ size: N,
123
123
  checkColor: m,
124
124
  ...M
125
125
  }
@@ -133,55 +133,55 @@ const Oe = ({
133
133
  name: i,
134
134
  label: f,
135
135
  placeholder: p,
136
- readonly: c = !1,
136
+ readonly: h = !1,
137
137
  disabled: l = !1,
138
138
  width: a = "100%",
139
- flex: h,
140
- tooltipIsVisible: k,
139
+ flex: o,
140
+ tooltipIsVisible: W,
141
141
  tooltipMaxWidth: H,
142
- tooltipPosition: N = "top",
143
- afterFormChange: T,
142
+ tooltipPosition: k = "top",
143
+ afterFormChange: N,
144
144
  openToDate: m,
145
- range: W = !1,
145
+ range: y = !1,
146
146
  openCalendarOnInputClick: M = !1,
147
147
  ...w
148
148
  }) => {
149
149
  let u = p;
150
- return !q(p) && !l && (u = c ? "Nenhuma data escolhida" : "Escolha uma data"), /* @__PURE__ */ t.jsx(P, { width: a, flex: h, children: /* @__PURE__ */ t.jsx(
150
+ return !_(p) && !l && (u = h ? "Nenhuma data escolhida" : "Escolha uma data"), /* @__PURE__ */ t.jsx(q, { width: a, flex: o, children: /* @__PURE__ */ t.jsx(
151
151
  v,
152
152
  {
153
153
  name: i,
154
154
  control: d.control,
155
- render: ({ field: { value: b, onChange: y, ref: S } }) => {
156
- let $;
157
- q(b) && (W ? $ = Array.isArray(b) ? b.join(" - ") : b : $ = new Date(Se(b.slice(0, 10))));
158
- const { error: L } = d.getFieldState(i, d.formState);
155
+ render: ({ field: { value: b, onChange: S, ref: L } }) => {
156
+ let T;
157
+ _(b) && (y ? T = Array.isArray(b) ? b.join(" - ") : b : T = new Date(Se(b.slice(0, 10))));
158
+ const { error: $ } = d.getFieldState(i, d.formState);
159
159
  return /* @__PURE__ */ t.jsx(
160
160
  de,
161
161
  {
162
- ref: S,
162
+ ref: L,
163
163
  idCalendar: `${i}-calendar`,
164
164
  label: f,
165
- value: $,
165
+ value: T,
166
166
  size: "Small",
167
- readonly: c,
168
- errorMessage: L == null ? void 0 : L.message,
167
+ readonly: h,
168
+ errorMessage: $ == null ? void 0 : $.message,
169
169
  disabled: l,
170
170
  placeholder: u,
171
171
  onChangeHandleDate: (g) => {
172
- var r;
173
- y(
174
- W ? g ? g.split(" - ").map((D) => {
172
+ var n;
173
+ S(
174
+ y ? g ? g.split(" - ").map((D) => {
175
175
  var O;
176
176
  return ((O = se(D)) == null ? void 0 : O.slice(0, 10)) || null;
177
- }) : [null, null] : g && ((r = se(g)) == null ? void 0 : r.slice(0, 10)) || null
178
- ), T == null || T(g);
177
+ }) : [null, null] : g && ((n = se(g)) == null ? void 0 : n.slice(0, 10)) || null
178
+ ), N == null || N(g);
179
179
  },
180
180
  openToDate: m,
181
- selectsRange: W,
181
+ selectsRange: y,
182
182
  openCalendarOnInputClick: M,
183
183
  width: a,
184
- flex: h,
184
+ flex: o,
185
185
  ...w
186
186
  }
187
187
  );
@@ -194,68 +194,68 @@ function Ee({
194
194
  name: i,
195
195
  label: f,
196
196
  slots: { field: p },
197
- slotsProps: c,
197
+ slotsProps: h,
198
198
  triggerFormField: l = null,
199
199
  // Value
200
200
  value: a,
201
201
  // Flags
202
- bypassControllerOnChange: h = !1,
203
- overrideOnBlur: k = !1,
202
+ bypassControllerOnChange: o = !1,
203
+ overrideOnBlur: W = !1,
204
204
  isRequired: H = !1,
205
- readonly: N = !1,
206
- disabled: T = !1,
205
+ readonly: k = !1,
206
+ disabled: N = !1,
207
207
  // Tranformations
208
208
  parser: m,
209
209
  // Debounce
210
- debounce: W,
210
+ debounce: y,
211
211
  // Change handlers
212
212
  beforeChange: M,
213
213
  onChange: w,
214
214
  afterChange: u,
215
215
  // Blur handlers
216
216
  beforeBlur: b,
217
- onBlur: y,
218
- afterBlur: S,
217
+ onBlur: S,
218
+ afterBlur: L,
219
219
  // Enter handlers
220
- onEnter: $
220
+ onEnter: T
221
221
  }) {
222
222
  const {
223
- field: { value: L, onChange: g },
224
- fieldState: { error: r = null }
225
- } = Re({ name: i, control: d.control }), D = q(W), { onChangeTrigger: O, onBlurTrigger: o } = K({
223
+ field: { value: $, onChange: g },
224
+ fieldState: { error: n = null }
225
+ } = Re({ name: i, control: d.control }), D = _(y), { onChangeTrigger: O, onBlurTrigger: c } = K({
226
226
  form: d,
227
227
  fieldName: i,
228
228
  triggerType: l,
229
229
  debounceTime: D ? 0 : 500
230
- }), n = (e, j) => {
231
- var R, _;
232
- const F = ((R = e == null ? void 0 : e.target) == null ? void 0 : R.value) || ((_ = e == null ? void 0 : e.target) == null ? void 0 : _.checked) || e || void 0, A = q(m) ? m(F) : F;
233
- M == null || M(A), h || j == null || j(A), w == null || w(e, j), u == null || u(e, j), O == null || O();
230
+ }), r = (e, j) => {
231
+ var R, P;
232
+ const F = ((R = e == null ? void 0 : e.target) == null ? void 0 : R.value) || ((P = e == null ? void 0 : e.target) == null ? void 0 : P.checked) || e || void 0, A = _(m) ? m(F) : F;
233
+ M == null || M(A), o || j == null || j(A), w == null || w(e, j), u == null || u(e, j), O == null || O();
234
234
  }, I = G(() => {
235
- if (!D) return n;
235
+ if (!D) return r;
236
236
  let e;
237
237
  return (F, A) => {
238
- clearTimeout(e), e = setTimeout(() => n(F, A), W);
238
+ clearTimeout(e), e = setTimeout(() => r(F, A), y);
239
239
  };
240
- }, [D, W, n]), x = (e, j) => {
240
+ }, [D, y, r]), x = (e, j) => {
241
241
  var A, R;
242
242
  const F = ((A = e == null ? void 0 : e.target) == null ? void 0 : A.value) || ((R = e == null ? void 0 : e.target) == null ? void 0 : R.checked) || e || void 0;
243
- !k && h && (g == null || g(F)), b == null || b(e, j), y == null || y(e, j), S == null || S(e, j), o == null || o();
243
+ !W && o && (g == null || g(F)), b == null || b(e, j), S == null || S(e, j), L == null || L(e, j), c == null || c();
244
244
  }, C = (e, j) => {
245
- $ == null || $(e, j);
245
+ T == null || T(e, j);
246
246
  };
247
- r != null && r.message && console.log(`Error on ${p.displayName}!`, r.message);
248
- const s = q(a) ? a == null ? void 0 : a(L) : { value: L };
249
- return /* @__PURE__ */ t.jsx(P, { ...c == null ? void 0 : c.container, children: /* @__PURE__ */ t.jsx(
247
+ n != null && n.message && console.log(`Error on ${p.displayName}!`, n.message);
248
+ const s = _(a) ? a == null ? void 0 : a($) : { value: $ };
249
+ return /* @__PURE__ */ t.jsx(q, { ...h == null ? void 0 : h.container, children: /* @__PURE__ */ t.jsx(
250
250
  p,
251
251
  {
252
- ...c == null ? void 0 : c.field,
252
+ ...h == null ? void 0 : h.field,
253
253
  ...s,
254
254
  label: f,
255
255
  onChange: (e) => I == null ? void 0 : I(e, g),
256
256
  onBlur: (e) => x == null ? void 0 : x(e, g),
257
257
  onEnter: (e) => C == null ? void 0 : C(e, g),
258
- errorMessage: r == null ? void 0 : r.message
258
+ errorMessage: n == null ? void 0 : n.message
259
259
  }
260
260
  ) });
261
261
  }
@@ -264,54 +264,54 @@ const Ve = ({
264
264
  name: i,
265
265
  label: f,
266
266
  options: p,
267
- readonly: c = !1,
267
+ readonly: h = !1,
268
268
  disabled: l = !1,
269
269
  width: a = "100%",
270
- flex: h,
271
- placeholder: k,
270
+ flex: o,
271
+ placeholder: W,
272
272
  iconName: H,
273
- onSelect: N,
274
- hasSelectAll: T = !1,
273
+ onSelect: k,
274
+ hasSelectAll: N = !1,
275
275
  tags: m = !0,
276
- sortOptions: W = !1,
276
+ sortOptions: y = !1,
277
277
  enableSearch: M = !1,
278
278
  valueAllOption: w,
279
279
  isRequired: u = !1,
280
280
  tooltipProps: b = {},
281
- infoProps: y = {},
282
- triggerFormField: S = null,
283
- ...$
281
+ infoProps: S = {},
282
+ triggerFormField: L = null,
283
+ ...T
284
284
  }) => {
285
- const { onChangeTrigger: L } = K({
285
+ const { onChangeTrigger: $ } = K({
286
286
  form: d,
287
287
  fieldName: i,
288
- triggerType: S,
288
+ triggerType: L,
289
289
  debounceTime: 0
290
290
  });
291
- return /* @__PURE__ */ t.jsx(P, { width: a, flex: h, children: /* @__PURE__ */ t.jsx(
291
+ return /* @__PURE__ */ t.jsx(q, { width: a, flex: o, children: /* @__PURE__ */ t.jsx(
292
292
  v,
293
293
  {
294
294
  name: i,
295
295
  control: d.control,
296
- render: ({ field: { value: g, onChange: r } }) => {
297
- const { error: D } = d.getFieldState(i), O = q(g) ? g : [];
296
+ render: ({ field: { value: g, onChange: n } }) => {
297
+ const { error: D } = d.getFieldState(i), O = _(g) ? g : [];
298
298
  return /* @__PURE__ */ t.jsx(
299
299
  oe,
300
300
  {
301
301
  label: f,
302
302
  size: "Small",
303
- disabled: l || c,
304
- onChange: (o) => {
305
- r(o), N == null || N(o), L == null || L();
303
+ disabled: l || h,
304
+ onChange: (c) => {
305
+ n(c), k == null || k(c), $ == null || $();
306
306
  },
307
307
  values: O,
308
308
  errorMessage: D == null ? void 0 : D.message,
309
309
  options: p,
310
310
  iconName: H,
311
- hasSelectAll: T,
311
+ hasSelectAll: N,
312
312
  tags: m,
313
- sortOptions: W,
314
- placeholder: k,
313
+ sortOptions: y,
314
+ placeholder: W,
315
315
  enableSearch: M,
316
316
  valueAllOption: w,
317
317
  isRequired: u,
@@ -323,11 +323,11 @@ const Ve = ({
323
323
  tooltipProps: {
324
324
  position: "top",
325
325
  maxWidth: "300px",
326
- ...y.tooltipProps
326
+ ...S.tooltipProps
327
327
  },
328
- ...y
328
+ ...S
329
329
  },
330
- ...$
330
+ ...T
331
331
  }
332
332
  );
333
333
  }
@@ -338,47 +338,47 @@ const Ve = ({
338
338
  form: i,
339
339
  name: f,
340
340
  label: p,
341
- options: c,
341
+ options: h,
342
342
  readonly: l = !1,
343
343
  disabled: a = !1,
344
- optionsMap: h,
345
- width: k = "100%",
344
+ optionsMap: o,
345
+ width: W = "100%",
346
346
  flex: H,
347
- placeholder: N,
348
- onSelect: T,
347
+ placeholder: k,
348
+ onSelect: N,
349
349
  parser: m,
350
- onPaste: W,
350
+ onPaste: y,
351
351
  filter: M,
352
352
  tooltipProps: w = {},
353
353
  infoProps: u = {},
354
354
  maxHeightMenu: b,
355
- isRequired: y = !1,
356
- onRemoveSelected: S,
357
- triggerFormField: $ = null,
358
- displayText: L,
359
- usePortal: g = !1,
360
- ...r
355
+ isRequired: S = !1,
356
+ onRemoveSelected: L,
357
+ triggerFormField: T = null,
358
+ displayText: $,
359
+ usePortal: g = !0,
360
+ ...n
361
361
  }) => {
362
362
  const { onChangeTrigger: D } = K({
363
363
  form: i,
364
364
  fieldName: f,
365
- triggerType: $,
365
+ triggerType: T,
366
366
  debounceTime: 0
367
367
  }), O = {
368
368
  position: "top",
369
369
  ...w
370
- }, o = {
370
+ }, c = {
371
371
  ...u,
372
372
  tooltipProps: {
373
373
  position: "top",
374
374
  maxWidth: "300px",
375
375
  ...u == null ? void 0 : u.tooltipProps
376
376
  }
377
- }, n = (x, C) => {
377
+ }, r = (x, C) => {
378
378
  let s = x;
379
- m && (s = m == null ? void 0 : m(x)), C(s), T == null || T(s), D == null || D();
380
- }, I = G(() => q(h) ? h : Object.fromEntries(c.map((x) => [x.value, x])), [c, h]);
381
- return /* @__PURE__ */ t.jsx(P, { width: k, flex: H, children: /* @__PURE__ */ t.jsx(
379
+ m && (s = m == null ? void 0 : m(x)), C(s), N == null || N(s), D == null || D();
380
+ }, I = G(() => _(o) ? o : Object.fromEntries(h.map((x) => [x.value, x])), [h, o]);
381
+ return /* @__PURE__ */ t.jsx(q, { width: W, flex: H, children: /* @__PURE__ */ t.jsx(
382
382
  v,
383
383
  {
384
384
  name: f,
@@ -399,34 +399,35 @@ const Ve = ({
399
399
  readonly: l,
400
400
  filter: M,
401
401
  errorMessage: s == null ? void 0 : s.message,
402
- placeholder: N,
402
+ placeholder: k,
403
403
  value: e,
404
404
  handleOption: (j) => {
405
- n(j.value, x);
405
+ r(j.value, x);
406
406
  },
407
407
  tooltipProps: O,
408
- options: c,
408
+ options: h,
409
409
  usePortal: g,
410
- infoProps: o,
410
+ infoProps: c,
411
411
  maxHeightMenu: b,
412
- isRequired: y,
413
- onRemoveSelected: S,
414
- displayText: L,
415
- onPaste: W,
416
- ...r
412
+ isRequired: S,
413
+ onRemoveSelected: L,
414
+ displayText: $,
415
+ onPaste: y,
416
+ ...n
417
417
  }
418
418
  );
419
419
  }
420
420
  }
421
421
  ) });
422
422
  }, ke = (d) => {
423
- const [i, f] = J(!1), [p, c] = J(d), l = X(null);
423
+ const [i, f] = J(!1), [p, h] = J(d), l = X(null);
424
424
  return Q(() => {
425
- c(d);
425
+ h(d);
426
426
  }, [d]), Q(() => {
427
427
  if (!i) return;
428
- const a = (h) => {
429
- l.current && !l.current.contains(h.target) && f(!1);
428
+ const a = (o) => {
429
+ const W = o.target;
430
+ W != null && W.closest('[data-menu-select-root="true"]') || l.current && !l.current.contains(o.target) && f(!1);
430
431
  };
431
432
  return document.addEventListener("pointerdown", a), () => {
432
433
  document.removeEventListener("pointerdown", a);
@@ -434,28 +435,29 @@ const Ve = ({
434
435
  }, [i]), {
435
436
  setIsOpen: f,
436
437
  isOpen: i,
437
- setOptionsSelect: c,
438
+ setOptionsSelect: h,
438
439
  optionsSelect: p,
439
440
  selectContainerRef: l
440
441
  };
441
- }, _e = ({
442
+ }, Pe = ({
442
443
  name: d,
443
444
  variant: i = "primary",
444
445
  width: f = "100%",
445
446
  size: p = "Medium",
446
- disabled: c = !1,
447
+ disabled: h = !1,
447
448
  isLoading: l = !1,
448
449
  onClick: a,
449
- options: h,
450
- label: k,
450
+ options: o,
451
+ label: W,
451
452
  menuSelectProps: H = {},
452
- iconName: N,
453
- optionsIconPosition: T
453
+ iconName: k,
454
+ optionsIconPosition: N
454
455
  }) => {
455
- const { isOpen: m, setIsOpen: W, selectContainerRef: M, optionsSelect: w } = ke(h);
456
+ const { isOpen: m, setIsOpen: y, selectContainerRef: M, optionsSelect: w } = ke(o);
456
457
  let u = U.colors.backgroundColors.colorBackgroundSnow;
457
- c ? u = U.colors.neutralColors.colorNeutralCloudy : i !== "primary" && (u = U.colors.neutralColors.colorNeutralDark);
458
+ h ? u = U.colors.neutralColors.colorNeutralCloudy : i !== "primary" && (u = U.colors.neutralColors.colorNeutralDark);
458
459
  const b = {
460
+ usePortal: !0,
459
461
  ...H
460
462
  };
461
463
  return /* @__PURE__ */ t.jsxs(
@@ -464,26 +466,22 @@ const Ve = ({
464
466
  ref: M,
465
467
  width: f,
466
468
  size: p,
467
- disabled: c,
468
- onBlur: (y) => {
469
- const S = y.relatedTarget;
470
- S && !y.currentTarget.contains(S) && W(!1);
471
- },
469
+ disabled: h,
472
470
  children: [
473
- k && /* @__PURE__ */ t.jsx(ue, { children: k }),
471
+ W && /* @__PURE__ */ t.jsx(ue, { children: W }),
474
472
  /* @__PURE__ */ t.jsxs(
475
473
  fe,
476
474
  {
477
475
  type: "button",
478
476
  size: p,
479
- disabled: c,
477
+ disabled: h,
480
478
  variant: i,
481
479
  isLoading: l,
482
- onClick: () => !l && W(!m),
480
+ onClick: () => !l && y(!m),
483
481
  id: `button-component-${d}`,
484
482
  "data-cy": `button-component-${d}`,
485
483
  children: [
486
- l && /* @__PURE__ */ t.jsx(xe, { size: p, disabled: c, variant: i, children: /* @__PURE__ */ t.jsx(
484
+ l && /* @__PURE__ */ t.jsx(xe, { size: p, disabled: h, variant: i, children: /* @__PURE__ */ t.jsx(
487
485
  te,
488
486
  {
489
487
  iconName: `ProgressActivity${p === "Small" ? "Ant" : "Sm"}`,
@@ -516,66 +514,66 @@ const Ve = ({
516
514
  selectContainerRef: M,
517
515
  value: null,
518
516
  optionsSelect: w,
519
- selectOption: (y) => {
520
- a == null || a(y), W(!1);
517
+ selectOption: (S) => {
518
+ a == null || a(S), y(!1);
521
519
  },
522
520
  size: p,
523
521
  inputValue: null,
524
- iconPosition: T,
525
- iconName: N,
522
+ iconPosition: N,
523
+ iconName: k,
526
524
  ...b
527
525
  }
528
526
  )
529
527
  ]
530
528
  }
531
529
  );
532
- }, qe = ({
530
+ }, _e = ({
533
531
  width: d = "100%",
534
532
  height: i = "fit-content",
535
533
  flex: f,
536
534
  backgroundColor: p = U.colors.backgroundColors.colorBackgroundCarpet,
537
- upperComponent: c = void 0,
535
+ upperComponent: h = void 0,
538
536
  options: l = [],
539
537
  lowerComponent: a = void 0,
540
- heightItems: h = "60px",
541
- widthItems: k = "155px",
538
+ heightItems: o = "60px",
539
+ widthItems: W = "155px",
542
540
  emptyProps: H = {
543
541
  title: "Nenhum dado a ser mostrado",
544
542
  body: null
545
543
  },
546
- customWrapperStyles: N = {
544
+ customWrapperStyles: k = {
547
545
  border: `1px solid ${U.colors.neutralColors.colorNeutralSoft}`,
548
546
  borderRadius: "8px"
549
547
  },
550
- customItemStyles: T = {},
548
+ customItemStyles: N = {},
551
549
  selectedKey: m,
552
- onSelect: W,
550
+ onSelect: y,
553
551
  selectedItemKey: M,
554
552
  setSelectedItemKey: w
555
553
  }) => {
556
554
  var O;
557
- const u = m !== void 0, b = !u && M !== void 0, [y, S] = J(((O = l[0]) == null ? void 0 : O.key) ?? null), $ = X(null), L = X(null), g = u ? m : b ? M : y, r = G(() => l.length ? g == null ? u ? null : l[0] : l.find((n) => n.key === g) ?? (u || b ? null : l[0]) : null, [l, g, u, b]);
555
+ const u = m !== void 0, b = !u && M !== void 0, [S, L] = J(((O = l[0]) == null ? void 0 : O.key) ?? null), T = X(null), $ = X(null), g = u ? m : b ? M : S, n = G(() => l.length ? g == null ? u ? null : l[0] : l.find((r) => r.key === g) ?? (u || b ? null : l[0]) : null, [l, g, u, b]);
558
556
  Q(() => {
559
- const o = $.current, n = L.current, I = () => {
560
- o && n && (n.scrollTop = o.scrollTop);
557
+ const c = T.current, r = $.current, I = () => {
558
+ c && r && (r.scrollTop = c.scrollTop);
561
559
  };
562
- return o == null || o.addEventListener("scroll", I), () => {
563
- o == null || o.removeEventListener("scroll", I);
560
+ return c == null || c.addEventListener("scroll", I), () => {
561
+ c == null || c.removeEventListener("scroll", I);
564
562
  };
565
563
  }, []), Q(() => {
566
564
  if (!(u || b)) {
567
565
  if (!l.length) {
568
- S(null);
566
+ L(null);
569
567
  return;
570
568
  }
571
- S((o) => o != null && l.some((n) => n.key === o) ? o : l[0].key);
569
+ L((c) => c != null && l.some((r) => r.key === c) ? c : l[0].key);
572
570
  }
573
571
  }, [l, u, b]);
574
- const D = (o) => {
575
- W == null || W(o), w == null || w(o.key), !u && !b && S(o.key);
572
+ const D = (c) => {
573
+ y == null || y(c), w == null || w(c.key), !u && !b && L(c.key);
576
574
  };
577
575
  return (l == null ? void 0 : l.length) === 0 ? /* @__PURE__ */ t.jsx(
578
- ne,
576
+ re,
579
577
  {
580
578
  title: H.title,
581
579
  body: H.body,
@@ -583,7 +581,7 @@ const Ve = ({
583
581
  mode: "table"
584
582
  }
585
583
  ) : /* @__PURE__ */ t.jsxs(
586
- P,
584
+ q,
587
585
  {
588
586
  width: d,
589
587
  height: i,
@@ -593,28 +591,28 @@ const Ve = ({
593
591
  customStyles: {
594
592
  border: `1px solid ${U.colors.neutralColors.colorNeutralSoft}`,
595
593
  borderRadius: U.borders.borderRadius.borderRadiusSm,
596
- ...N,
594
+ ...k,
597
595
  overflow: "hidden"
598
596
  },
599
597
  children: [
600
- /* @__PURE__ */ t.jsxs(pe, { ref: $, widthItems: k, children: [
601
- c && c,
602
- l == null ? void 0 : l.map((o) => /* @__PURE__ */ t.jsx(
598
+ /* @__PURE__ */ t.jsxs(pe, { ref: T, widthItems: W, children: [
599
+ h && h,
600
+ l == null ? void 0 : l.map((c) => /* @__PURE__ */ t.jsx(
603
601
  me,
604
602
  {
605
- selected: g === o.key,
606
- onClick: () => D(o),
603
+ selected: g === c.key,
604
+ onClick: () => D(c),
607
605
  withBorderRight: !0,
608
- heightItems: h,
609
- customStyles: T,
610
- children: o.item
606
+ heightItems: o,
607
+ customStyles: N,
608
+ children: c.item
611
609
  },
612
- o.key
610
+ c.key
613
611
  )),
614
612
  a && a,
615
613
  /* @__PURE__ */ t.jsx(be, {})
616
614
  ] }),
617
- /* @__PURE__ */ t.jsx(je, { children: r && (r == null ? void 0 : r.contentItem) })
615
+ /* @__PURE__ */ t.jsx(je, { children: n && (n == null ? void 0 : n.contentItem) })
618
616
  ]
619
617
  }
620
618
  );
@@ -622,16 +620,16 @@ const Ve = ({
622
620
  function Ne(d) {
623
621
  return (i) => typeof d == "string" ? i[d] : typeof d == "function" ? d(i) : (console.warn("Please, setup a rowKey for table."), JSON.stringify(i));
624
622
  }
625
- function Pe({
623
+ function qe({
626
624
  id: d,
627
625
  rowKey: i = "id",
628
626
  size: f = "Small",
629
627
  onRowClick: p,
630
- fit: c = !1,
628
+ fit: h = !1,
631
629
  maxHeight: l = "40rem",
632
630
  columns: a,
633
- dataSource: h,
634
- columnsTextSize: k = f,
631
+ dataSource: o,
632
+ columnsTextSize: W = f,
635
633
  emptyProps: H = {
636
634
  width: "100%",
637
635
  height: "100%",
@@ -640,24 +638,24 @@ function Pe({
640
638
  borders: !0,
641
639
  backgroundColor: U.colors.backgroundColors.colorBackgroundSnow
642
640
  },
643
- selectedRow: N = !1,
644
- hideHeader: T = !1,
641
+ selectedRow: k = !1,
642
+ hideHeader: N = !1,
645
643
  withBorder: m = !0,
646
- withBorderRadius: W = !0,
644
+ withBorderRadius: y = !0,
647
645
  striped: M = !1,
648
646
  borderRadius: w = U.borders.borderRadius.borderRadiusSm,
649
647
  disableMaxHeight: u = !1,
650
648
  isVisible: b = !1
651
649
  }) {
652
- const y = G(() => Ne(i), [i]), [S, $] = J(null), L = X(null), g = X(null), [r, D] = J(a);
650
+ const S = G(() => Ne(i), [i]), [L, T] = J(null), $ = X(null), g = X(null), [n, D] = J(a);
653
651
  Ae(() => {
654
652
  if (!g.current || a.length === 0) {
655
653
  D(a);
656
654
  return;
657
655
  }
658
- const n = () => {
659
- var _;
660
- const x = ((_ = g.current) == null ? void 0 : _.clientWidth) || 0;
656
+ const r = () => {
657
+ var P;
658
+ const x = ((P = g.current) == null ? void 0 : P.clientWidth) || 0;
661
659
  if (x === 0) return;
662
660
  let C = 0, s = 0;
663
661
  const e = [], j = [];
@@ -673,8 +671,8 @@ function Pe({
673
671
  R = a.map((E) => {
674
672
  const Y = Number(E.flex);
675
673
  if (Y && Y > 0) {
676
- const B = parseInt(E.minWidth || A, 10), ee = Y * V, re = Math.max(ee, B);
677
- return { ...E, width: `${Math.floor(re)}px` };
674
+ const B = parseInt(E.minWidth || A, 10), ee = Y * V, ne = Math.max(ee, B);
675
+ return { ...E, width: `${Math.floor(ne)}px` };
678
676
  }
679
677
  return !E.width && !Y ? {
680
678
  ...E,
@@ -696,22 +694,22 @@ function Pe({
696
694
  R = a.map((V) => V.width ? V : { ...V, width: V.minWidth || `${A}px` });
697
695
  D(R);
698
696
  };
699
- n();
700
- const I = new ResizeObserver(n);
697
+ r();
698
+ const I = new ResizeObserver(r);
701
699
  return I.observe(g.current), () => I.disconnect();
702
700
  }, [a]), Q(() => {
703
- const n = (I) => {
704
- L.current && !L.current.contains(I.target) && $(null);
701
+ const r = (I) => {
702
+ $.current && !$.current.contains(I.target) && T(null);
705
703
  };
706
- return document.addEventListener("mousedown", n), () => {
707
- document.removeEventListener("mousedown", n);
704
+ return document.addEventListener("mousedown", r), () => {
705
+ document.removeEventListener("mousedown", r);
708
706
  };
709
707
  }, []);
710
- const O = G(() => r ? r.some(
711
- (n) => n.mergeHeaderId && n.mergeHeaderLabel
712
- ) : !1, [r]), o = G(() => {
708
+ const O = G(() => n ? n.some(
709
+ (r) => r.mergeHeaderId && r.mergeHeaderLabel
710
+ ) : !1, [n]), c = G(() => {
713
711
  var C, s;
714
- if (T || !r || r.length === 0)
712
+ if (N || !n || n.length === 0)
715
713
  return null;
716
714
  if (!O)
717
715
  return /* @__PURE__ */ t.jsx(
@@ -721,7 +719,7 @@ function Pe({
721
719
  size: f,
722
720
  numRows: 1,
723
721
  borderRadius: w,
724
- children: r.map((e, j) => {
722
+ children: n.map((e, j) => {
725
723
  var F;
726
724
  return /* @__PURE__ */ t.jsx(
727
725
  z,
@@ -731,48 +729,48 @@ function Pe({
731
729
  maxWidth: e.maxWidth,
732
730
  horizontalAlign: e.horizontalAlign,
733
731
  size: f,
734
- columnsTextSize: k,
732
+ columnsTextSize: W,
735
733
  withBorder: m,
736
734
  headerAlign: e.headerAlign,
737
- isLastColumn: j === r.length - 1,
738
- children: ((F = e.columnRender) == null ? void 0 : F.call(e, h)) || /* @__PURE__ */ t.jsx("span", { title: e.label, children: e.label })
735
+ isLastColumn: j === n.length - 1,
736
+ children: ((F = e.columnRender) == null ? void 0 : F.call(e, o)) || /* @__PURE__ */ t.jsx("span", { title: e.label, children: e.label })
739
737
  },
740
738
  e.dataIndex
741
739
  );
742
740
  })
743
741
  }
744
742
  );
745
- const n = [], I = [];
743
+ const r = [], I = [];
746
744
  let x = 0;
747
- for (; x < r.length; ) {
748
- const e = r[x];
745
+ for (; x < n.length; ) {
746
+ const e = n[x];
749
747
  if (e.mergeHeaderId && e.mergeHeaderLabel) {
750
748
  let j = 0;
751
749
  const F = e.mergeHeaderId;
752
- for (let A = x; A < r.length && r[A].mergeHeaderId === F; A++)
750
+ for (let A = x; A < n.length && n[A].mergeHeaderId === F; A++)
753
751
  j++;
754
- n.push(
752
+ r.push(
755
753
  /* @__PURE__ */ t.jsx(
756
754
  z,
757
755
  {
758
756
  colSpan: j,
759
757
  horizontalAlign: "center",
760
758
  size: f,
761
- columnsTextSize: k,
759
+ columnsTextSize: W,
762
760
  withBorder: m,
763
761
  width: e.width,
764
762
  minWidth: e.minWidth,
765
763
  maxWidth: e.maxWidth,
766
764
  headerAlign: e.headerAlign,
767
765
  isTopRow: !0,
768
- isLastColumn: x + j - 1 === r.length - 1,
766
+ isLastColumn: x + j - 1 === n.length - 1,
769
767
  children: /* @__PURE__ */ t.jsx("span", { title: e.mergeHeaderLabel, children: e.mergeHeaderLabel })
770
768
  },
771
769
  `${e.mergeHeaderId}-merged`
772
770
  )
773
771
  );
774
772
  for (let A = 0; A < j; A++) {
775
- const R = r[x + A];
773
+ const R = n[x + A];
776
774
  I.push(
777
775
  /* @__PURE__ */ t.jsx(
778
776
  z,
@@ -782,11 +780,11 @@ function Pe({
782
780
  maxWidth: R.maxWidth,
783
781
  horizontalAlign: R.horizontalAlign,
784
782
  size: f,
785
- columnsTextSize: k,
783
+ columnsTextSize: W,
786
784
  withBorder: m,
787
785
  headerAlign: e.headerAlign,
788
- isLastColumn: x + A === r.length - 1,
789
- children: ((C = R.columnRender) == null ? void 0 : C.call(R, h)) || /* @__PURE__ */ t.jsx("span", { title: R.label, children: R.label })
786
+ isLastColumn: x + A === n.length - 1,
787
+ children: ((C = R.columnRender) == null ? void 0 : C.call(R, o)) || /* @__PURE__ */ t.jsx("span", { title: R.label, children: R.label })
790
788
  },
791
789
  R.dataIndex + "-individual"
792
790
  )
@@ -794,7 +792,7 @@ function Pe({
794
792
  }
795
793
  x += j;
796
794
  } else
797
- n.push(
795
+ r.push(
798
796
  /* @__PURE__ */ t.jsx(
799
797
  z,
800
798
  {
@@ -804,12 +802,12 @@ function Pe({
804
802
  maxWidth: e.maxWidth,
805
803
  horizontalAlign: e.horizontalAlign,
806
804
  size: f,
807
- columnsTextSize: k,
805
+ columnsTextSize: W,
808
806
  withBorder: m,
809
807
  headerAlign: e.headerAlign,
810
808
  isTopRow: !0,
811
- isLastColumn: x === r.length - 1,
812
- children: ((s = e.columnRender) == null ? void 0 : s.call(e, h)) || /* @__PURE__ */ t.jsx("span", { title: e.label, children: e.label })
809
+ isLastColumn: x === n.length - 1,
810
+ children: ((s = e.columnRender) == null ? void 0 : s.call(e, o)) || /* @__PURE__ */ t.jsx("span", { title: e.label, children: e.label })
813
811
  },
814
812
  e.dataIndex
815
813
  )
@@ -823,7 +821,7 @@ function Pe({
823
821
  size: f,
824
822
  numRows: 2,
825
823
  borderRadius: w,
826
- children: n
824
+ children: r
827
825
  }
828
826
  ),
829
827
  I.length > 0 && /* @__PURE__ */ t.jsx(
@@ -837,9 +835,9 @@ function Pe({
837
835
  }
838
836
  )
839
837
  ] });
840
- }, [r, T, f, k, O]);
841
- return !h || h.length === 0 ? /* @__PURE__ */ t.jsx(
842
- ne,
838
+ }, [n, N, f, W, O]);
839
+ return !o || o.length === 0 ? /* @__PURE__ */ t.jsx(
840
+ re,
843
841
  {
844
842
  backgroundColor: U.colors.backgroundColors.colorBackgroundSnow,
845
843
  borders: !0,
@@ -851,26 +849,26 @@ function Pe({
851
849
  {
852
850
  maxHeight: l,
853
851
  disableMaxHeight: u,
854
- withBorderRadius: W,
852
+ withBorderRadius: y,
855
853
  ref: g,
856
854
  borderRadius: w,
857
855
  isVisible: b,
858
- children: /* @__PURE__ */ t.jsxs(We, { id: d, ref: L, children: [
859
- /* @__PURE__ */ t.jsx("thead", { children: o }),
860
- /* @__PURE__ */ t.jsx("tbody", { style: { width: "100%" }, children: h == null ? void 0 : h.map((n, I, x) => {
861
- const C = y(n);
856
+ children: /* @__PURE__ */ t.jsxs(We, { id: d, ref: $, children: [
857
+ /* @__PURE__ */ t.jsx("thead", { children: c }),
858
+ /* @__PURE__ */ t.jsx("tbody", { style: { width: "100%" }, children: o == null ? void 0 : o.map((r, I, x) => {
859
+ const C = S(r);
862
860
  return /* @__PURE__ */ t.jsx(
863
861
  Z,
864
862
  {
865
863
  isLast: I === x.length - 1,
866
- fit: c,
864
+ fit: h,
867
865
  size: f,
868
866
  withBorder: m,
869
- isSelected: C === S && N,
867
+ isSelected: C === L && k,
870
868
  striped: M && I % 2 !== 0,
871
869
  borderRadius: w,
872
- children: r.map((s, e) => {
873
- var j, F, A, R, _;
870
+ children: n.map((s, e) => {
871
+ var j, F, A, R, P;
874
872
  return /* @__PURE__ */ t.jsx(
875
873
  Ie,
876
874
  {
@@ -878,11 +876,11 @@ function Pe({
878
876
  minWidth: s.minWidth,
879
877
  maxWidth: s.maxWidth,
880
878
  size: f,
881
- isClickable: q(p),
882
- isLastColumn: e === r.length - 1,
879
+ isClickable: _(p),
880
+ isLastColumn: e === n.length - 1,
883
881
  onClick: () => {
884
- p && p(n, s, I), N && $(
885
- S === C ? null : C
882
+ p && p(r, s, I), k && T(
883
+ L === C ? null : C
886
884
  );
887
885
  },
888
886
  horizontalAlign: s.horizontalAlign,
@@ -892,37 +890,37 @@ function Pe({
892
890
  isLast: I === x.length - 1,
893
891
  disabled: (j = s.disable) == null ? void 0 : j.call(
894
892
  s,
895
- n[s.dataIndex],
896
- n,
893
+ r[s.dataIndex],
894
+ r,
897
895
  I,
898
896
  x
899
897
  ),
900
898
  hasError: (F = s.warn) == null ? void 0 : F.call(
901
899
  s,
902
- n[s.dataIndex],
903
- n,
900
+ r[s.dataIndex],
901
+ r,
904
902
  I,
905
903
  x
906
904
  ),
907
905
  backgroundColor: (A = s.paint) == null ? void 0 : A.call(
908
906
  s,
909
- n[s.dataIndex],
910
- n,
907
+ r[s.dataIndex],
908
+ r,
911
909
  I,
912
910
  x
913
911
  ),
914
912
  children: ((R = s.render) == null ? void 0 : R.call(
915
913
  s,
916
- n[s.dataIndex],
917
- n,
914
+ r[s.dataIndex],
915
+ r,
918
916
  I,
919
917
  x
920
918
  )) || /* @__PURE__ */ t.jsx(
921
919
  ye,
922
920
  {
923
- title: n[s.dataIndex],
924
- style: (_ = s.rowCss) == null ? void 0 : _.call(s, n),
925
- children: n[s.dataIndex]
921
+ title: r[s.dataIndex],
922
+ style: (P = s.rowCss) == null ? void 0 : P.call(s, r),
923
+ children: r[s.dataIndex]
926
924
  }
927
925
  ) || ""
928
926
  },
@@ -943,8 +941,8 @@ export {
943
941
  Ee as F,
944
942
  Ve as M,
945
943
  Ue as S,
946
- qe as T,
944
+ _e as T,
947
945
  Fe as a,
948
- _e as b,
949
- Pe as c
946
+ Pe as b,
947
+ qe as c
950
948
  };