@ufal-lccv/gpsub-ds 0.0.2 → 0.0.3

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,25 +1,25 @@
1
- import { G as pe, l as n, C as U, j as me, c as Se, H as z, J as A, s as $e, T as se, i as ae, S as be, I as xe, K as we, E as ye } from "./Checkbox.view-DCFdmWxN.js";
2
- import Ce, { useCallback as de, useMemo as G, useState as D, useRef as q, useEffect as Z, forwardRef as ce, isValidElement as ie, useLayoutEffect as ke } from "react";
3
- import { sg as e, Icon as J } from "sbwb-ds";
4
- import { v as Q, r as X, b as ze } from "./index-_v6RoRxb.js";
1
+ import { G as pe, l as n, C as G, j as me, c as Se, H as C, J as F, s as $e, T as se, i as ae, S as be, I as xe, K as we, E as ye } from "./Checkbox.view-DCFdmWxN.js";
2
+ import Ce, { useCallback as de, useMemo as q, useState as D, useRef as J, useEffect as K, forwardRef as ce, isValidElement as ie, useLayoutEffect as ke } from "react";
3
+ import { sg as e, Icon as Y } from "sbwb-ds";
4
+ import { v as Q, r as U, b as ze } from "./index-_v6RoRxb.js";
5
5
  import { Controller as ne } from "react-hook-form";
6
- function te(o, t, l) {
7
- var i, c, a, s, $;
6
+ function te(o, t, i) {
7
+ var l, c, d, a, b;
8
8
  t == null && (t = 100);
9
- function u() {
10
- var m = Date.now() - s;
11
- m < t && m >= 0 ? i = setTimeout(u, t - m) : (i = null, l || ($ = o.apply(a, c), a = c = null));
9
+ function h() {
10
+ var m = Date.now() - a;
11
+ m < t && m >= 0 ? l = setTimeout(h, t - m) : (l = null, i || (b = o.apply(d, c), d = c = null));
12
12
  }
13
- var g = function() {
14
- a = this, c = arguments, s = Date.now();
15
- var m = l && !i;
16
- return i || (i = setTimeout(u, t)), m && ($ = o.apply(a, c), a = c = null), $;
13
+ var p = function() {
14
+ d = this, c = arguments, a = Date.now();
15
+ var m = i && !l;
16
+ return l || (l = setTimeout(h, t)), m && (b = o.apply(d, c), d = c = null), b;
17
17
  };
18
- return g.clear = function() {
19
- i && (clearTimeout(i), i = null);
20
- }, g.flush = function() {
21
- i && ($ = o.apply(a, c), a = c = null, clearTimeout(i), i = null);
22
- }, g;
18
+ return p.clear = function() {
19
+ l && (clearTimeout(l), l = null);
20
+ }, p.flush = function() {
21
+ l && (b = o.apply(d, c), d = c = null, clearTimeout(l), l = null);
22
+ }, p;
23
23
  }
24
24
  te.debounce = te;
25
25
  var Be = te;
@@ -27,103 +27,103 @@ const We = /* @__PURE__ */ pe(Be);
27
27
  function re({
28
28
  form: o,
29
29
  fieldName: t,
30
- triggerType: l = null,
31
- debounceTime: i = 500
30
+ triggerType: i = null,
31
+ debounceTime: l = 500
32
32
  }) {
33
33
  const c = de(() => {
34
34
  o.trigger(t);
35
- }, [o, t]), a = G(
36
- () => We(() => c(), i),
37
- [c, i]
38
- ), s = G(
39
- () => ["all", "onChange"].includes(l) ? a : null,
40
- [a, l]
41
- ), $ = G(
42
- () => ["all", "onBlur"].includes(l) ? c : null,
43
- [l]
35
+ }, [o, t]), d = q(
36
+ () => We(() => c(), l),
37
+ [c, l]
38
+ ), a = q(
39
+ () => ["all", "onChange"].includes(i) ? d : null,
40
+ [d, i]
41
+ ), b = q(
42
+ () => ["all", "onBlur"].includes(i) ? c : null,
43
+ [i]
44
44
  );
45
- return G(
45
+ return q(
46
46
  () => ({
47
- onChangeTrigger: s,
48
- onBlurTrigger: $
47
+ onChangeTrigger: a,
48
+ onBlurTrigger: b
49
49
  }),
50
- [s, $]
50
+ [a, b]
51
51
  );
52
52
  }
53
53
  const go = ({
54
54
  form: o,
55
55
  name: t,
56
- label: l,
57
- options: i,
56
+ label: i,
57
+ options: l,
58
58
  readonly: c = !1,
59
- disabled: a = !1,
60
- optionsMap: s,
61
- width: $ = "100%",
62
- flex: u,
63
- placeholder: g,
59
+ disabled: d = !1,
60
+ optionsMap: a,
61
+ width: b = "100%",
62
+ flex: h,
63
+ placeholder: p,
64
64
  onSelect: m,
65
65
  parser: f,
66
- filter: y,
67
- tooltipProps: R = {},
68
- infoProps: j = {},
69
- maxHeigthMenu: E,
70
- isRequired: C = !1,
71
- onRemoveSelected: L,
72
- triggerFormField: p = null,
73
- ...W
66
+ filter: x,
67
+ tooltipProps: M = {},
68
+ infoProps: W = {},
69
+ maxHeigthMenu: B,
70
+ isRequired: y = !1,
71
+ onRemoveSelected: R,
72
+ triggerFormField: S = null,
73
+ ...j
74
74
  }) => {
75
- const { onChangeTrigger: S } = re({
75
+ const { onChangeTrigger: I } = re({
76
76
  form: o,
77
77
  fieldName: t,
78
- triggerType: p,
78
+ triggerType: S,
79
79
  debounceTime: 0
80
- }), N = {
80
+ }), g = {
81
81
  position: "top",
82
- ...R
83
- }, O = {
84
- ...j,
82
+ ...M
83
+ }, P = {
84
+ ...W,
85
85
  tooltipProps: {
86
86
  position: "top",
87
87
  maxWidth: "300px",
88
- ...j == null ? void 0 : j.tooltipProps
88
+ ...W == null ? void 0 : W.tooltipProps
89
89
  }
90
- }, T = (b, M) => {
91
- let H = b;
92
- f && (H = f == null ? void 0 : f(b)), M(H), m == null || m(H), S == null || S();
93
- }, h = G(() => Q(s) ? s : Object.fromEntries(i.map((b) => [b.value, b])), [i, s]);
94
- return /* @__PURE__ */ n.jsx(U, { width: $, flex: u, children: /* @__PURE__ */ n.jsx(
90
+ }, A = (u, v) => {
91
+ let N = u;
92
+ f && (N = f == null ? void 0 : f(u)), v(N), m == null || m(N), I == null || I();
93
+ }, T = q(() => Q(a) ? a : Object.fromEntries(l.map((u) => [u.value, u])), [l, a]);
94
+ return /* @__PURE__ */ n.jsx(G, { width: b, flex: h, children: /* @__PURE__ */ n.jsx(
95
95
  ne,
96
96
  {
97
97
  name: t,
98
98
  control: o.control,
99
99
  render: ({
100
- field: { onChange: b, value: M },
101
- fieldState: { error: H = null }
100
+ field: { onChange: u, value: v },
101
+ fieldState: { error: N = null }
102
102
  }) => {
103
- let k = h[M];
103
+ let L = T[v];
104
104
  return /* @__PURE__ */ n.jsx(
105
105
  fe,
106
106
  {
107
- label: l,
107
+ label: i,
108
108
  width: "100%",
109
109
  size: "Small",
110
- disabled: a,
110
+ disabled: d,
111
111
  readonly: c,
112
- filter: y,
113
- errorMessage: H == null ? void 0 : H.message,
114
- placeholder: g,
115
- value: k,
116
- handleOption: (d) => {
117
- T(d.value, b);
112
+ filter: x,
113
+ errorMessage: N == null ? void 0 : N.message,
114
+ placeholder: p,
115
+ value: L,
116
+ handleOption: (w) => {
117
+ A(w.value, u);
118
118
  },
119
- tooltipProps: N,
120
- options: i,
121
- maxHeigthMenu: E,
122
- infoProps: O,
123
- maxHeightMenu: E,
124
- isRequired: C,
125
- onRemoveSelected: L,
126
- ...W
119
+ tooltipProps: g,
120
+ options: l,
121
+ maxHeigthMenu: B,
122
+ infoProps: P,
123
+ maxHeightMenu: B,
124
+ isRequired: y,
125
+ onRemoveSelected: R,
126
+ ...j
127
127
  }
128
128
  );
129
129
  }
@@ -132,55 +132,55 @@ const go = ({
132
132
  }, je = ({
133
133
  form: o,
134
134
  name: t,
135
- label: l,
136
- readonly: i = !1,
135
+ label: i,
136
+ readonly: l = !1,
137
137
  disabled: c = !1,
138
- width: a = "100%",
139
- height: s = "100%",
140
- flex: $,
141
- placeholder: u,
142
- charactersCounter: g = !0,
138
+ width: d = "100%",
139
+ height: a = "100%",
140
+ flex: b,
141
+ placeholder: h,
142
+ charactersCounter: p = !0,
143
143
  maxlength: m = 1e3,
144
144
  resize: f = !0,
145
- triggerFormField: y = null,
146
- minHeight: R,
147
- maxHeight: j,
148
- ...E
145
+ triggerFormField: x = null,
146
+ minHeight: M,
147
+ maxHeight: W,
148
+ ...B
149
149
  }) => {
150
- const { onChangeTrigger: C } = re({
150
+ const { onChangeTrigger: y } = re({
151
151
  form: o,
152
152
  fieldName: t,
153
- triggerType: y
154
- }), L = (p, W) => {
155
- W(p), C == null || C();
153
+ triggerType: x
154
+ }), R = (S, j) => {
155
+ j(S), y == null || y();
156
156
  };
157
- return /* @__PURE__ */ n.jsx(U, { width: a, flex: $, height: s, children: /* @__PURE__ */ n.jsx(
157
+ return /* @__PURE__ */ n.jsx(G, { width: d, flex: b, height: a, children: /* @__PURE__ */ n.jsx(
158
158
  ne,
159
159
  {
160
160
  name: t,
161
161
  control: o.control,
162
162
  render: ({
163
- field: { onChange: p, value: W },
164
- fieldState: { error: S = null }
163
+ field: { onChange: S, value: j },
164
+ fieldState: { error: I = null }
165
165
  }) => /* @__PURE__ */ n.jsx(
166
166
  me,
167
167
  {
168
- label: l,
169
- value: W || "",
168
+ label: i,
169
+ value: j || "",
170
170
  width: "100%",
171
171
  disabled: c,
172
- readonly: i,
173
- height: s,
174
- minHeight: R,
175
- maxHeight: j,
176
- errorMessage: S == null ? void 0 : S.message,
177
- placeholder: u,
178
- onChange: (N) => L(N.target.value, p),
179
- charactersCounter: g,
172
+ readonly: l,
173
+ height: a,
174
+ minHeight: M,
175
+ maxHeight: W,
176
+ errorMessage: I == null ? void 0 : I.message,
177
+ placeholder: h,
178
+ onChange: (g) => R(g.target.value, S),
179
+ charactersCounter: p,
180
180
  maxlength: m,
181
181
  size: "Small",
182
182
  resize: f,
183
- ...E
183
+ ...B
184
184
  }
185
185
  )
186
186
  }
@@ -190,60 +190,60 @@ je.displayName = "TextareaField";
190
190
  const po = ({
191
191
  form: o,
192
192
  name: t,
193
- id: l = t,
194
- label: i,
193
+ id: i = t,
194
+ label: l,
195
195
  readonly: c = !1,
196
- disabled: a = !1,
197
- afterCheck: s,
198
- width: $ = "100%",
199
- formatter: u,
200
- parser: g,
196
+ disabled: d = !1,
197
+ afterCheck: a,
198
+ width: b = "100%",
199
+ formatter: h,
200
+ parser: p,
201
201
  flex: m,
202
202
  size: f = "Medium",
203
- triggerFormField: y = null,
204
- ...R
203
+ triggerFormField: x = null,
204
+ ...M
205
205
  }) => {
206
- const { onChangeTrigger: j } = re({
206
+ const { onChangeTrigger: W } = re({
207
207
  form: o,
208
208
  fieldName: t,
209
- triggerType: y,
209
+ triggerType: x,
210
210
  debounceTime: 0
211
- }), E = (C, L) => {
212
- L(C), s == null || s(C), j == null || j();
211
+ }), B = (y, R) => {
212
+ R(y), a == null || a(y), W == null || W();
213
213
  };
214
- return /* @__PURE__ */ n.jsx(U, { width: $, flex: m, children: /* @__PURE__ */ n.jsx(
214
+ return /* @__PURE__ */ n.jsx(G, { width: b, flex: m, children: /* @__PURE__ */ n.jsx(
215
215
  ne,
216
216
  {
217
217
  name: t,
218
218
  control: o.control,
219
219
  render: ({
220
- field: { onChange: C, value: L },
221
- fieldState: { error: p = null }
220
+ field: { onChange: y, value: R },
221
+ fieldState: { error: S = null }
222
222
  }) => {
223
- const W = p == null ? void 0 : p.message;
224
- return W && console.log("Error on checkbox!", W), /* @__PURE__ */ n.jsx(
223
+ const j = S == null ? void 0 : S.message;
224
+ return j && console.log("Error on checkbox!", j), /* @__PURE__ */ n.jsx(
225
225
  Se,
226
226
  {
227
- id: `form-checkbox-${l}`,
228
- checked: (u == null ? void 0 : u(L)) ?? L,
227
+ id: `form-checkbox-${i}`,
228
+ checked: (h == null ? void 0 : h(R)) ?? R,
229
229
  name: t,
230
- label: i,
231
- disabled: a || c,
232
- onChange: (S) => {
233
- E(
234
- (g == null ? void 0 : g(S.target.checked, L)) ?? S.target.checked,
235
- C
230
+ label: l,
231
+ disabled: d || c,
232
+ onChange: (I) => {
233
+ B(
234
+ (p == null ? void 0 : p(I.target.checked, R)) ?? I.target.checked,
235
+ y
236
236
  );
237
237
  },
238
238
  size: f,
239
- ...R
239
+ ...M
240
240
  }
241
241
  );
242
242
  }
243
243
  }
244
244
  ) });
245
- }, Ne = z.ul`
246
- ${X}
245
+ }, Ne = C.ul`
246
+ ${U}
247
247
  position: fixed;
248
248
  margin-top: ${({ marginTop: o }) => o};
249
249
  padding: ${e.spacings.spacingStack.spacingStackXs} 4px
@@ -272,16 +272,16 @@ const po = ({
272
272
  background: ${e.colors.neutralColors.colorNeutralClean};
273
273
  border-radius: ${e.borders.borderRadius.borderRadiusPill};
274
274
  }
275
- `, Ie = z.li`
276
- ${X}
275
+ `, Ie = C.li`
276
+ ${U}
277
277
  font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
278
278
  font-size: ${({ size: o }) => o === "Small" ? e.fonts.fontSize.fontSizeBodyMd : e.fonts.fontSize.fontSizeBodyLg};
279
279
  padding: ${e.spacings.spacingInline.spacingInlineXs};
280
280
  margin: 0 ${e.spacings.spacingInline.spacingInlineXs};
281
281
  cursor: default;
282
282
  color: ${e.colors.neutralColors.colorNeutralDark};
283
- `, ve = z.li`
284
- ${X}
283
+ `, ve = C.li`
284
+ ${U}
285
285
  display: flex;
286
286
  flex: 2;
287
287
  flex-direction: ${({ menuOptionFlexDirection: o }) => o};
@@ -295,7 +295,7 @@ const po = ({
295
295
  min-width: 0;
296
296
  & > p {
297
297
  display: -webkit-box;
298
- ${({ truncateText: o }) => o && A`
298
+ ${({ truncateText: o }) => o && F`
299
299
  -webkit-line-clamp: 2;
300
300
  -webkit-box-orient: vertical;
301
301
  overflow: hidden;
@@ -303,7 +303,7 @@ const po = ({
303
303
  text-overflow: ellipsis;
304
304
  }
305
305
 
306
- ${({ hasDescription: o }) => o && A`
306
+ ${({ hasDescription: o }) => o && F`
307
307
  line-height: ${e.fonts.lineHeight.lineHeightMd(
308
308
  e.fonts.fontSize.fontSizeBodyMd
309
309
  )};
@@ -314,8 +314,8 @@ const po = ({
314
314
  color: ${({ disabled: t }) => t ? e.colors.neutralColors.colorNeutralCleanest : e.colors.neutralColors.colorNeutralCloudy};
315
315
  }
316
316
  `}
317
- `, Re = z.li`
318
- ${X}
317
+ `, Me = C.li`
318
+ ${U}
319
319
  font-size: ${({ size: o }) => o === "Small" ? e.fonts.fontSize.fontSizeBodySm : e.fonts.fontSize.fontSizeBodyMd};
320
320
  font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
321
321
  font-weight: ${e.fonts.fontWeight.fontWeightSemiBold};
@@ -325,20 +325,20 @@ const po = ({
325
325
  margin: ${({ size: o }) => o === "Small" ? `${e.spacings.spacingStack.spacingStackSm} ${e.spacings.spacingInline.spacingInlineXs}
326
326
  ${e.spacings.spacingStack.spacingStackNano}` : `${e.spacings.spacingStack.spacingStackSm} ${e.spacings.spacingInline.spacingInlineXs}
327
327
  ${e.spacings.spacingStack.spacingStackXs}`};
328
- `, Me = z.span`
329
- ${X}
328
+ `, He = C.span`
329
+ ${U}
330
330
  font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
331
331
  font-size: ${({ size: o }) => o === "Small" ? e.fonts.fontSize.fontSizeBodyMd : e.fonts.fontSize.fontSizeBodyLg};
332
332
  font-weight: ${e.fonts.fontWeight.fontWeightSemiBold};
333
333
  line-height: ${({ size: o }) => o === "Small" ? e.fonts.lineHeight.lineHeightSm(e.fonts.fontSize.fontSizeBodyMd) : e.fonts.lineHeight.lineHeightMd(e.fonts.fontSize.fontSizeBodyLg)};
334
- `, He = z.div`
335
- ${X}
334
+ `, Re = C.div`
335
+ ${U}
336
336
  display: flex;
337
337
  font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
338
338
 
339
339
  & > p {
340
340
  width: 100%;
341
- ${({ truncateText: o }) => o && A`
341
+ ${({ truncateText: o }) => o && F`
342
342
  display: -webkit-box;
343
343
  -webkit-line-clamp: 2;
344
344
  -webkit-box-orient: vertical;
@@ -347,8 +347,8 @@ const po = ({
347
347
  text-overflow: ellipsis;
348
348
  text-align: start;
349
349
  }
350
- `, Fe = z.div`
351
- ${X}
350
+ `, Fe = C.div`
351
+ ${U}
352
352
  display: flex;
353
353
  flex-direction: row;
354
354
  align-items: center;
@@ -358,161 +358,161 @@ const po = ({
358
358
  background-color: ${({ highlightedIndex: o, disabled: t }) => o ? t ? e.colors.backgroundColors.colorBackgroundSnow : e.colors.neutralColors.colorNeutralLight : e.colors.backgroundColors.colorBackgroundSnow};
359
359
  border-radius: ${e.borders.borderRadius.borderRadiusSm};
360
360
  min-height: ${({ size: o }) => o === "Small" ? "28px" : "40px"};
361
- `, Ee = z.div`
362
- ${X}
361
+ `, Ee = C.div`
362
+ ${U}
363
363
  padding: ${({ iconPosition: o }) => o === "left" ? `0 ${e.spacings.spacingInline.spacingInlineNano} 0 0` : `0 0 0 ${e.spacings.spacingInline.spacingInlineNano}`};
364
364
  margin: 0;
365
365
  display: flex;
366
366
  align-self: center;
367
- `, Le = (o, t, l = 0, i = 0, c = "left") => {
368
- const [a, s] = D(0), [$, u] = D(), g = q(null), m = de(() => {
369
- if (!o.current || !g.current) return;
370
- const f = o.current.getBoundingClientRect(), y = g.current.getBoundingClientRect(), R = window.innerHeight, j = window.innerWidth, E = f.top, C = R - f.bottom, L = C < y.height + i && E > C;
371
- let p;
372
- L ? (p = f.top - y.height - l, g.current.style.maxHeight = `${E - l}px`) : (p = f.bottom + i, g.current.style.maxHeight = `${C - i}px`);
373
- let W = f.left;
374
- const S = W + y.width - j;
375
- S > 0 && (W -= S), W < 0 && (W = 0);
376
- const N = j - f.right;
377
- Object.assign(g.current.style, {
367
+ `, Le = (o, t, i = 0, l = 0, c = "left") => {
368
+ const [d, a] = D(0), [b, h] = D(), p = J(null), m = de(() => {
369
+ if (!o.current || !p.current) return;
370
+ const f = o.current.getBoundingClientRect(), x = p.current.getBoundingClientRect(), M = window.innerHeight, W = window.innerWidth, B = f.top, y = M - f.bottom, R = y < x.height + l && B > y;
371
+ let S;
372
+ R ? (S = f.top - x.height - i, p.current.style.maxHeight = `${B - i}px`) : (S = f.bottom + l, p.current.style.maxHeight = `${y - l}px`);
373
+ let j = f.left;
374
+ const I = j + x.width - W;
375
+ I > 0 && (j -= I), j < 0 && (j = 0);
376
+ const g = W - f.right;
377
+ Object.assign(p.current.style, {
378
378
  position: "fixed",
379
- top: `${p}px`,
380
- ...c === "left" ? { left: `${W}px` } : { right: `${N}px` },
381
- width: `${Math.max(f.width, y.width)}px`,
379
+ top: `${S}px`,
380
+ ...c === "left" ? { left: `${j}px` } : { right: `${g}px` },
381
+ width: `${Math.max(f.width, x.width)}px`,
382
382
  overflowY: "auto"
383
383
  });
384
- }, [l, i, c]);
385
- return Z(() => {
386
- var y;
387
- s(0), u((y = o.current) == null ? void 0 : y.clientWidth), m();
384
+ }, [i, l, c]);
385
+ return K(() => {
386
+ var x;
387
+ a(0), h((x = o.current) == null ? void 0 : x.clientWidth), m();
388
388
  const f = () => m();
389
389
  return window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
390
390
  window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
391
391
  };
392
392
  }, [o, m]), {
393
- highlightedIndex: a,
394
- setHighlightedIndex: s,
393
+ highlightedIndex: d,
394
+ setHighlightedIndex: a,
395
395
  isOptionSelected: (f) => f.label === (t == null ? void 0 : t.label),
396
- optionsRef: g,
397
- parentWidth: $
396
+ optionsRef: p,
397
+ parentWidth: b
398
398
  };
399
399
  }, le = ce(
400
400
  ({
401
401
  selectContainerRef: o,
402
402
  optionsSelect: t,
403
- size: l,
404
- selectOption: i,
403
+ size: i,
404
+ selectOption: l,
405
405
  value: c,
406
- inputValue: a,
407
- widthMenu: s,
408
- maxHeightMenu: $ = "180px",
409
- menuIsOpen: u,
410
- onEnter: g,
406
+ inputValue: d,
407
+ widthMenu: a,
408
+ maxHeightMenu: b = "180px",
409
+ menuIsOpen: h,
410
+ onEnter: p,
411
411
  marginTop: m = "4px",
412
412
  iconName: f,
413
- iconColor: y,
414
- iconPosition: R,
415
- topOffset: j = 0,
416
- bottomOffset: E = 0,
417
- truncateText: C = !0,
418
- menuJustifyContent: L = "flex-start",
419
- tableActionButton: p,
420
- menuLateralPadding: W = "8px",
421
- menuOptionFlexDirection: S = "column",
422
- confirmSelection: N,
423
- menuAlign: O = "left"
424
- }, T) => {
413
+ iconColor: x,
414
+ iconPosition: M,
415
+ topOffset: W = 0,
416
+ bottomOffset: B = 0,
417
+ truncateText: y = !0,
418
+ menuJustifyContent: R = "flex-start",
419
+ tableActionButton: S,
420
+ menuLateralPadding: j = "8px",
421
+ menuOptionFlexDirection: I = "column",
422
+ confirmSelection: g,
423
+ menuAlign: P = "left"
424
+ }, A) => {
425
425
  Q(f) && (f += "Ant");
426
426
  const {
427
- highlightedIndex: h,
428
- setHighlightedIndex: b,
429
- isOptionSelected: M,
430
- optionsRef: H,
431
- parentWidth: k
427
+ highlightedIndex: T,
428
+ setHighlightedIndex: u,
429
+ isOptionSelected: v,
430
+ optionsRef: N,
431
+ parentWidth: L
432
432
  } = Le(
433
433
  o,
434
434
  c,
435
- j,
436
- E,
437
- O
435
+ W,
436
+ B,
437
+ P
438
438
  );
439
- Z(() => {
440
- const r = (B) => {
441
- if (u) {
442
- if (B.key === "ArrowDown")
443
- B.preventDefault(), b(
444
- (w) => w < t.length - 1 ? w + 1 : w
439
+ K(() => {
440
+ const r = (E) => {
441
+ if (h) {
442
+ if (E.key === "ArrowDown")
443
+ E.preventDefault(), u(
444
+ (k) => k < t.length - 1 ? k + 1 : k
445
445
  );
446
- else if (B.key === "ArrowUp")
447
- B.preventDefault(), b(
448
- (w) => w > 0 ? w - 1 : 0
446
+ else if (E.key === "ArrowUp")
447
+ E.preventDefault(), u(
448
+ (k) => k > 0 ? k - 1 : 0
449
449
  );
450
- else if (B.key === "Enter" && t[h]) {
451
- B.preventDefault();
452
- const w = t[h];
453
- i(w), g && g(w);
450
+ else if (E.key === "Enter" && t[T]) {
451
+ E.preventDefault();
452
+ const k = t[T];
453
+ l(k), p && p(k);
454
454
  }
455
455
  }
456
456
  };
457
457
  return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
458
458
  }, [
459
- u,
460
- t,
461
459
  h,
462
- g,
463
- i,
464
- N
460
+ t,
461
+ T,
462
+ p,
463
+ l,
464
+ g
465
465
  ]);
466
- const d = (r) => typeof r == "string" ? r : Ce.isValidElement(r) && typeof r.props.children == "string" ? r.props.children : String(r), x = (r, B) => {
467
- var v, F;
468
- if (R !== B) return null;
469
- const w = Q((v = r.tooltipProps) == null ? void 0 : v.label), P = r.iconName || f || "InfoFill0Sm", I = /* @__PURE__ */ n.jsx(
466
+ const w = (r) => typeof r == "string" ? r : Ce.isValidElement(r) && typeof r.props.children == "string" ? r.props.children : String(r), s = (r, E) => {
467
+ var H, $;
468
+ if (M !== E) return null;
469
+ const k = Q((H = r.tooltipProps) == null ? void 0 : H.label), z = r.iconName || f || "InfoFill0Sm", O = /* @__PURE__ */ n.jsx(
470
470
  Ee,
471
471
  {
472
- iconPosition: (F = r.tooltipProps) == null ? void 0 : F.position,
472
+ iconPosition: ($ = r.tooltipProps) == null ? void 0 : $.position,
473
473
  id: `iconContainer-${r.value}`,
474
474
  children: /* @__PURE__ */ n.jsx(
475
- J,
475
+ Y,
476
476
  {
477
- iconName: P,
478
- color: r.disabled ? e.colors.neutralColors.colorNeutralCleanest : M(r) ? e.colors.brandColors.colorBrandSoft : y ?? e.colors.neutralColors.colorNeutralDark
477
+ iconName: z,
478
+ color: r.disabled ? e.colors.neutralColors.colorNeutralCleanest : v(r) ? e.colors.brandColors.colorBrandSoft : x ?? e.colors.neutralColors.colorNeutralDark
479
479
  }
480
480
  )
481
481
  }
482
482
  );
483
- return w ? /* @__PURE__ */ n.jsx(se, { ...r == null ? void 0 : r.tooltipProps, isActive: !0, children: I }) : I;
483
+ return k ? /* @__PURE__ */ n.jsx(se, { ...r == null ? void 0 : r.tooltipProps, isActive: !0, children: O }) : O;
484
484
  };
485
485
  return /* @__PURE__ */ n.jsx(
486
486
  Ne,
487
487
  {
488
488
  marginTop: m,
489
- width: s ?? `${k}px`,
490
- maxHeight: $,
489
+ width: a ?? `${L}px`,
490
+ maxHeight: b,
491
491
  height: "fit-content",
492
492
  ref: (r) => {
493
- H.current = r, typeof T == "function" ? T(r) : T && (T.current = r);
493
+ N.current = r, typeof A == "function" ? A(r) : A && (A.current = r);
494
494
  },
495
495
  "data-testid": "MenuSelect",
496
496
  id: "MenuSelect",
497
- children: t.length === 0 ? /* @__PURE__ */ n.jsx(Ie, { size: l, children: "Sem opções" }) : t.map((r, B) => {
498
- var I, v;
499
- const w = typeof r.render == "function" ? r.render() : null, P = d(r.label);
497
+ children: t.length === 0 ? /* @__PURE__ */ n.jsx(Ie, { size: i, children: "Sem opções" }) : t.map((r, E) => {
498
+ var O, H;
499
+ const k = typeof r.render == "function" ? r.render() : null, z = w(r.label);
500
500
  if (r.isSection)
501
- return /* @__PURE__ */ n.jsx(Re, { size: l, children: P }, P);
501
+ return /* @__PURE__ */ n.jsx(Me, { size: i, children: z }, z);
502
502
  {
503
- const F = P.toLowerCase().indexOf((a == null ? void 0 : a.toLowerCase()) || "");
503
+ const $ = z.toLowerCase().indexOf((d == null ? void 0 : d.toLowerCase()) || "");
504
504
  return /* @__PURE__ */ n.jsxs(
505
505
  Fe,
506
506
  {
507
- isOptionSelected: M(r),
508
- highlightedIndex: B === h,
509
- onClick: (Y) => {
510
- Y.stopPropagation(), r.disabled || (N ? $e({
507
+ isOptionSelected: v(r),
508
+ highlightedIndex: E === T,
509
+ onClick: (X) => {
510
+ X.stopPropagation(), r.disabled || (g ? $e({
511
511
  id: "select-option",
512
- title: N.title,
513
- description: N.description,
514
- icon: N.icon,
515
- iconColor: N.iconColor,
512
+ title: g.title,
513
+ description: g.description,
514
+ icon: g.icon,
515
+ iconColor: g.iconColor,
516
516
  leftButtonProps: {
517
517
  name: "Cancelar",
518
518
  variant: "tertiary",
@@ -522,58 +522,58 @@ const po = ({
522
522
  rightButtonProps: {
523
523
  name: "Confirmar",
524
524
  variant: "secondary",
525
- onClick: () => i(r)
525
+ onClick: () => l(r)
526
526
  }
527
- }) : i(r));
527
+ }) : l(r));
528
528
  },
529
- onMouseEnter: () => b(B),
529
+ onMouseEnter: () => u(E),
530
530
  disabled: r.disabled,
531
- size: l,
532
- menuLateralPadding: W,
531
+ size: i,
532
+ menuLateralPadding: j,
533
533
  children: [
534
- x(r, "left"),
534
+ s(r, "left"),
535
535
  /* @__PURE__ */ n.jsxs(
536
536
  ve,
537
537
  {
538
- menuOptionFlexDirection: S,
539
- menuJustifyContent: L,
538
+ menuOptionFlexDirection: I,
539
+ menuJustifyContent: R,
540
540
  iconName: f,
541
- isOptionSelected: M(r),
542
- highlightedIndex: B === h,
541
+ isOptionSelected: v(r),
542
+ highlightedIndex: E === T,
543
543
  "data-testid": r.value,
544
- size: l,
544
+ size: i,
545
545
  hasDescription: !!r.description,
546
546
  optionValue: r.value,
547
547
  disabled: r.disabled,
548
- truncateText: C,
549
- tableActionButton: p,
548
+ truncateText: y,
549
+ tableActionButton: S,
550
550
  children: [
551
551
  /* @__PURE__ */ n.jsxs(
552
- He,
552
+ Re,
553
553
  {
554
- truncateText: !ie(r.label) && C,
554
+ truncateText: !ie(r.label) && y,
555
555
  children: [
556
- w,
556
+ k,
557
557
  ie(r.label) ? /* @__PURE__ */ n.jsx(
558
558
  "p",
559
559
  {
560
- title: ((I = r == null ? void 0 : r.tooltipProps) == null ? void 0 : I.label) ?? d(r.label),
560
+ title: ((O = r == null ? void 0 : r.tooltipProps) == null ? void 0 : O.label) ?? w(r.label),
561
561
  children: r.label
562
562
  }
563
563
  ) : /* @__PURE__ */ n.jsx(
564
564
  "p",
565
565
  {
566
- title: ((v = r == null ? void 0 : r.tooltipProps) == null ? void 0 : v.label) ?? P,
567
- children: a && F >= 0 ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
568
- P.substring(0, F),
569
- /* @__PURE__ */ n.jsx(Me, { size: l, children: P.substring(
570
- F,
571
- F + ((a == null ? void 0 : a.length) || 0)
566
+ title: ((H = r == null ? void 0 : r.tooltipProps) == null ? void 0 : H.label) ?? z,
567
+ children: d && $ >= 0 ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
568
+ z.substring(0, $),
569
+ /* @__PURE__ */ n.jsx(He, { size: i, children: z.substring(
570
+ $,
571
+ $ + ((d == null ? void 0 : d.length) || 0)
572
572
  ) }),
573
- P.substring(
574
- F + ((a == null ? void 0 : a.length) || 0)
573
+ z.substring(
574
+ $ + ((d == null ? void 0 : d.length) || 0)
575
575
  )
576
- ] }) : P
576
+ ] }) : z
577
577
  }
578
578
  )
579
579
  ]
@@ -583,7 +583,7 @@ const po = ({
583
583
  ]
584
584
  }
585
585
  ),
586
- x(r, "right")
586
+ s(r, "right")
587
587
  ]
588
588
  },
589
589
  String(r.value)
@@ -598,59 +598,59 @@ le.displayName = "MenuSelect";
598
598
  const Ae = ({
599
599
  title: o,
600
600
  iconName: t,
601
- onClickIcon: l,
602
- width: i,
601
+ onClickIcon: i,
602
+ width: l,
603
603
  height: c,
604
- flex: a,
605
- children: s,
606
- wrapperCustomStyles: $ = {},
607
- contentCustomStyles: u = {},
608
- titleCustomStyles: g = {}
604
+ flex: d,
605
+ children: a,
606
+ wrapperCustomStyles: b = {},
607
+ contentCustomStyles: h = {},
608
+ titleCustomStyles: p = {}
609
609
  }) => /* @__PURE__ */ n.jsxs(
610
- U,
610
+ G,
611
611
  {
612
- width: i,
612
+ width: l,
613
613
  height: c,
614
- flex: a,
614
+ flex: d,
615
615
  direction: "vertical",
616
616
  padding: e.spacings.spacingStack.spacingStackSm,
617
617
  customStyles: {
618
618
  backgroundColor: e.colors.backgroundColors.colorBackgroundSnow,
619
619
  border: `1px solid ${e.colors.neutralColors.colorNeutralSoft}`,
620
620
  borderRadius: "8px",
621
- ...$
621
+ ...b
622
622
  },
623
623
  children: [
624
624
  /* @__PURE__ */ n.jsxs(
625
- U,
625
+ G,
626
626
  {
627
627
  width: "100%",
628
628
  direction: "horizontal",
629
- customStyles: u,
629
+ customStyles: h,
630
630
  children: [
631
- o ? /* @__PURE__ */ n.jsx(U, { width: "fit-content", customStyles: g, children: /* @__PURE__ */ n.jsx(ae, { title: o, divider: !1 }) }) : null,
631
+ o ? /* @__PURE__ */ n.jsx(G, { width: "fit-content", customStyles: p, children: /* @__PURE__ */ n.jsx(ae, { title: o, divider: !1 }) }) : null,
632
632
  t ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
633
633
  /* @__PURE__ */ n.jsx(be, { size: "auto", direction: "horizontal" }),
634
634
  /* @__PURE__ */ n.jsx(
635
- J,
635
+ Y,
636
636
  {
637
637
  iconName: t,
638
- onClick: () => l == null ? void 0 : l(),
639
- color: Q(l) ? e.colors.neutralColors.colorNeutralDark : e.colors.neutralColors.colorNeutralCloudy,
640
- cursorPointer: Q(l)
638
+ onClick: () => i == null ? void 0 : i(),
639
+ color: Q(i) ? e.colors.neutralColors.colorNeutralDark : e.colors.neutralColors.colorNeutralCloudy,
640
+ cursorPointer: Q(i)
641
641
  }
642
642
  )
643
643
  ] }) : null
644
644
  ]
645
645
  }
646
646
  ),
647
- /* @__PURE__ */ n.jsx(U, { width: "100%", flex: "1", children: s })
647
+ /* @__PURE__ */ n.jsx(G, { width: "100%", flex: "1", children: a })
648
648
  ]
649
649
  }
650
650
  );
651
651
  Ae.displayName = "Section";
652
- const Te = z.div`
653
- ${X}
652
+ const Te = C.div`
653
+ ${U}
654
654
  display: flex;
655
655
  flex-direction: column;
656
656
  width: ${({ width: o }) => o};
@@ -658,22 +658,22 @@ const Te = z.div`
658
658
  &:hover {
659
659
  cursor: ${({ disabled: o, readonly: t }) => o || t ? "default" : "pointer"};
660
660
  }
661
- `, Pe = z.div`
661
+ `, Pe = C.div`
662
662
  width: 100%;
663
- ${({ variant: o }) => o === "default" ? A`
663
+ ${({ variant: o }) => o === "default" ? F`
664
664
  min-height: ${({ size: t }) => t === "Small" ? "3.2rem" : "4rem"};
665
665
  max-height: ${({ size: t }) => t === "Small" ? "3.2rem" : "4rem"};
666
- ` : A`
666
+ ` : F`
667
667
  min-height: ${({ size: t }) => t === "Small" ? "1rem" : "3.2rem"};
668
668
  max-height: ${({ size: t }) => t === "Small" ? "1rem" : "3.2rem"};
669
669
  `}
670
670
 
671
671
  display: flex;
672
672
  align-items: center;
673
- ${({ variant: o }) => o === "default" && A`
673
+ ${({ variant: o }) => o === "default" && F`
674
674
  border: ${e.borders.borderWidth.borderWidthThinner} solid;
675
675
  border-radius: ${e.borders.borderRadius.borderRadiusSm};
676
- border-color: ${({ isOpen: t, hasError: l, readonly: i, disabled: c }) => l ? e.colors.feedbackColors.colorFeedbackError : i || c ? e.colors.neutralColors.colorNeutralClean : t ? e.colors.neutralColors.colorNeutralCloudy : e.colors.neutralColors.colorNeutralClean};
676
+ border-color: ${({ isOpen: t, hasError: i, readonly: l, disabled: c }) => i ? e.colors.feedbackColors.colorFeedbackError : l || c ? e.colors.neutralColors.colorNeutralClean : t ? e.colors.neutralColors.colorNeutralCloudy : e.colors.neutralColors.colorNeutralClean};
677
677
  `}
678
678
 
679
679
  background-color: ${({ variant: o }) => o === "default" ? e.colors.backgroundColors.colorBackgroundSnow : "transparent"};
@@ -683,28 +683,28 @@ const Te = z.div`
683
683
  if (t === "default")
684
684
  return o !== "Small" ? `0 ${e.spacings.spacingInline.spacingInlineSm}` : `0 ${e.spacings.spacingInline.spacingInlineAnt}`;
685
685
  }};
686
- ${({ size: o, variant: t }) => o === "Small" ? t === "default" ? A`
686
+ ${({ size: o, variant: t }) => o === "Small" ? t === "default" ? F`
687
687
  font-size: ${e.fonts.fontSize.fontSizeBodyMd};
688
688
  line-height: ${e.fonts.lineHeight.lineHeightSm(
689
689
  e.fonts.fontSize.fontSizeBodyMd
690
690
  )};
691
- ` : A`
691
+ ` : F`
692
692
  font-size: ${e.fonts.fontSize.fontSizeBodySm};
693
693
  line-height: ${e.fonts.lineHeight.lineHeightSm(
694
694
  e.fonts.fontSize.fontSizeBodySm
695
695
  )};
696
- ` : t === "default" ? A`
696
+ ` : t === "default" ? F`
697
697
  font-size: ${e.fonts.fontSize.fontSizeBodyLg};
698
698
  line-height: ${e.fonts.lineHeight.lineHeightMd(
699
699
  e.fonts.fontSize.fontSizeBodyLg
700
700
  )};
701
- ` : A`
701
+ ` : F`
702
702
  font-size: ${e.fonts.fontSize.fontSizeBodyMd};
703
703
  line-height: ${e.fonts.lineHeight.lineHeightSm(
704
704
  e.fonts.fontSize.fontSizeBodyMd
705
705
  )};
706
706
  `};
707
- ${({ disabled: o, readonly: t }) => (o || t) && A`
707
+ ${({ disabled: o, readonly: t }) => (o || t) && F`
708
708
  background-color: ${e.colors.brandColors.colorBrandSeSoft};
709
709
  border-style: solid;
710
710
  `};
@@ -718,7 +718,7 @@ const Te = z.div`
718
718
  fill: ${({ disabled: o, readonly: t }) => o || t ? e.colors.neutralColors.colorNeutralCloudy : e.colors.neutralColors.colorNeutralCloudy};
719
719
  }
720
720
  }
721
- `, Oe = z.div`
721
+ `, Oe = C.div`
722
722
  align-items: center;
723
723
  display: flex;
724
724
  flex: 1 1 0%;
@@ -727,7 +727,7 @@ const Te = z.div`
727
727
  overflow: hidden;
728
728
  min-height: 1em;
729
729
  box-sizing: border-box;
730
- `, De = z.span`
730
+ `, De = C.span`
731
731
  display: flex;
732
732
  flex-wrap: wrap;
733
733
  width: fit-content;
@@ -744,7 +744,7 @@ const Te = z.div`
744
744
  overflow: hidden;
745
745
  width: fit-content;
746
746
  }
747
- `, Xe = z.span`
747
+ `, Xe = C.span`
748
748
  color: ${e.colors.neutralColors.colorNeutralCleanest};
749
749
  font-size: ${({ size: o, variant: t }) => t === "default" ? o === "Small" ? e.fonts.fontSize.fontSizeBodyMd : e.fonts.fontSize.fontSizeBodyLg : o === "Small" ? e.fonts.fontSize.fontSizeBodySm : e.fonts.fontSize.fontSizeBodyMd};
750
750
  font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
@@ -753,7 +753,7 @@ const Te = z.div`
753
753
  white-space: nowrap;
754
754
  overflow: hidden;
755
755
  width: fit-content;
756
- `, _e = z.input`
756
+ `, _e = C.input`
757
757
  flex: 1;
758
758
  min-width: 0.1rem;
759
759
  border: none;
@@ -767,14 +767,14 @@ const Te = z.div`
767
767
  outline: none;
768
768
  cursor: ${({ disabled: o, readOnly: t }) => o || t ? "default" : "pointer"};
769
769
  }
770
- `, Ue = z.div`
770
+ `, Ue = C.div`
771
771
  width: 100%;
772
772
  display: flex;
773
773
  flex-direction: row;
774
774
  gap: 4px;
775
775
  justify-content: flex-start;
776
776
  margin-bottom: ${e.spacings.spacingStack.spacingStackNano};
777
- `, Ge = z.label`
777
+ `, Ge = C.label`
778
778
  font-size: ${e.fonts.fontSize.fontSizeBodyMd};
779
779
  font-weight: ${e.fonts.fontWeight.fontWeightRegular};
780
780
  font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
@@ -783,7 +783,7 @@ const Te = z.div`
783
783
  )};
784
784
  color: ${e.colors.neutralColors.colorNeutralCloudy};
785
785
  margin-bottom: ${e.spacings.spacingStack.spacingStackNano};
786
- `, qe = z.label`
786
+ `, qe = C.label`
787
787
  font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
788
788
  font-size: ${e.fonts.fontSize.fontSizeBodyMd};
789
789
  font-weight: ${e.fonts.fontWeight.fontWeightRegular};
@@ -792,7 +792,7 @@ const Te = z.div`
792
792
  )};
793
793
  color: ${e.colors.feedbackColors.colorFeedbackError};
794
794
  `;
795
- z.p`
795
+ C.p`
796
796
  display: inline-block;
797
797
  font-size: ${({ size: o }) => o === "Small" ? e.fonts.fontSize.fontSizeBodySm : e.fonts.fontSize.fontSizeBodyMd};
798
798
  font-weight: ${e.fonts.fontWeight.fontWeightRegular};
@@ -800,193 +800,193 @@ z.p`
800
800
  margin-top: ${e.spacings.spacingInline.spacingInlineNano};
801
801
  width: 100%;
802
802
  `;
803
- const Je = z.p`
803
+ const Je = C.p`
804
804
  display: inline-block;
805
805
  font-size: ${({ size: o }) => o === "Small" ? e.fonts.fontSize.fontSizeBodySm : e.fonts.fontSize.fontSizeBodyMd};
806
806
  font-weight: ${e.fonts.fontWeight.fontWeightRegular};
807
807
  color: ${e.colors.neutralColors.colorNeutralDark};
808
808
  margin-top: ${e.spacings.spacingInline.spacingInlineNano};
809
809
  width: 100%;
810
- `, Ye = (o, { value: t, options: l }) => {
811
- const [i, c] = D(!1), [a, s] = D(!1), [$, u] = D(""), [g, m] = D(l), f = q(null), y = q(null), R = q(null), j = q(null);
812
- Z(() => {
813
- const p = () => {
814
- s(!1);
810
+ `, Ye = (o, { value: t, options: i }) => {
811
+ const [l, c] = D(!1), [d, a] = D(!1), [b, h] = D(""), [p, m] = D(i), f = J(null), x = J(null), M = J(null), W = J(null);
812
+ K(() => {
813
+ const S = () => {
814
+ a(!1);
815
815
  };
816
- return window.addEventListener("scroll", p, { passive: !0 }), window.addEventListener("resize", p, { passive: !0 }), () => {
817
- window.removeEventListener("scroll", p), window.removeEventListener("resize", p);
816
+ return window.addEventListener("scroll", S, { passive: !0 }), window.addEventListener("resize", S, { passive: !0 }), () => {
817
+ window.removeEventListener("scroll", S), window.removeEventListener("resize", S);
818
818
  };
819
819
  }, []);
820
- function E(p) {
821
- u(""), s(!1), c(!0), R != null && R.current && R.current.focus(), p !== t && o(p);
820
+ function B(S) {
821
+ h(""), a(!1), c(!0), M != null && M.current && M.current.focus(), S !== t && o(S);
822
822
  }
823
- const C = (p) => {
824
- if (p) {
825
- const W = new RegExp(p, "i"), S = l.filter(
826
- (N) => W.exec(N.label)
823
+ const y = (S) => {
824
+ if (S) {
825
+ const j = new RegExp(S, "i"), I = i.filter(
826
+ (g) => j.exec(g.label)
827
827
  );
828
- m(S);
828
+ m(I);
829
829
  } else
830
- m(l);
830
+ m(i);
831
831
  };
832
- function L(p) {
833
- return !p;
832
+ function R(S) {
833
+ return !S;
834
834
  }
835
835
  return {
836
- isOpen: i,
836
+ isOpen: l,
837
837
  setIsOpen: c,
838
- expanded: a,
839
- setExpanded: s,
840
- inputValue: $,
841
- setInputValue: u,
842
- optionsSelect: g,
838
+ expanded: d,
839
+ setExpanded: a,
840
+ inputValue: b,
841
+ setInputValue: h,
842
+ optionsSelect: p,
843
843
  setOptionSelect: m,
844
844
  selectContainerRef: f,
845
- containerRef: y,
846
- inputContainerRef: R,
847
- optionsRef: j,
848
- selectOption: E,
849
- handlerFilterOptions: C,
850
- isValue: L
845
+ containerRef: x,
846
+ inputContainerRef: M,
847
+ optionsRef: W,
848
+ selectOption: B,
849
+ handlerFilterOptions: y,
850
+ isValue: R
851
851
  };
852
852
  }, fe = ce(
853
853
  ({
854
854
  value: o,
855
855
  handleOption: t,
856
- options: l,
857
- filter: i = !0,
856
+ options: i,
857
+ filter: l = !0,
858
858
  placeholder: c,
859
- label: a,
860
- size: s = "Medium",
861
- width: $ = "100%",
862
- disabled: u,
863
- helpText: g,
859
+ label: d,
860
+ size: a = "Medium",
861
+ width: b = "100%",
862
+ disabled: h,
863
+ helpText: p,
864
864
  readonly: m,
865
865
  errorMessage: f,
866
- tooltipProps: y = {},
867
- onBlur: R,
868
- onEnter: j,
869
- variant: E = "default",
870
- infoProps: C = {},
871
- maxHeightMenu: L,
872
- isRequired: p = !1,
873
- onRemoveSelected: W
874
- }, S) => {
866
+ tooltipProps: x = {},
867
+ onBlur: M,
868
+ onEnter: W,
869
+ variant: B = "default",
870
+ infoProps: y = {},
871
+ maxHeightMenu: R,
872
+ isRequired: S = !1,
873
+ onRemoveSelected: j
874
+ }, I) => {
875
875
  const {
876
- isOpen: N,
877
- setIsOpen: O,
878
- expanded: T,
879
- setExpanded: h,
880
- inputValue: b,
881
- setInputValue: M,
882
- optionsSelect: H,
883
- selectContainerRef: k,
884
- containerRef: d,
885
- inputContainerRef: x,
876
+ isOpen: g,
877
+ setIsOpen: P,
878
+ expanded: A,
879
+ setExpanded: T,
880
+ inputValue: u,
881
+ setInputValue: v,
882
+ optionsSelect: N,
883
+ selectContainerRef: L,
884
+ containerRef: w,
885
+ inputContainerRef: s,
886
886
  selectOption: r,
887
- setOptionSelect: B,
888
- handlerFilterOptions: w,
889
- isValue: P
890
- } = Ye(t, { value: o, options: l }), I = !!f, v = {
887
+ setOptionSelect: E,
888
+ handlerFilterOptions: k,
889
+ isValue: z
890
+ } = Ye(t, { value: o, options: i }), O = !!f, H = {
891
891
  label: f,
892
- ...y,
892
+ ...x,
893
893
  wrapperWidth: "auto",
894
- isActive: I,
894
+ isActive: O,
895
895
  isErrorTooltip: !0
896
- }, F = {
897
- ...C,
898
- size: s
899
- }, Y = /* @__PURE__ */ n.jsx(
900
- J,
896
+ }, $ = {
897
+ ...y,
898
+ size: a
899
+ }, X = /* @__PURE__ */ n.jsx(
900
+ Y,
901
901
  {
902
- iconName: `Close${s === "Small" ? "Sm" : "Ant"}`,
902
+ iconName: `Close${a === "Small" ? "Sm" : "Ant"}`,
903
903
  onClick: (_) => {
904
- _.stopPropagation(), W(o);
904
+ _.stopPropagation(), j(o);
905
905
  }
906
906
  }
907
- ), V = /* @__PURE__ */ n.jsx(J, { iconName: `ExpandLess${s === "Small" ? "Sm" : "Ant"}` }), oe = /* @__PURE__ */ n.jsx(J, { iconName: `ExpandMore${s === "Small" ? "Sm" : "Ant"}` });
907
+ ), V = /* @__PURE__ */ n.jsx(Y, { iconName: `ExpandLess${a === "Small" ? "Sm" : "Ant"}` }), Z = /* @__PURE__ */ n.jsx(Y, { iconName: `ExpandMore${a === "Small" ? "Sm" : "Ant"}` });
908
908
  return /* @__PURE__ */ n.jsxs(
909
909
  Te,
910
910
  {
911
- ref: k,
912
- width: $,
913
- size: s,
914
- disabled: u,
911
+ ref: L,
912
+ width: b,
913
+ size: a,
914
+ disabled: h,
915
915
  readonly: m,
916
916
  children: [
917
- a && /* @__PURE__ */ n.jsxs(Ue, { children: [
918
- /* @__PURE__ */ n.jsxs(Ge, { "data-testid": "label", ref: S, children: [
919
- a,
920
- p && !u ? /* @__PURE__ */ n.jsx(qe, { children: " *" }) : null
917
+ d && /* @__PURE__ */ n.jsxs(Ue, { children: [
918
+ /* @__PURE__ */ n.jsxs(Ge, { "data-testid": "label", ref: I, children: [
919
+ d,
920
+ S && !h ? /* @__PURE__ */ n.jsx(qe, { children: " *" }) : null
921
921
  ] }),
922
- ((F == null ? void 0 : F.message) || (F == null ? void 0 : F.render)) && /* @__PURE__ */ n.jsx(xe, { ...F })
922
+ (($ == null ? void 0 : $.message) || ($ == null ? void 0 : $.render)) && /* @__PURE__ */ n.jsx(xe, { ...$ })
923
923
  ] }),
924
- /* @__PURE__ */ n.jsx(se, { ...v, children: /* @__PURE__ */ n.jsxs(
924
+ /* @__PURE__ */ n.jsx(se, { ...H, children: /* @__PURE__ */ n.jsxs(
925
925
  Pe,
926
926
  {
927
- hasError: I,
927
+ hasError: O,
928
928
  readonly: m,
929
- ref: d,
929
+ ref: w,
930
930
  onBlur: () => {
931
931
  setTimeout(() => {
932
- (N || T) && x.current !== document.activeElement && (R && R(o), O(!1), h(!1));
932
+ (g || A) && s.current !== document.activeElement && (M && M(o), P(!1), T(!1));
933
933
  }, 250);
934
934
  },
935
935
  onClick: () => {
936
- !u && !m && (N && !T ? (h(!0), x != null && x.current && x.current.focus()) : !N && !T ? (O(!0), h(!0), x != null && x.current && x.current.focus()) : (O(!1), h(!1), x != null && x.current && x.current.blur()), !b && B(l));
936
+ !h && !m && (g && !A ? (T(!0), s != null && s.current && s.current.focus()) : !g && !A ? (P(!0), T(!0), s != null && s.current && s.current.focus()) : (P(!1), T(!1), s != null && s.current && s.current.blur()), !u && E(i));
937
937
  },
938
938
  tabIndex: 0,
939
- width: $,
940
- size: s,
941
- isOpen: N || T,
939
+ width: b,
940
+ size: a,
941
+ isOpen: g || A,
942
942
  "data-testid": "select",
943
- disabled: u,
944
- helpText: g,
945
- variant: E,
943
+ disabled: h,
944
+ helpText: p,
945
+ variant: B,
946
946
  children: [
947
947
  /* @__PURE__ */ n.jsxs(Oe, { children: [
948
- /* @__PURE__ */ n.jsxs(De, { size: s, variant: E, children: [
949
- c && P(o) && !b && !N ? /* @__PURE__ */ n.jsx(Xe, { size: s, variant: E, children: c }) : null,
948
+ /* @__PURE__ */ n.jsxs(De, { size: a, variant: B, children: [
949
+ c && z(o) && !u && !g ? /* @__PURE__ */ n.jsx(Xe, { size: a, variant: B, children: c }) : null,
950
950
  (o == null ? void 0 : o.label) && /* @__PURE__ */ n.jsx("p", { title: (o == null ? void 0 : o.hint) ?? (o == null ? void 0 : o.label), children: o == null ? void 0 : o.label })
951
951
  ] }),
952
- i && /* @__PURE__ */ n.jsx(
952
+ l && /* @__PURE__ */ n.jsx(
953
953
  _e,
954
954
  {
955
- ref: x,
956
- value: b,
955
+ ref: s,
956
+ value: u,
957
957
  onChange: (_) => {
958
- M(_.target.value), _.target.value.length > 0 && (O(!0), h(!0)), w(_.target.value);
958
+ v(_.target.value), _.target.value.length > 0 && (P(!0), T(!0)), k(_.target.value);
959
959
  },
960
960
  readOnly: m,
961
- width: b.length,
962
- size: s,
963
- disabled: u,
964
- variant: E
961
+ width: u.length,
962
+ size: a,
963
+ disabled: h,
964
+ variant: B
965
965
  }
966
966
  )
967
967
  ] }),
968
- W && o ? Y : null,
969
- T ? V : oe,
970
- T && /* @__PURE__ */ n.jsx(
968
+ j && o ? X : null,
969
+ A ? V : Z,
970
+ A && /* @__PURE__ */ n.jsx(
971
971
  le,
972
972
  {
973
973
  onEnter: (_) => {
974
- t && t(_), O(!1), h(!1), j && j(_);
974
+ t && t(_), P(!1), T(!1), W && W(_);
975
975
  },
976
- menuIsOpen: N,
977
- selectContainerRef: k,
976
+ menuIsOpen: g,
977
+ selectContainerRef: L,
978
978
  value: o,
979
- optionsSelect: H,
979
+ optionsSelect: N,
980
980
  selectOption: r,
981
- size: s,
982
- inputValue: b,
983
- maxHeightMenu: L
981
+ size: a,
982
+ inputValue: u,
983
+ maxHeightMenu: R
984
984
  }
985
985
  )
986
986
  ]
987
987
  }
988
988
  ) }),
989
- g && /* @__PURE__ */ n.jsx(Je, { size: s, children: g })
989
+ p && /* @__PURE__ */ n.jsx(Je, { size: a, children: p })
990
990
  ]
991
991
  }
992
992
  );
@@ -1000,7 +1000,7 @@ const ue = we`
1000
1000
  to {
1001
1001
  transform: rotate(360deg);
1002
1002
  }
1003
- `, Qe = z.button`
1003
+ `, Qe = C.button`
1004
1004
  display: flex;
1005
1005
  justify-content: space-between;
1006
1006
  align-items: center;
@@ -1008,7 +1008,7 @@ const ue = we`
1008
1008
  padding: ${({ size: o }) => o === "Small" ? `0 ${e.spacings.spacingInline.spacingInlineAnt}` : `0 ${e.spacings.spacingInline.spacingInlineSm}`};
1009
1009
  ${({ variant: o }) => {
1010
1010
  if (o === "primary")
1011
- return A`
1011
+ return F`
1012
1012
  background-color: ${e.colors.brandColors.colorBrandPrimary};
1013
1013
  color: ${e.colors.backgroundColors.colorBackgroundSnow};
1014
1014
  transition: filter 0.2s;
@@ -1019,7 +1019,7 @@ const ue = we`
1019
1019
  }
1020
1020
  `;
1021
1021
  if (o === "secondary")
1022
- return A`
1022
+ return F`
1023
1023
  background-color: rgba(
1024
1024
  ${ze(e.colors.neutralColors.colorNeutralSoft)},
1025
1025
  ${e.opacityLevels.light}
@@ -1034,7 +1034,7 @@ const ue = we`
1034
1034
  }
1035
1035
  `;
1036
1036
  if (o === "tertiary")
1037
- return A`
1037
+ return F`
1038
1038
  background-color: transparent;
1039
1039
  color: ${e.colors.neutralColors.colorNeutralDark};
1040
1040
  border: ${e.borders.borderWidth.borderWidthNone};
@@ -1046,7 +1046,7 @@ const ue = we`
1046
1046
  }
1047
1047
  `;
1048
1048
  }};
1049
- ${({ disabled: o }) => o && A`
1049
+ ${({ disabled: o }) => o && F`
1050
1050
  background-color: ${e.colors.backgroundColors.colorBackgroundGrass};
1051
1051
  color: ${e.colors.neutralColors.colorNeutralCloudy};
1052
1052
  transition: filter 0.2s;
@@ -1075,7 +1075,7 @@ const ue = we`
1075
1075
  min-width: ${({ size: o }) => o === "Small" ? e.icons.iconSizeSm : e.icons.iconSizeAnt};
1076
1076
  height: ${({ size: o }) => o === "Small" ? e.icons.iconSizeSm : e.icons.iconSizeAnt};
1077
1077
 
1078
- ${({ isLoading: o }) => o && A`
1078
+ ${({ isLoading: o }) => o && F`
1079
1079
  animation: ${ue} 2s linear infinite;
1080
1080
  `}
1081
1081
 
@@ -1083,7 +1083,7 @@ const ue = we`
1083
1083
  fill: ${({ variant: o, disabled: t }) => t ? e.colors.neutralColors.colorNeutralCloudy : o === "primary" ? e.colors.backgroundColors.colorBackgroundSnow : e.colors.neutralColors.colorNeutralDark};
1084
1084
  }
1085
1085
  }
1086
- `, Ve = z.div`
1086
+ `, Ve = C.div`
1087
1087
  display: flex;
1088
1088
  flex-direction: column;
1089
1089
  width: ${({ width: o }) => o};
@@ -1091,7 +1091,7 @@ const ue = we`
1091
1091
  &:hover {
1092
1092
  cursor: ${({ disabled: o }) => o && "not-allowed"};
1093
1093
  }
1094
- `, Ze = z.label`
1094
+ `, Ze = C.label`
1095
1095
  font-size: ${e.fonts.fontSize.fontSizeBodyMd};
1096
1096
  font-weight: ${e.fonts.fontWeight.fontWeightRegular};
1097
1097
  font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
@@ -1101,7 +1101,7 @@ const ue = we`
1101
1101
  color: ${({ hasError: o }) => o ? `${e.colors.feedbackColors.colorFeedbackError}` : `${e.colors.neutralColors.colorNeutralCloudy}`};
1102
1102
  margin-bottom: ${e.spacings.spacingStack.spacingStackNano};
1103
1103
  `;
1104
- z.p`
1104
+ C.p`
1105
1105
  display: inline-block;
1106
1106
  font-size: ${e.fonts.fontSize.fontSizeBodyMd};
1107
1107
  font-weight: ${e.fonts.fontWeight.fontWeightRegular};
@@ -1109,7 +1109,7 @@ z.p`
1109
1109
  margin-top: ${e.spacings.spacingInline.spacingInlineNano};
1110
1110
  width: 100%;
1111
1111
  `;
1112
- const Ke = z.div`
1112
+ const Ke = C.div`
1113
1113
  width: 100%;
1114
1114
 
1115
1115
  & > svg {
@@ -1127,96 +1127,96 @@ const Ke = z.div`
1127
1127
  cursor: not-allowed;
1128
1128
  }
1129
1129
  `, eo = (o) => {
1130
- const [t, l] = D(!1), [i, c] = D(o), a = q(null);
1131
- return Z(() => {
1130
+ const [t, i] = D(!1), [l, c] = D(o), d = J(null);
1131
+ return K(() => {
1132
1132
  c(o);
1133
1133
  }, [o]), {
1134
- setIsOpen: l,
1134
+ setIsOpen: i,
1135
1135
  isOpen: t,
1136
1136
  setOptionsSelect: c,
1137
- optionsSelect: i,
1138
- selectContainerRef: a
1137
+ optionsSelect: l,
1138
+ selectContainerRef: d
1139
1139
  };
1140
1140
  }, oo = 200, mo = ({
1141
1141
  name: o,
1142
1142
  variant: t = "primary",
1143
- width: l = "100%",
1144
- size: i = "Medium",
1143
+ width: i = "100%",
1144
+ size: l = "Medium",
1145
1145
  disabled: c = !1,
1146
- isLoading: a = !1,
1147
- onClick: s,
1148
- options: $,
1149
- label: u,
1150
- menuSelectProps: g = {},
1146
+ isLoading: d = !1,
1147
+ onClick: a,
1148
+ options: b,
1149
+ label: h,
1150
+ menuSelectProps: p = {},
1151
1151
  iconName: m,
1152
1152
  optionsIconPosition: f
1153
1153
  }) => {
1154
- const { isOpen: y, setIsOpen: R, selectContainerRef: j, optionsSelect: E } = eo($);
1155
- let C = e.colors.backgroundColors.colorBackgroundSnow;
1156
- c ? C = e.colors.neutralColors.colorNeutralCloudy : t !== "primary" && (C = e.colors.neutralColors.colorNeutralDark);
1157
- const L = {
1158
- ...g
1154
+ const { isOpen: x, setIsOpen: M, selectContainerRef: W, optionsSelect: B } = eo(b);
1155
+ let y = e.colors.backgroundColors.colorBackgroundSnow;
1156
+ c ? y = e.colors.neutralColors.colorNeutralCloudy : t !== "primary" && (y = e.colors.neutralColors.colorNeutralDark);
1157
+ const R = {
1158
+ ...p
1159
1159
  };
1160
1160
  return /* @__PURE__ */ n.jsxs(
1161
1161
  Ve,
1162
1162
  {
1163
- ref: j,
1164
- width: l,
1165
- size: i,
1163
+ ref: W,
1164
+ width: i,
1165
+ size: l,
1166
1166
  disabled: c,
1167
- onBlur: () => setTimeout(() => R(!1), oo),
1167
+ onBlur: () => setTimeout(() => M(!1), oo),
1168
1168
  children: [
1169
- u && /* @__PURE__ */ n.jsx(Ze, { children: u }),
1169
+ h && /* @__PURE__ */ n.jsx(Ze, { children: h }),
1170
1170
  /* @__PURE__ */ n.jsxs(
1171
1171
  Qe,
1172
1172
  {
1173
1173
  type: "button",
1174
- size: i,
1174
+ size: l,
1175
1175
  disabled: c,
1176
1176
  variant: t,
1177
- isLoading: a,
1178
- onClick: () => !a && R(!y),
1177
+ isLoading: d,
1178
+ onClick: () => !d && M(!x),
1179
1179
  id: `button-component-${o}`,
1180
1180
  children: [
1181
- a && /* @__PURE__ */ n.jsx(Ke, { size: i, disabled: c, variant: t, children: /* @__PURE__ */ n.jsx(
1182
- J,
1181
+ d && /* @__PURE__ */ n.jsx(Ke, { size: l, disabled: c, variant: t, children: /* @__PURE__ */ n.jsx(
1182
+ Y,
1183
1183
  {
1184
- iconName: `ProgressActivity${i === "Small" ? "Ant" : "Sm"}`,
1185
- color: C,
1184
+ iconName: `ProgressActivity${l === "Small" ? "Ant" : "Sm"}`,
1185
+ color: y,
1186
1186
  "data-testid": "icon-loading"
1187
1187
  }
1188
1188
  ) }),
1189
- !a && /* @__PURE__ */ n.jsx("p", { title: o, children: o }),
1190
- !a && (y ? /* @__PURE__ */ n.jsx(
1191
- J,
1189
+ !d && /* @__PURE__ */ n.jsx("p", { title: o, children: o }),
1190
+ !d && (x ? /* @__PURE__ */ n.jsx(
1191
+ Y,
1192
1192
  {
1193
- iconName: `ExpandLess${i === "Small" ? "Ant" : "Sm"}`,
1194
- color: C,
1193
+ iconName: `ExpandLess${l === "Small" ? "Ant" : "Sm"}`,
1194
+ color: y,
1195
1195
  "data-testid": "icon-button-less"
1196
1196
  }
1197
1197
  ) : /* @__PURE__ */ n.jsx(
1198
- J,
1198
+ Y,
1199
1199
  {
1200
- iconName: `ExpandMore${i === "Small" ? "Ant" : "Sm"}`,
1201
- color: C,
1200
+ iconName: `ExpandMore${l === "Small" ? "Ant" : "Sm"}`,
1201
+ color: y,
1202
1202
  "data-testid": "icon-button-more"
1203
1203
  }
1204
1204
  ))
1205
1205
  ]
1206
1206
  }
1207
1207
  ),
1208
- y && /* @__PURE__ */ n.jsx(
1208
+ x && /* @__PURE__ */ n.jsx(
1209
1209
  le,
1210
1210
  {
1211
- selectContainerRef: j,
1211
+ selectContainerRef: W,
1212
1212
  value: null,
1213
- optionsSelect: E,
1214
- selectOption: s,
1215
- size: i,
1213
+ optionsSelect: B,
1214
+ selectOption: a,
1215
+ size: l,
1216
1216
  inputValue: null,
1217
1217
  iconPosition: f,
1218
1218
  iconName: m,
1219
- ...L
1219
+ ...R
1220
1220
  }
1221
1221
  )
1222
1222
  ]
@@ -1225,29 +1225,29 @@ const Ke = z.div`
1225
1225
  }, So = ({
1226
1226
  title: o,
1227
1227
  children: t,
1228
- endAdornment: l = null,
1229
- marginBottom: i = "16px",
1228
+ endAdornment: i = null,
1229
+ marginBottom: l = "16px",
1230
1230
  customStyles: c = {}
1231
1231
  }) => {
1232
- const [a, s] = D(!1);
1233
- return /* @__PURE__ */ n.jsxs(U, { width: "100%", flex: "1", gap: "8px", children: [
1232
+ const [d, a] = D(!1);
1233
+ return /* @__PURE__ */ n.jsxs(G, { width: "100%", flex: "1", gap: "8px", children: [
1234
1234
  /* @__PURE__ */ n.jsx(
1235
1235
  ae,
1236
1236
  {
1237
1237
  title: o,
1238
1238
  divider: !0,
1239
- marginBottom: i,
1239
+ marginBottom: l,
1240
1240
  collapse: {
1241
- collapsed: a,
1242
- setCollapsed: s
1241
+ collapsed: d,
1242
+ setCollapsed: a
1243
1243
  },
1244
- endAdornment: l,
1244
+ endAdornment: i,
1245
1245
  customStyles: c
1246
1246
  }
1247
1247
  ),
1248
- a ? null : t
1248
+ d ? null : t
1249
1249
  ] });
1250
- }, he = A`
1250
+ }, he = F`
1251
1251
  svg:not([color]):not([data-testid='icon']) {
1252
1252
  path {
1253
1253
  fill: ${e.colors.neutralColors.colorNeutralDarkest};
@@ -1259,14 +1259,14 @@ const Ke = z.div`
1259
1259
  fill: ${e.colors.neutralColors.colorNeutralDarkest};
1260
1260
  }
1261
1261
  }
1262
- `, to = z.div`
1262
+ `, to = C.div`
1263
1263
  width: 100%;
1264
1264
  max-height: ${({ maxHeight: o }) => o};
1265
1265
  overflow: auto;
1266
1266
  position: relative;
1267
1267
  border: ${e.borders.borderWidth.borderWidthThinner} solid
1268
1268
  ${e.colors.neutralColors.colorNeutralSoft};
1269
- border-radius: ${({ withBorderRadius: o }) => o ? e.borders.borderRadius.borderExtraSmall : "none"};
1269
+ border-radius: ${({ withBorderRadius: o, borderRadius: t }) => t || (o ? e.borders.borderRadius.borderExtraSmall : "none")};
1270
1270
 
1271
1271
  ::-webkit-scrollbar {
1272
1272
  width: 6px;
@@ -1281,12 +1281,12 @@ const Ke = z.div`
1281
1281
  background: ${e.colors.neutralColors.colorNeutralClean};
1282
1282
  border-radius: ${e.borders.borderRadius.borderRadiusPill};
1283
1283
  }
1284
- `, no = z.table`
1284
+ `, no = C.table`
1285
1285
  border-collapse: separate;
1286
1286
  border-spacing: 0;
1287
1287
  width: 100%;
1288
- `, ro = `${e.borders.borderRadius.borderExtraSmall} ${e.borders.borderRadius.borderExtraSmall} 0 0`, lo = `0 0 ${e.borders.borderRadius.borderExtraSmall} ${e.borders.borderRadius.borderExtraSmall}`, K = z.tr`
1289
- ${({ isHeader: o, size: t }) => o && A`
1288
+ `, ro = `${e.borders.borderRadius.borderExtraSmall} ${e.borders.borderRadius.borderExtraSmall} 0 0`, lo = `0 0 ${e.borders.borderRadius.borderExtraSmall} ${e.borders.borderRadius.borderExtraSmall}`, ee = C.tr`
1289
+ ${({ isHeader: o, size: t }) => o && F`
1290
1290
  position: sticky;
1291
1291
  background-color: ${e.colors.backgroundColors.colorBackgroundSnow};
1292
1292
 
@@ -1304,15 +1304,15 @@ const Ke = z.div`
1304
1304
  height: ${({ fit: o, size: t }) => o ? "fit-content" : t === "Large" ? "4rem" : "3.2rem"};
1305
1305
  min-height: ${({ size: o }) => o === "Large" ? "4rem" : "3.2rem"};
1306
1306
 
1307
- ${({ isHeader: o, isSelected: t, striped: l }) => !o && A`
1308
- background-color: ${t ? e.colors.neutralColors.colorNeutralClean : l ? "#F5F9FE" : e.colors.backgroundColors.colorBackgroundSnow};
1307
+ ${({ isHeader: o, isSelected: t, striped: i }) => !o && F`
1308
+ background-color: ${t ? e.colors.neutralColors.colorNeutralClean : i ? "#F5F9FE" : e.colors.backgroundColors.colorBackgroundSnow};
1309
1309
  `}
1310
1310
 
1311
- border-radius: ${({ isFirst: o, isLast: t, isHeader: l }) => {
1312
- if (o && !l)
1313
- return ro;
1311
+ border-radius: ${({ isFirst: o, isLast: t, isHeader: i, borderRadius: l }) => {
1312
+ if (o && !i)
1313
+ return l ? `${l} ${l} 0 0` : ro;
1314
1314
  if (t)
1315
- return lo;
1315
+ return l ? `0 0 ${l} ${l}` : lo;
1316
1316
  }};
1317
1317
  transition: background-color 0.2s 0s;
1318
1318
 
@@ -1324,7 +1324,7 @@ const Ke = z.div`
1324
1324
  border-bottom: none !important;
1325
1325
  }
1326
1326
 
1327
- ${({ isHeader: o }) => !o && A`
1327
+ ${({ isHeader: o }) => !o && F`
1328
1328
  &:hover {
1329
1329
  background-color: ${e.colors.backgroundColors.colorBackgroundCarpet};
1330
1330
 
@@ -1336,10 +1336,10 @@ const Ke = z.div`
1336
1336
  `}
1337
1337
  `, ge = ({ width: o }) => {
1338
1338
  if (Q(o))
1339
- return A`
1339
+ return F`
1340
1340
  width: ${o};
1341
1341
  `;
1342
- }, ee = z.th`
1342
+ }, oe = C.th`
1343
1343
  text-align: ${({ horizontalAlign: o, headerAlign: t }) => o ?? t ?? "left"};
1344
1344
  vertical-align: middle;
1345
1345
  min-width: ${({ minWidth: o }) => o || "auto"};
@@ -1363,7 +1363,7 @@ const Ke = z.div`
1363
1363
  word-break: normal;
1364
1364
 
1365
1365
  &:last-child {
1366
- ${({ isTopRow: o }) => o && A`
1366
+ ${({ isTopRow: o }) => o && F`
1367
1367
  border-right: none;
1368
1368
  `}
1369
1369
  }
@@ -1383,7 +1383,7 @@ const Ke = z.div`
1383
1383
  &:hover {
1384
1384
  cursor: default;
1385
1385
  }
1386
- `, io = z.td`
1386
+ `, io = C.td`
1387
1387
  text-align: ${({ horizontalAlign: o }) => o || "left"};
1388
1388
  vertical-align: ${({ verticalAlign: o }) => o || "middle"};
1389
1389
 
@@ -1420,14 +1420,14 @@ function so(o) {
1420
1420
  function $o({
1421
1421
  id: o,
1422
1422
  rowKey: t = "id",
1423
- size: l = "Small",
1424
- onRowClick: i,
1423
+ size: i = "Small",
1424
+ onRowClick: l,
1425
1425
  fit: c = !1,
1426
- maxHeight: a = "40rem",
1427
- columns: s,
1428
- dataSource: $,
1429
- columnsTextSize: u = l,
1430
- emptyProps: g = {
1426
+ maxHeight: d = "40rem",
1427
+ columns: a,
1428
+ dataSource: b,
1429
+ columnsTextSize: h = i,
1430
+ emptyProps: p = {
1431
1431
  width: "100%",
1432
1432
  height: "100%",
1433
1433
  title: "Nenhum dado a ser mostrado.",
@@ -1437,240 +1437,270 @@ function $o({
1437
1437
  },
1438
1438
  selectedRow: m = !1,
1439
1439
  hideHeader: f = !1,
1440
- withBorder: y = !0,
1441
- withBorderRadius: R = !0,
1442
- striped: j = !1
1440
+ withBorder: x = !0,
1441
+ withBorderRadius: M = !0,
1442
+ striped: W = !1,
1443
+ borderRadius: B = e.borders.borderRadius.borderRadiusSm
1443
1444
  }) {
1444
- const E = G(() => so(t), [t]), [C, L] = D(null), p = q(null), W = q(null), [S, N] = D(s);
1445
+ const y = q(() => so(t), [t]), [R, S] = D(null), j = J(null), I = J(null), [g, P] = D(a);
1445
1446
  ke(() => {
1446
- if (!W.current || s.length === 0) {
1447
- N(s);
1447
+ if (!I.current || a.length === 0) {
1448
+ P(a);
1448
1449
  return;
1449
1450
  }
1450
- const h = () => {
1451
- var P;
1452
- const M = ((P = W.current) == null ? void 0 : P.clientWidth) || 0;
1453
- if (M === 0) return;
1454
- let H = 0, k = 0;
1455
- const d = [], x = [];
1456
- s.forEach((I) => {
1457
- const v = Number(I.flex);
1458
- I.width ? H += parseInt(I.width, 10) || 0 : I.flex && v > 0 ? (k += v, d.push(I)) : x.push(I);
1451
+ const u = () => {
1452
+ var O;
1453
+ const N = ((O = I.current) == null ? void 0 : O.clientWidth) || 0;
1454
+ if (N === 0) return;
1455
+ let L = 0, w = 0;
1456
+ const s = [], r = [];
1457
+ a.forEach((H) => {
1458
+ const $ = Number(H.flex);
1459
+ H.width ? L += parseInt(H.width, 10) || 0 : H.flex && $ > 0 ? (w += $, s.push(H)) : r.push(H);
1459
1460
  });
1460
- const r = M - H, B = "80";
1461
- let w = [...s];
1462
- if (r > 0) {
1463
- if (d.length > 0) {
1464
- const I = r / k;
1465
- w = s.map((v) => {
1466
- const F = Number(v.flex);
1467
- if (F && F > 0) {
1468
- const Y = parseInt(v.minWidth || B, 10), V = F * I, oe = Math.max(V, Y);
1469
- return { ...v, width: `${Math.floor(oe)}px` };
1461
+ const E = N - L, k = "80";
1462
+ let z = [...a];
1463
+ if (E > 0) {
1464
+ if (s.length > 0) {
1465
+ const H = E / w;
1466
+ z = a.map(($) => {
1467
+ const X = Number($.flex);
1468
+ if (X && X > 0) {
1469
+ const V = parseInt($.minWidth || k, 10), Z = X * H, _ = Math.max(Z, V);
1470
+ return { ...$, width: `${Math.floor(_)}px` };
1470
1471
  }
1471
- return !v.width && !F ? {
1472
- ...v,
1473
- width: v.minWidth || `${B}px`
1474
- } : v;
1472
+ return !$.width && !X ? {
1473
+ ...$,
1474
+ width: $.minWidth || `${k}px`
1475
+ } : $;
1475
1476
  });
1476
- } else if (x.length > 0) {
1477
- const I = r / x.length;
1478
- w = s.map((v) => {
1479
- const F = Number(v.flex);
1480
- if (!v.width && !F) {
1481
- const Y = parseInt(v.minWidth || B, 10), V = Math.max(I, Y);
1482
- return { ...v, width: `${Math.floor(V)}px` };
1477
+ } else if (r.length > 0) {
1478
+ const H = E / r.length;
1479
+ z = a.map(($) => {
1480
+ const X = Number($.flex);
1481
+ if (!$.width && !X) {
1482
+ const V = parseInt($.minWidth || k, 10), Z = Math.max(H, V);
1483
+ return { ...$, width: `${Math.floor(Z)}px` };
1483
1484
  }
1484
- return v;
1485
+ return $;
1485
1486
  });
1486
1487
  }
1487
1488
  } else
1488
- w = s.map((I) => I.width ? I : { ...I, width: I.minWidth || `${B}px` });
1489
- N(w);
1489
+ z = a.map((H) => H.width ? H : { ...H, width: H.minWidth || `${k}px` });
1490
+ P(z);
1490
1491
  };
1491
- h();
1492
- const b = new ResizeObserver(h);
1493
- return b.observe(W.current), () => b.disconnect();
1494
- }, [s]), Z(() => {
1495
- const h = (b) => {
1496
- p.current && !p.current.contains(b.target) && L(null);
1492
+ u();
1493
+ const v = new ResizeObserver(u);
1494
+ return v.observe(I.current), () => v.disconnect();
1495
+ }, [a]), K(() => {
1496
+ const u = (v) => {
1497
+ j.current && !j.current.contains(v.target) && S(null);
1497
1498
  };
1498
- return document.addEventListener("mousedown", h), () => {
1499
- document.removeEventListener("mousedown", h);
1499
+ return document.addEventListener("mousedown", u), () => {
1500
+ document.removeEventListener("mousedown", u);
1500
1501
  };
1501
1502
  }, []);
1502
- const O = G(() => S ? S.some(
1503
- (h) => h.mergeHeaderId && h.mergeHeaderLabel
1504
- ) : !1, [S]), T = G(() => {
1505
- var H, k;
1506
- if (f || !S || S.length === 0)
1503
+ const A = q(() => g ? g.some(
1504
+ (u) => u.mergeHeaderId && u.mergeHeaderLabel
1505
+ ) : !1, [g]), T = q(() => {
1506
+ var L, w;
1507
+ if (f || !g || g.length === 0)
1507
1508
  return null;
1508
- if (!O)
1509
- return /* @__PURE__ */ n.jsx(K, { isHeader: !0, size: l, numRows: 1, children: S.map((d) => {
1510
- var x;
1511
- return /* @__PURE__ */ n.jsx(
1512
- ee,
1513
- {
1514
- width: d.width,
1515
- minWidth: d.minWidth,
1516
- maxWidth: d.maxWidth,
1517
- horizontalAlign: d.horizontalAlign,
1518
- size: l,
1519
- columnsTextSize: u,
1520
- withBorder: y,
1521
- headerAlign: d.headerAlign,
1522
- children: ((x = d.columnRender) == null ? void 0 : x.call(d)) || /* @__PURE__ */ n.jsx("span", { title: d.label, children: d.label })
1523
- },
1524
- d.dataIndex
1525
- );
1526
- }) });
1527
- const h = [], b = [];
1528
- let M = 0;
1529
- for (; M < S.length; ) {
1530
- const d = S[M];
1531
- if (d.mergeHeaderId && d.mergeHeaderLabel) {
1532
- let x = 0;
1533
- const r = d.mergeHeaderId;
1534
- for (let B = M; B < S.length && S[B].mergeHeaderId === r; B++)
1535
- x++;
1536
- h.push(
1509
+ if (!A)
1510
+ return /* @__PURE__ */ n.jsx(
1511
+ ee,
1512
+ {
1513
+ isHeader: !0,
1514
+ size: i,
1515
+ numRows: 1,
1516
+ borderRadius: B,
1517
+ children: g.map((s) => {
1518
+ var r;
1519
+ return /* @__PURE__ */ n.jsx(
1520
+ oe,
1521
+ {
1522
+ width: s.width,
1523
+ minWidth: s.minWidth,
1524
+ maxWidth: s.maxWidth,
1525
+ horizontalAlign: s.horizontalAlign,
1526
+ size: i,
1527
+ columnsTextSize: h,
1528
+ withBorder: x,
1529
+ headerAlign: s.headerAlign,
1530
+ children: ((r = s.columnRender) == null ? void 0 : r.call(s)) || /* @__PURE__ */ n.jsx("span", { title: s.label, children: s.label })
1531
+ },
1532
+ s.dataIndex
1533
+ );
1534
+ })
1535
+ }
1536
+ );
1537
+ const u = [], v = [];
1538
+ let N = 0;
1539
+ for (; N < g.length; ) {
1540
+ const s = g[N];
1541
+ if (s.mergeHeaderId && s.mergeHeaderLabel) {
1542
+ let r = 0;
1543
+ const E = s.mergeHeaderId;
1544
+ for (let k = N; k < g.length && g[k].mergeHeaderId === E; k++)
1545
+ r++;
1546
+ u.push(
1537
1547
  /* @__PURE__ */ n.jsx(
1538
- ee,
1548
+ oe,
1539
1549
  {
1540
- colSpan: x,
1550
+ colSpan: r,
1541
1551
  horizontalAlign: "center",
1542
- size: l,
1543
- columnsTextSize: u,
1544
- withBorder: y,
1545
- width: d.width,
1546
- minWidth: d.minWidth,
1547
- maxWidth: d.maxWidth,
1548
- headerAlign: d.headerAlign,
1552
+ size: i,
1553
+ columnsTextSize: h,
1554
+ withBorder: x,
1555
+ width: s.width,
1556
+ minWidth: s.minWidth,
1557
+ maxWidth: s.maxWidth,
1558
+ headerAlign: s.headerAlign,
1549
1559
  isTopRow: !0,
1550
- children: /* @__PURE__ */ n.jsx("span", { title: d.mergeHeaderLabel, children: d.mergeHeaderLabel })
1560
+ children: /* @__PURE__ */ n.jsx("span", { title: s.mergeHeaderLabel, children: s.mergeHeaderLabel })
1551
1561
  },
1552
- `${d.mergeHeaderId}-merged`
1562
+ `${s.mergeHeaderId}-merged`
1553
1563
  )
1554
1564
  );
1555
- for (let B = 0; B < x; B++) {
1556
- const w = S[M + B];
1557
- b.push(
1565
+ for (let k = 0; k < r; k++) {
1566
+ const z = g[N + k];
1567
+ v.push(
1558
1568
  /* @__PURE__ */ n.jsx(
1559
- ee,
1569
+ oe,
1560
1570
  {
1561
- width: w.width,
1562
- minWidth: w.minWidth,
1563
- maxWidth: w.maxWidth,
1564
- horizontalAlign: w.horizontalAlign,
1565
- size: l,
1566
- columnsTextSize: u,
1567
- withBorder: y,
1568
- headerAlign: d.headerAlign,
1569
- children: ((H = w.columnRender) == null ? void 0 : H.call(w)) || /* @__PURE__ */ n.jsx("span", { title: w.label, children: w.label })
1571
+ width: z.width,
1572
+ minWidth: z.minWidth,
1573
+ maxWidth: z.maxWidth,
1574
+ horizontalAlign: z.horizontalAlign,
1575
+ size: i,
1576
+ columnsTextSize: h,
1577
+ withBorder: x,
1578
+ headerAlign: s.headerAlign,
1579
+ children: ((L = z.columnRender) == null ? void 0 : L.call(z)) || /* @__PURE__ */ n.jsx("span", { title: z.label, children: z.label })
1570
1580
  },
1571
- w.dataIndex + "-individual"
1581
+ z.dataIndex + "-individual"
1572
1582
  )
1573
1583
  );
1574
1584
  }
1575
- M += x;
1585
+ N += r;
1576
1586
  } else
1577
- h.push(
1587
+ u.push(
1578
1588
  /* @__PURE__ */ n.jsx(
1579
- ee,
1589
+ oe,
1580
1590
  {
1581
1591
  rowSpan: 2,
1582
- width: d.width,
1583
- minWidth: d.minWidth,
1584
- maxWidth: d.maxWidth,
1585
- horizontalAlign: d.horizontalAlign,
1586
- size: l,
1587
- columnsTextSize: u,
1588
- withBorder: y,
1589
- headerAlign: d.headerAlign,
1592
+ width: s.width,
1593
+ minWidth: s.minWidth,
1594
+ maxWidth: s.maxWidth,
1595
+ horizontalAlign: s.horizontalAlign,
1596
+ size: i,
1597
+ columnsTextSize: h,
1598
+ withBorder: x,
1599
+ headerAlign: s.headerAlign,
1590
1600
  isTopRow: !0,
1591
- children: ((k = d.columnRender) == null ? void 0 : k.call(d)) || /* @__PURE__ */ n.jsx("span", { title: d.label, children: d.label })
1601
+ children: ((w = s.columnRender) == null ? void 0 : w.call(s)) || /* @__PURE__ */ n.jsx("span", { title: s.label, children: s.label })
1592
1602
  },
1593
- d.dataIndex
1603
+ s.dataIndex
1594
1604
  )
1595
- ), M++;
1605
+ ), N++;
1596
1606
  }
1597
1607
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1598
- /* @__PURE__ */ n.jsx(K, { isHeader: !0, size: l, numRows: 2, children: h }),
1599
- b.length > 0 && /* @__PURE__ */ n.jsx(K, { isHeader: !0, size: l, numRows: 2, children: b })
1608
+ /* @__PURE__ */ n.jsx(
1609
+ ee,
1610
+ {
1611
+ isHeader: !0,
1612
+ size: i,
1613
+ numRows: 2,
1614
+ borderRadius: B,
1615
+ children: u
1616
+ }
1617
+ ),
1618
+ v.length > 0 && /* @__PURE__ */ n.jsx(
1619
+ ee,
1620
+ {
1621
+ isHeader: !0,
1622
+ size: i,
1623
+ numRows: 2,
1624
+ borderRadius: B,
1625
+ children: v
1626
+ }
1627
+ )
1600
1628
  ] });
1601
- }, [S, f, l, u, O]);
1602
- return !$ || $.length === 0 ? /* @__PURE__ */ n.jsx(
1629
+ }, [g, f, i, h, A]);
1630
+ return !b || b.length === 0 ? /* @__PURE__ */ n.jsx(
1603
1631
  ye,
1604
1632
  {
1605
1633
  backgroundColor: e.colors.backgroundColors.colorBackgroundSnow,
1606
1634
  borders: !0,
1607
1635
  mode: "table",
1608
- ...g
1636
+ ...p
1609
1637
  }
1610
1638
  ) : /* @__PURE__ */ n.jsx(
1611
1639
  to,
1612
1640
  {
1613
- maxHeight: a,
1614
- withBorderRadius: R,
1615
- ref: W,
1616
- children: /* @__PURE__ */ n.jsxs(no, { id: o, ref: p, children: [
1641
+ maxHeight: d,
1642
+ withBorderRadius: M,
1643
+ ref: I,
1644
+ borderRadius: B,
1645
+ children: /* @__PURE__ */ n.jsxs(no, { id: o, ref: j, children: [
1617
1646
  /* @__PURE__ */ n.jsx("thead", { children: T }),
1618
- /* @__PURE__ */ n.jsx("tbody", { style: { width: "100%" }, children: $ == null ? void 0 : $.map((h, b, M) => {
1619
- const H = E(h);
1647
+ /* @__PURE__ */ n.jsx("tbody", { style: { width: "100%" }, children: b == null ? void 0 : b.map((u, v, N) => {
1648
+ const L = y(u);
1620
1649
  return /* @__PURE__ */ n.jsx(
1621
- K,
1650
+ ee,
1622
1651
  {
1623
- isLast: b === M.length - 1,
1652
+ isLast: v === N.length - 1,
1624
1653
  fit: c,
1625
- size: l,
1626
- withBorder: y,
1627
- isSelected: H === C && m,
1628
- striped: j && b % 2 !== 0,
1629
- children: S.map((k) => {
1630
- var d, x;
1654
+ size: i,
1655
+ withBorder: x,
1656
+ isSelected: L === R && m,
1657
+ striped: W && v % 2 !== 0,
1658
+ borderRadius: B,
1659
+ children: g.map((w) => {
1660
+ var s, r;
1631
1661
  return /* @__PURE__ */ n.jsx(
1632
1662
  io,
1633
1663
  {
1634
- width: k.width,
1635
- minWidth: k.minWidth,
1636
- maxWidth: k.maxWidth,
1637
- size: l,
1638
- isClickable: Q(i),
1664
+ width: w.width,
1665
+ minWidth: w.minWidth,
1666
+ maxWidth: w.maxWidth,
1667
+ size: i,
1668
+ isClickable: Q(l),
1639
1669
  onClick: () => {
1640
- i && i(h, k, b), m && L(
1641
- C === H ? null : H
1670
+ l && l(u, w, v), m && S(
1671
+ R === L ? null : L
1642
1672
  );
1643
1673
  },
1644
- horizontalAlign: k.horizontalAlign,
1645
- verticalAlign: k.verticalAlign,
1646
- rowPadding: k.rowPadding,
1647
- withBorder: y,
1648
- isLast: b === M.length - 1,
1649
- children: ((d = k.render) == null ? void 0 : d.call(
1650
- k,
1651
- h[k.dataIndex],
1652
- h,
1653
- b,
1654
- M
1674
+ horizontalAlign: w.horizontalAlign,
1675
+ verticalAlign: w.verticalAlign,
1676
+ rowPadding: w.rowPadding,
1677
+ withBorder: x,
1678
+ isLast: v === N.length - 1,
1679
+ children: ((s = w.render) == null ? void 0 : s.call(
1680
+ w,
1681
+ u[w.dataIndex],
1682
+ u,
1683
+ v,
1684
+ N
1655
1685
  )) || /* @__PURE__ */ n.jsx(
1656
1686
  "span",
1657
1687
  {
1658
- title: h[k.dataIndex],
1688
+ title: u[w.dataIndex],
1659
1689
  style: {
1660
1690
  textOverflow: "ellipsis",
1661
1691
  whiteSpace: "nowrap",
1662
1692
  overflow: "hidden",
1663
- ...(x = k.rowCss) == null ? void 0 : x.call(k, h)
1693
+ ...(r = w.rowCss) == null ? void 0 : r.call(w, u)
1664
1694
  },
1665
- children: h[k.dataIndex]
1695
+ children: u[w.dataIndex]
1666
1696
  }
1667
1697
  ) || ""
1668
1698
  },
1669
- `${H}::${k.dataIndex}`
1699
+ `${L}::${w.dataIndex}`
1670
1700
  );
1671
1701
  })
1672
1702
  },
1673
- H
1703
+ L
1674
1704
  );
1675
1705
  }) })
1676
1706
  ] })