@ufal-lccv/gpsub-ds 0.0.21 → 0.0.23

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.
Files changed (54) hide show
  1. package/README.md +31 -31
  2. package/dist/{RequiredLabel.view-vhY8Ifny.js → RequiredLabel.view-CozPA47g.js} +26 -25
  3. package/dist/RequiredLabel.view-Cst1Xi0O.cjs +1 -0
  4. package/dist/{Table.view-DrGCSijo.js → Table.view-CraTHYN6.js} +37 -37
  5. package/dist/{Table.view-Cq1l_7IE.cjs → Table.view-oMq7rOZT.cjs} +9 -10
  6. package/dist/Title.view-BqxGXSW7.cjs +1 -0
  7. package/dist/Title.view-DY1vs-iO.js +54 -0
  8. package/dist/Tooltip.view-7yR4bqF1.cjs +1455 -0
  9. package/dist/{Tooltip.view-B2Qudmep.js → Tooltip.view-Cao5yOMP.js} +2351 -2177
  10. package/dist/components/atoms/LibraryCard/LibraryCard.view.d.ts +6 -2
  11. package/dist/components/atoms/LoadingBar/LoadingBar.styles.d.ts +1 -0
  12. package/dist/components/atoms/Tooltip/Tooltip.view.d.ts +4 -2
  13. package/dist/components/atoms/index.cjs.js +1 -1
  14. package/dist/components/atoms/index.es.js +9 -9
  15. package/dist/components/index.cjs.js +1 -1
  16. package/dist/components/index.es.js +35 -31
  17. package/dist/components/molecules/ActionButton/ActionButton.view.d.ts +1 -1
  18. package/dist/components/molecules/Alert/Alert.view.d.ts +1 -0
  19. package/dist/components/molecules/Alert/index.d.ts +1 -0
  20. package/dist/components/molecules/AlertInline/AlertInline.view.d.ts +1 -1
  21. package/dist/components/molecules/Confirm/ConfirmModal.view.d.ts +1 -1
  22. package/dist/components/molecules/Empty/Empty.types.d.ts +2 -1
  23. package/dist/components/molecules/Loading/Loading.view.d.ts +1 -1
  24. package/dist/components/molecules/Modal/DefaultFooter/DefaultFooter.types.d.ts +10 -0
  25. package/dist/components/molecules/Modal/DefaultFooter/DefaultFooter.view.d.ts +3 -0
  26. package/dist/components/molecules/Modal/DefaultFooter/index.d.ts +2 -0
  27. package/dist/components/molecules/Modal/Modal.view.d.ts +5 -1
  28. package/dist/components/molecules/MultiSelect/MultiSelect.view.d.ts +1 -0
  29. package/dist/components/molecules/MultiSelect/index.d.ts +1 -0
  30. package/dist/components/molecules/index.cjs.js +1 -1
  31. package/dist/components/molecules/index.d.ts +2 -0
  32. package/dist/components/molecules/index.es.js +21 -18
  33. package/dist/components/organisms/Autocomplete/Autocomplete.view.d.ts +1 -0
  34. package/dist/components/organisms/Autocomplete/index.d.ts +1 -0
  35. package/dist/components/organisms/index.cjs.js +1 -1
  36. package/dist/components/organisms/index.d.ts +1 -0
  37. package/dist/components/organisms/index.es.js +13 -11
  38. package/dist/hash-BtT4jVLO.js +25 -0
  39. package/dist/hash-CJrPvUOz.cjs +1 -0
  40. package/dist/helpers/functions/getLabelText.d.ts +2 -0
  41. package/dist/helpers/functions/index.d.ts +1 -0
  42. package/dist/helpers/index.cjs.js +1 -1
  43. package/dist/helpers/index.es.js +10 -18
  44. package/dist/index.cjs.js +1 -1
  45. package/dist/index.es.js +44 -39
  46. package/dist/types/baseProps.d.ts +8 -0
  47. package/dist/types/icons.d.ts +1 -0
  48. package/dist/types/styleGuide/index.d.ts +174 -0
  49. package/dist/types/styleGuide/position.d.ts +1 -0
  50. package/package.json +121 -120
  51. package/dist/RequiredLabel.view-Dn02h8aL.cjs +0 -1
  52. package/dist/Title.view-Bw6K4U1v.cjs +0 -1
  53. package/dist/Title.view-lFI_ZPGv.js +0 -74
  54. package/dist/Tooltip.view-DGl4VmmK.cjs +0 -1456
package/README.md CHANGED
@@ -1,31 +1,31 @@
1
- # gpsub-ds
2
-
3
- Design system temporário do GP-SUB para auxiliar na futura migração para o DS Subweb 2.0
4
-
5
- ## Atomic Design
6
-
7
- Para dúvidas sobre o Atomic Design, consulte o [link](https://github.com/diegohaz/arc/wiki/Atomic-Design).
8
-
9
- ### Atoms
10
-
11
- Um átomo é uma tag html nativa, um Componente React que renderiza uma tag html ou qualquer componente de terceiros
12
-
13
- ### Molecules
14
-
15
- Uma molécula é um grupo de átomos.
16
-
17
- ### Organisms
18
-
19
- Um organismo é um grupo de átomos, moléculas e/ou outros organismos.
20
-
21
- ### Pages
22
-
23
- Uma página é uma página, onde você colocará principalmente (mas não exclusivamente) organismos.
24
-
25
- ### Templates
26
-
27
- Um template é um layout para ser usado em páginas.
28
-
29
- ## Do not worry!
30
-
31
- Atomic Design deve ser uma solução, não outro problema. Se você quiser criar um componente e não sabe onde colocá-lo (átomos, moléculas, organismos etc.), não se preocupe, não pense muito, apenas coloque-o em qualquer lugar. Depois de você perceber o que é, apenas mova a pasta do componente para o lugar certo. Tudo irá funcionar por que os componentes são exportados de forma dinâmica em `src/components/index.ts`.
1
+ # gpsub-ds
2
+
3
+ Design system temporário do GP-SUB para auxiliar na futura migração para o DS Subweb 2.0
4
+
5
+ ## Atomic Design
6
+
7
+ Para dúvidas sobre o Atomic Design, consulte o [link](https://github.com/diegohaz/arc/wiki/Atomic-Design).
8
+
9
+ ### Atoms
10
+
11
+ Um átomo é uma tag html nativa, um Componente React que renderiza uma tag html ou qualquer componente de terceiros
12
+
13
+ ### Molecules
14
+
15
+ Uma molécula é um grupo de átomos.
16
+
17
+ ### Organisms
18
+
19
+ Um organismo é um grupo de átomos, moléculas e/ou outros organismos.
20
+
21
+ ### Pages
22
+
23
+ Uma página é uma página, onde você colocará principalmente (mas não exclusivamente) organismos.
24
+
25
+ ### Templates
26
+
27
+ Um template é um layout para ser usado em páginas.
28
+
29
+ ## Do not worry!
30
+
31
+ Atomic Design deve ser uma solução, não outro problema. Se você quiser criar um componente e não sabe onde colocá-lo (átomos, moléculas, organismos etc.), não se preocupe, não pense muito, apenas coloque-o em qualquer lugar. Depois de você perceber o que é, apenas mova a pasta do componente para o lugar certo. Tudo irá funcionar por que os componentes são exportados de forma dinâmica em `src/components/index.ts`.
@@ -1,19 +1,20 @@
1
- import { l as o, m as k, n as j, o as F, b as i, p as f, W as m, q as I, r as w, t as E, u as S, v as R, I as L, w as _ } from "./Tooltip.view-B2Qudmep.js";
2
- import { useState as A } from "react";
1
+ import { m as o, w as k, x as j, o as F, b as n, y as m, W as f, z as I, D as w, G as E, H as S, J as R, I as D, K as L } from "./Tooltip.view-Cao5yOMP.js";
2
+ import { useState as _ } from "react";
3
3
  import { sg as r } from "sbwb-ds";
4
- const q = ({
4
+ import "sbwb-ds-latest";
5
+ const $ = ({
5
6
  width: c = "100%",
6
7
  height: a = "fit-content",
7
8
  type: e,
8
9
  title: l,
9
10
  message: t,
10
11
  margin: d,
11
- open: u = !0,
12
- onClose: n,
12
+ open: x = !0,
13
+ onClose: i,
13
14
  canClose: h = !0
14
15
  }) => {
15
- var x, b;
16
- const [p, g] = A(u), s = {
16
+ var b, u;
17
+ const [p, g] = _(x), s = {
17
18
  info: {
18
19
  backgroundColor: "#D5EBFD",
19
20
  borderColor: r.colors.feedbackColors.colorFeedbackInfo,
@@ -56,10 +57,10 @@ const q = ({
56
57
  }
57
58
  };
58
59
  function C() {
59
- g(!1), n == null || n();
60
+ g(!1), i == null || i();
60
61
  }
61
62
  return /* @__PURE__ */ o.jsx(o.Fragment, { children: p ? /* @__PURE__ */ o.jsxs(
62
- i,
63
+ n,
63
64
  {
64
65
  width: c,
65
66
  height: a,
@@ -67,20 +68,20 @@ const q = ({
67
68
  verticalAlign: l ? "top" : "center",
68
69
  gap: r.spacings.spacingInset.spacingInsetXs,
69
70
  padding: r.spacings.spacingInline.spacingInlineSm,
70
- backgroundColor: (x = s == null ? void 0 : s[e]) == null ? void 0 : x.backgroundColor,
71
+ backgroundColor: (b = s == null ? void 0 : s[e]) == null ? void 0 : b.backgroundColor,
71
72
  customStyles: {
72
- border: `1px solid ${(b = s == null ? void 0 : s[e]) == null ? void 0 : b.borderColor}`,
73
+ border: `1px solid ${(u = s == null ? void 0 : s[e]) == null ? void 0 : u.borderColor}`,
73
74
  borderRadius: r.borders.borderRadius.borderRadiusSm,
74
75
  margin: d,
75
76
  position: "relative"
76
77
  },
77
78
  children: [
78
- e === "warning" ? /* @__PURE__ */ o.jsx(f, { children: /* @__PURE__ */ o.jsx(m, { width: "20px", height: "20px" }) }) : /* @__PURE__ */ o.jsx(o.Fragment, { children: s == null ? void 0 : s[e].icon }),
79
- /* @__PURE__ */ o.jsxs(i, { width: "100%", flex: "1", height: "100%", children: [
79
+ e === "warning" ? /* @__PURE__ */ o.jsx(m, { children: /* @__PURE__ */ o.jsx(f, { width: "20px", height: "20px" }) }) : /* @__PURE__ */ o.jsx(o.Fragment, { children: s == null ? void 0 : s[e].icon }),
80
+ /* @__PURE__ */ o.jsxs(n, { width: "100%", flex: "1", height: "100%", children: [
80
81
  /* @__PURE__ */ o.jsx(I, { children: l }),
81
82
  /* @__PURE__ */ o.jsx(w, { children: t })
82
83
  ] }),
83
- h && /* @__PURE__ */ o.jsx(i, { children: /* @__PURE__ */ o.jsx(
84
+ h && /* @__PURE__ */ o.jsx(n, { children: /* @__PURE__ */ o.jsx(
84
85
  E,
85
86
  {
86
87
  color: r.colors.neutralColors.colorNeutralCloudy,
@@ -93,38 +94,38 @@ const q = ({
93
94
  ]
94
95
  }
95
96
  ) : /* @__PURE__ */ o.jsx(o.Fragment, {}) });
96
- }, v = ({
97
+ }, q = ({
97
98
  label: c,
98
99
  labelRender: a,
99
100
  infoProps: e = {},
100
101
  withInfo: l = !0,
101
102
  flex: t,
102
103
  width: d = "100%",
103
- isRequired: u = !1
104
+ isRequired: x = !1
104
105
  }) => {
105
- const n = {
106
+ const i = {
106
107
  tooltipProps: {
107
108
  position: "top",
108
109
  ...e == null ? void 0 : e.tooltipProps,
109
110
  size: "Small"
110
111
  }
111
112
  };
112
- return /* @__PURE__ */ o.jsxs(i, { width: d, direction: "horizontal", gap: "4px", flex: t, children: [
113
+ return /* @__PURE__ */ o.jsxs(n, { width: d, direction: "horizontal", gap: "4px", flex: t, children: [
113
114
  a ?? /* @__PURE__ */ o.jsxs(S, { children: [
114
115
  c,
115
116
  " ",
116
- u ? /* @__PURE__ */ o.jsx(R, { children: "*" }) : null
117
+ x ? /* @__PURE__ */ o.jsx(R, { children: "*" }) : null
117
118
  ] }),
118
- l && /* @__PURE__ */ o.jsx(L, { ...n })
119
+ l && /* @__PURE__ */ o.jsx(D, { ...i })
119
120
  ] });
120
- }, z = ({
121
+ }, v = ({
121
122
  width: c = "100%",
122
123
  flex: a,
123
124
  label: e = "Obrigatório",
124
125
  margin: l = "0 0 16px 0"
125
- }) => /* @__PURE__ */ o.jsx(i, { width: c, flex: a, customStyles: { margin: l }, children: /* @__PURE__ */ o.jsx(_, { children: `* ${e}` }) });
126
+ }) => /* @__PURE__ */ o.jsx(n, { width: c, flex: a, customStyles: { margin: l }, children: /* @__PURE__ */ o.jsx(L, { children: `* ${e}` }) });
126
127
  export {
127
- q as A,
128
- v as L,
129
- z as R
128
+ $ as A,
129
+ q as L,
130
+ v as R
130
131
  };
@@ -0,0 +1 @@
1
+ "use strict";const r=require("./Tooltip.view-7yR4bqF1.cjs"),h=require("react"),e=require("sbwb-ds");require("sbwb-ds-latest");const m=({width:n="100%",height:i="fit-content",type:o,title:t,message:c,margin:x,open:a=!0,onClose:l,canClose:p=!0})=>{var d,u;const[j,b]=h.useState(a),s={info:{backgroundColor:"#D5EBFD",borderColor:e.sg.colors.feedbackColors.colorFeedbackInfo,icon:r.jsxRuntimeExports.jsx(r.InfoFill_default,{color:e.sg.colors.feedbackColors.colorFeedbackInfo,height:"20px",width:"20px"})},success:{backgroundColor:"#DAF9DB",borderColor:e.sg.colors.feedbackColors.colorFeedbackSuccess,icon:r.jsxRuntimeExports.jsx(r.CheckCircleFill_default,{color:e.sg.colors.feedbackColors.colorFeedbackSuccess,height:"20px",width:"20px"})},warning:{backgroundColor:"#FEEECF",borderColor:e.sg.colors.feedbackColors.colorFeedbackWarning},error:{backgroundColor:"#FFE1E1",borderColor:e.sg.colors.feedbackColors.colorFeedbackError,icon:r.jsxRuntimeExports.jsx(r.ErrorFill_default,{color:e.sg.colors.feedbackColors.colorFeedbackError,height:"20px",width:"20px"})}};function g(){b(!1),l==null||l()}return r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:j?r.jsxRuntimeExports.jsxs(r.Container,{width:n,height:i,direction:"horizontal",verticalAlign:t?"top":"center",gap:e.sg.spacings.spacingInset.spacingInsetXs,padding:e.sg.spacings.spacingInline.spacingInlineSm,backgroundColor:(d=s==null?void 0:s[o])==null?void 0:d.backgroundColor,customStyles:{border:`1px solid ${(u=s==null?void 0:s[o])==null?void 0:u.borderColor}`,borderRadius:e.sg.borders.borderRadius.borderRadiusSm,margin:x,position:"relative"},children:[o==="warning"?r.jsxRuntimeExports.jsx(r.ContainerWarning,{children:r.jsxRuntimeExports.jsx(r.WarningFill_default,{width:"20px",height:"20px"})}):r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:s==null?void 0:s[o].icon}),r.jsxRuntimeExports.jsxs(r.Container,{width:"100%",flex:"1",height:"100%",children:[r.jsxRuntimeExports.jsx(r.Title$1,{children:t}),r.jsxRuntimeExports.jsx(r.Message,{children:c})]}),p&&r.jsxRuntimeExports.jsx(r.Container,{children:r.jsxRuntimeExports.jsx(r.Close_default,{color:e.sg.colors.neutralColors.colorNeutralCloudy,cursor:"pointer",onClick:g,height:"20px",width:"20px"})})]}):r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{})})},E=({label:n,labelRender:i,infoProps:o={},withInfo:t=!0,flex:c,width:x="100%",isRequired:a=!1})=>{const l={tooltipProps:{position:"top",...o==null?void 0:o.tooltipProps,size:"Small"}};return r.jsxRuntimeExports.jsxs(r.Container,{width:x,direction:"horizontal",gap:"4px",flex:c,children:[i??r.jsxRuntimeExports.jsxs(r.Label$1,{children:[n," ",a?r.jsxRuntimeExports.jsx(r.Required,{children:"*"}):null]}),t&&r.jsxRuntimeExports.jsx(r.Info,{...l})]})},R=({width:n="100%",flex:i,label:o="Obrigatório",margin:t="0 0 16px 0"})=>r.jsxRuntimeExports.jsx(r.Container,{width:n,flex:i,customStyles:{margin:t},children:r.jsxRuntimeExports.jsx(r.Label$2,{children:`* ${o}`})});exports.AlertInline=m;exports.LabelField=E;exports.RequiredLabelView=R;
@@ -1,9 +1,10 @@
1
- import { l as n, b as _, i as ce, P as xe, j as we, C as ye, Q as x, U as M, s as Ce, T as fe, S as ke, I as ze, V as Be, E as ue } from "./Tooltip.view-B2Qudmep.js";
2
- import je, { useState as P, useEffect as Z, useCallback as he, useMemo as V, useRef as U, forwardRef as ge, isValidElement as se, useLayoutEffect as Ne } from "react";
3
- import { sg as o, Icon as Y } from "sbwb-ds";
1
+ import { m as n, b as _, j as ce, N as xe, k as we, C as ye, O as x, P as M, s as Ce, T as fe, S as ke, I as ze, Q as Be, E as ue } from "./Tooltip.view-Cao5yOMP.js";
2
+ import je, { useState as P, useEffect as Z, useCallback as he, useMemo as Y, useRef as U, forwardRef as ge, isValidElement as se, useLayoutEffect as Ne } from "react";
3
+ import { sg as o, Icon as V } from "sbwb-ds";
4
+ import "sbwb-ds-latest";
4
5
  import { v as G, r as q, b as We } from "./index-_v6RoRxb.js";
5
6
  import { Controller as re } from "react-hook-form";
6
- const ae = 350, wo = ({
7
+ const ae = 350, yo = ({
7
8
  title: e,
8
9
  children: t,
9
10
  endAdornment: i = null,
@@ -98,17 +99,17 @@ function le({
98
99
  }) {
99
100
  const s = he(() => {
100
101
  e.trigger(t);
101
- }, [e, t]), d = V(
102
+ }, [e, t]), d = Y(
102
103
  () => ve(() => s(), l),
103
104
  [s, l]
104
- ), a = V(
105
+ ), a = Y(
105
106
  () => ["all", "onChange"].includes(i) ? d : null,
106
107
  [d, i]
107
- ), h = V(
108
+ ), h = Y(
108
109
  () => ["all", "onBlur"].includes(i) ? s : null,
109
110
  [i]
110
111
  );
111
- return V(
112
+ return Y(
112
113
  () => ({
113
114
  onChangeTrigger: a,
114
115
  onBlurTrigger: h
@@ -116,7 +117,7 @@ function le({
116
117
  [a, h]
117
118
  );
118
119
  }
119
- const yo = ({
120
+ const Co = ({
120
121
  form: e,
121
122
  name: t,
122
123
  label: i,
@@ -157,7 +158,7 @@ const yo = ({
157
158
  }, T = (y, v) => {
158
159
  let E = y;
159
160
  u && (E = u == null ? void 0 : u(y)), v(E), f == null || f(E), B == null || B();
160
- }, b = V(() => G(a) ? a : Object.fromEntries(l.map((y) => [y.value, y])), [l, a]);
161
+ }, b = Y(() => G(a) ? a : Object.fromEntries(l.map((y) => [y.value, y])), [l, a]);
161
162
  return /* @__PURE__ */ n.jsx(_, { width: h, flex: m, children: /* @__PURE__ */ n.jsx(
162
163
  re,
163
164
  {
@@ -255,7 +256,7 @@ const yo = ({
255
256
  ) });
256
257
  };
257
258
  Re.displayName = "TextareaField";
258
- const Co = ({
259
+ const ko = ({
259
260
  form: e,
260
261
  name: t,
261
262
  id: i = t,
@@ -540,7 +541,7 @@ const Co = ({
540
541
  iconPosition: (I = r.tooltipProps) == null ? void 0 : I.position,
541
542
  id: `iconContainer-${r.value}`,
542
543
  children: /* @__PURE__ */ n.jsx(
543
- Y,
544
+ V,
544
545
  {
545
546
  iconName: W,
546
547
  color: r.disabled ? o.colors.neutralColors.colorNeutralCleanest : y(r) ? o.colors.brandColors.colorBrandSoft : $ ?? o.colors.neutralColors.colorNeutralDark
@@ -700,7 +701,7 @@ const Oe = ({
700
701
  t ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
701
702
  /* @__PURE__ */ n.jsx(ke, { size: "auto", direction: "horizontal" }),
702
703
  /* @__PURE__ */ n.jsx(
703
- Y,
704
+ V,
704
705
  {
705
706
  iconName: t,
706
707
  onClick: () => i == null ? void 0 : i(),
@@ -814,7 +815,7 @@ const Xe = x.div`
814
815
  font-style: ${({ isDisplayText: e }) => e ? "italic" : "normal"};
815
816
  }
816
817
  `, Ge = x.span`
817
- color: ${o.colors.neutralColors.colorNeutralCleanest};
818
+ color: ${o.colors.neutralColors.colorNeutralCloudy};
818
819
  font-size: ${({ size: e, variant: t }) => t === "default" ? e === "Small" ? o.fonts.fontSize.fontSizeBodyMd : o.fonts.fontSize.fontSizeBodyLg : e === "Small" ? o.fonts.fontSize.fontSizeBodySm : o.fonts.fontSize.fontSizeBodyMd};
819
820
  font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
820
821
  font-weight: ${o.fonts.fontWeight.fontWeightRegular};
@@ -850,9 +851,8 @@ const Xe = x.div`
850
851
  line-height: ${o.fonts.lineHeight.lineHeightSm(
851
852
  o.fonts.fontSize.fontSizeBodyMd
852
853
  )};
853
- color: ${o.colors.neutralColors.colorNeutralCloudy};
854
- margin-bottom: ${o.spacings.spacingStack.spacingStackNano};
855
- `, Ve = x.label`
854
+ color: ${o.colors.neutralColors.colorNeutralDark};
855
+ `, Ye = x.label`
856
856
  font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
857
857
  font-size: ${o.fonts.fontSize.fontSizeBodyMd};
858
858
  font-weight: ${o.fonts.fontWeight.fontWeightRegular};
@@ -869,7 +869,7 @@ x.p`
869
869
  margin-top: ${o.spacings.spacingInline.spacingInlineNano};
870
870
  width: 100%;
871
871
  `;
872
- const Ye = x.p`
872
+ const Ve = x.p`
873
873
  display: inline-block;
874
874
  font-size: ${({ size: e }) => e === "Small" ? o.fonts.fontSize.fontSizeBodySm : o.fonts.fontSize.fontSizeBodyMd};
875
875
  font-weight: ${o.fonts.fontWeight.fontWeightRegular};
@@ -968,14 +968,14 @@ const Ye = x.p`
968
968
  ...z,
969
969
  size: a
970
970
  }, K = /* @__PURE__ */ n.jsx(
971
- Y,
971
+ V,
972
972
  {
973
973
  iconName: `Close${a === "Small" ? "Sm" : "Ant"}`,
974
974
  onClick: (Q) => {
975
975
  Q.stopPropagation(), R(e);
976
976
  }
977
977
  }
978
- ), te = /* @__PURE__ */ n.jsx(Y, { iconName: `ExpandLess${a === "Small" ? "Sm" : "Ant"}` }), be = /* @__PURE__ */ n.jsx(Y, { iconName: `ExpandMore${a === "Small" ? "Sm" : "Ant"}` });
978
+ ), te = /* @__PURE__ */ n.jsx(V, { iconName: `ExpandLess${a === "Small" ? "Sm" : "Ant"}` }), be = /* @__PURE__ */ n.jsx(V, { iconName: `ExpandMore${a === "Small" ? "Sm" : "Ant"}` });
979
979
  return /* @__PURE__ */ n.jsxs(
980
980
  Xe,
981
981
  {
@@ -988,7 +988,7 @@ const Ye = x.p`
988
988
  d && /* @__PURE__ */ n.jsxs(Je, { children: [
989
989
  /* @__PURE__ */ n.jsxs(Qe, { "data-testid": "label", ref: J, children: [
990
990
  d,
991
- k && !m ? /* @__PURE__ */ n.jsx(Ve, { children: " *" }) : null
991
+ k && !m ? /* @__PURE__ */ n.jsx(Ye, { children: " *" }) : null
992
992
  ] }),
993
993
  ((D == null ? void 0 : D.message) || (D == null ? void 0 : D.render)) && /* @__PURE__ */ n.jsx(ze, { ...D })
994
994
  ] }),
@@ -1057,7 +1057,7 @@ const Ye = x.p`
1057
1057
  ]
1058
1058
  }
1059
1059
  ) }),
1060
- p && /* @__PURE__ */ n.jsx(Ye, { size: a, children: p })
1060
+ p && /* @__PURE__ */ n.jsx(Ve, { size: a, children: p })
1061
1061
  ]
1062
1062
  }
1063
1063
  );
@@ -1208,7 +1208,7 @@ const to = x.div`
1208
1208
  optionsSelect: l,
1209
1209
  selectContainerRef: d
1210
1210
  };
1211
- }, ro = 200, ko = ({
1211
+ }, ro = 200, zo = ({
1212
1212
  name: e,
1213
1213
  variant: t = "primary",
1214
1214
  width: i = "100%",
@@ -1250,7 +1250,7 @@ const to = x.div`
1250
1250
  id: `button-component-${e}`,
1251
1251
  children: [
1252
1252
  d && /* @__PURE__ */ n.jsx(to, { size: l, disabled: s, variant: t, children: /* @__PURE__ */ n.jsx(
1253
- Y,
1253
+ V,
1254
1254
  {
1255
1255
  iconName: `ProgressActivity${l === "Small" ? "Ant" : "Sm"}`,
1256
1256
  color: z,
@@ -1259,14 +1259,14 @@ const to = x.div`
1259
1259
  ) }),
1260
1260
  !d && /* @__PURE__ */ n.jsx("p", { title: e, children: e }),
1261
1261
  !d && ($ ? /* @__PURE__ */ n.jsx(
1262
- Y,
1262
+ V,
1263
1263
  {
1264
1264
  iconName: `ExpandLess${l === "Small" ? "Ant" : "Sm"}`,
1265
1265
  color: z,
1266
1266
  "data-testid": "icon-button-less"
1267
1267
  }
1268
1268
  ) : /* @__PURE__ */ n.jsx(
1269
- Y,
1269
+ V,
1270
1270
  {
1271
1271
  iconName: `ExpandMore${l === "Small" ? "Ant" : "Sm"}`,
1272
1272
  color: z,
@@ -1351,7 +1351,7 @@ const ao = x.div`
1351
1351
  background-color: 'transparent';
1352
1352
  border-right: 1px solid ${o.colors.neutralColors.colorNeutralSoft};
1353
1353
  overflow: hidden;
1354
- `, zo = ({
1354
+ `, Bo = ({
1355
1355
  width: e = "100%",
1356
1356
  height: t = "fit-content",
1357
1357
  flex: i,
@@ -1589,7 +1589,7 @@ const ao = x.div`
1589
1589
  function mo(e) {
1590
1590
  return (t) => typeof e == "string" ? t[e] : typeof e == "function" ? e(t) : (console.warn("Please, setup a rowKey for table."), JSON.stringify(t));
1591
1591
  }
1592
- function Bo({
1592
+ function jo({
1593
1593
  id: e,
1594
1594
  rowKey: t = "id",
1595
1595
  size: i = "Small",
@@ -1614,7 +1614,7 @@ function Bo({
1614
1614
  striped: g = !1,
1615
1615
  borderRadius: w = o.borders.borderRadius.borderRadiusSm
1616
1616
  }) {
1617
- const z = V(() => mo(t), [t]), [L, k] = P(null), R = U(null), H = U(null), [B, J] = P(a);
1617
+ const z = Y(() => mo(t), [t]), [L, k] = P(null), R = U(null), H = U(null), [B, J] = P(a);
1618
1618
  Ne(() => {
1619
1619
  if (!H.current || a.length === 0) {
1620
1620
  J(a);
@@ -1672,9 +1672,9 @@ function Bo({
1672
1672
  document.removeEventListener("mousedown", b);
1673
1673
  };
1674
1674
  }, []);
1675
- const A = V(() => B ? B.some(
1675
+ const A = Y(() => B ? B.some(
1676
1676
  (b) => b.mergeHeaderId && b.mergeHeaderLabel
1677
- ) : !1, [B]), T = V(() => {
1677
+ ) : !1, [B]), T = Y(() => {
1678
1678
  var E, C;
1679
1679
  if (u || !B || B.length === 0)
1680
1680
  return null;
@@ -1887,14 +1887,14 @@ function Bo({
1887
1887
  );
1888
1888
  }
1889
1889
  export {
1890
- wo as C,
1890
+ yo as C,
1891
1891
  ie as M,
1892
- yo as S,
1892
+ Co as S,
1893
1893
  Re as T,
1894
- Co as a,
1894
+ ko as a,
1895
1895
  Oe as b,
1896
1896
  me as c,
1897
- ko as d,
1898
- zo as e,
1899
- Bo as f
1897
+ zo as d,
1898
+ Bo as e,
1899
+ jo as f
1900
1900
  };
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./Tooltip.view-DGl4VmmK.cjs"),g=require("react"),t=require("sbwb-ds"),F=require("./index-BcwQwoIM.cjs"),Q=require("react-hook-form"),ee=350,ae=({title:e,children:n,endAdornment:i=null,marginBottom:s="16px",customStyles:l={},wrapperCustomStyles:c={},animationContainerCustomStyles:a={},hideAdornmentOnCollapse:h=!1,maxHeight:m="none",height:p="fit-content"})=>{const[u,f]=g.useState(!1),[b,E]=g.useState(!0);g.useEffect(()=>{if(h)if(u){const w=setTimeout(()=>E(!1),ee);return()=>clearTimeout(w)}else E(!0)},[u,h]);const x=h&&!b?null:i;return o.jsxRuntimeExports.jsxs(o.Container,{width:"100%",flex:"1",gap:"8px",customStyles:c,children:[o.jsxRuntimeExports.jsx(o.SectionTitle,{title:e,divider:!0,marginBottom:s,collapse:{collapsed:u,setCollapsed:f},endAdornment:x,customStyles:l}),o.jsxRuntimeExports.jsx(o.Container,{gap:"8px",width:"100%",height:p,customStyles:{...a,maxHeight:u?"0":m,transition:`max-height ${ee}ms ease-in-out`},children:n})]})};function Y(e,n,i){var s,l,c,a,h;n==null&&(n=100);function m(){var u=Date.now()-a;u<n&&u>=0?s=setTimeout(m,n-u):(s=null,i||(h=e.apply(c,l),c=l=null))}var p=function(){c=this,l=arguments,a=Date.now();var u=i&&!s;return s||(s=setTimeout(m,n)),u&&(h=e.apply(c,l),c=l=null),h};return p.clear=function(){s&&(clearTimeout(s),s=null)},p.flush=function(){s&&(h=e.apply(c,l),c=l=null,clearTimeout(s),s=null)},p}Y.debounce=Y;var ce=Y;const de=o.getDefaultExportFromCjs(ce);function Z({form:e,fieldName:n,triggerType:i=null,debounceTime:s=500}){const l=g.useCallback(()=>{e.trigger(n)},[e,n]),c=g.useMemo(()=>de(()=>l(),s),[l,s]),a=g.useMemo(()=>["all","onChange"].includes(i)?c:null,[c,i]),h=g.useMemo(()=>["all","onBlur"].includes(i)?l:null,[i]);return g.useMemo(()=>({onChangeTrigger:a,onBlurTrigger:h}),[a,h])}const ge=({form:e,name:n,label:i,options:s,readonly:l=!1,disabled:c=!1,optionsMap:a,width:h="100%",flex:m,placeholder:p,onSelect:u,parser:f,filter:b,tooltipProps:E={},infoProps:x={},maxHeigthMenu:w,isRequired:R=!1,onRemoveSelected:H,triggerFormField:C=null,displayText:W,...v})=>{const{onChangeTrigger:k}=Z({form:e,fieldName:n,triggerType:C,debounceTime:0}),O={position:"top",...E},L={...x,tooltipProps:{position:"top",maxWidth:"300px",...x==null?void 0:x.tooltipProps}},T=(y,I)=>{let A=y;f&&(A=f==null?void 0:f(y)),I(A),u==null||u(A),k==null||k()},$=g.useMemo(()=>F.valuable(a)?a:Object.fromEntries(s.map(y=>[y.value,y])),[s,a]);return o.jsxRuntimeExports.jsx(o.Container,{width:h,flex:m,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:e.control,render:({field:{onChange:y,value:I},fieldState:{error:A=null}})=>{let j=$[I];return o.jsxRuntimeExports.jsx(K,{label:i,width:"100%",size:"Small",disabled:c,readonly:l,filter:b,errorMessage:A==null?void 0:A.message,placeholder:p,value:j,handleOption:d=>{T(d.value,y)},tooltipProps:O,options:s,maxHeigthMenu:w,infoProps:L,maxHeightMenu:w,isRequired:R,onRemoveSelected:H,displayText:W,...v})}})})},oe=({form:e,name:n,label:i,readonly:s=!1,disabled:l=!1,width:c="100%",height:a="100%",flex:h,placeholder:m,charactersCounter:p=!0,maxlength:u=1e3,resize:f=!0,triggerFormField:b=null,minHeight:E,maxHeight:x,...w})=>{const{onChangeTrigger:R}=Z({form:e,fieldName:n,triggerType:b}),H=(C,W)=>{W(C),R==null||R()};return o.jsxRuntimeExports.jsx(o.Container,{width:c,flex:h,height:a,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:e.control,render:({field:{onChange:C,value:W},fieldState:{error:v=null}})=>o.jsxRuntimeExports.jsx(o.Textarea,{label:i,value:W||"",width:"100%",disabled:l,readonly:s,height:a,minHeight:E,maxHeight:x,errorMessage:v==null?void 0:v.message,placeholder:m,onChange:k=>H(k.target.value,C),charactersCounter:p,maxlength:u,size:"Small",resize:f,...w})})})};oe.displayName="TextareaField";const ue=({form:e,name:n,id:i=n,label:s,readonly:l=!1,disabled:c=!1,afterCheck:a,width:h="100%",formatter:m,parser:p,flex:u,size:f="Medium",triggerFormField:b=null,...E})=>{const{onChangeTrigger:x}=Z({form:e,fieldName:n,triggerType:b,debounceTime:0}),w=(R,H)=>{H(R),a==null||a(R),x==null||x()};return o.jsxRuntimeExports.jsx(o.Container,{width:h,flex:u,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:e.control,render:({field:{onChange:R,value:H},fieldState:{error:C=null}})=>{const W=C==null?void 0:C.message;return W&&console.log("Error on checkbox!",W),o.jsxRuntimeExports.jsx(o.Checkbox,{id:`form-checkbox-${i}`,checked:(m==null?void 0:m(H))??H,name:n,label:s,disabled:c||l,onChange:v=>{w((p==null?void 0:p(v.target.checked,H))??v.target.checked,R)},size:f,...E})}})})},fe=o.qe.ul`
1
+ "use strict";const o=require("./Tooltip.view-7yR4bqF1.cjs"),g=require("react"),t=require("sbwb-ds");require("sbwb-ds-latest");const F=require("./index-BcwQwoIM.cjs"),Q=require("react-hook-form"),ee=350,ae=({title:e,children:n,endAdornment:i=null,marginBottom:s="16px",customStyles:l={},wrapperCustomStyles:c={},animationContainerCustomStyles:a={},hideAdornmentOnCollapse:h=!1,maxHeight:m="none",height:p="fit-content"})=>{const[u,f]=g.useState(!1),[b,E]=g.useState(!0);g.useEffect(()=>{if(h)if(u){const w=setTimeout(()=>E(!1),ee);return()=>clearTimeout(w)}else E(!0)},[u,h]);const x=h&&!b?null:i;return o.jsxRuntimeExports.jsxs(o.Container,{width:"100%",flex:"1",gap:"8px",customStyles:c,children:[o.jsxRuntimeExports.jsx(o.SectionTitle,{title:e,divider:!0,marginBottom:s,collapse:{collapsed:u,setCollapsed:f},endAdornment:x,customStyles:l}),o.jsxRuntimeExports.jsx(o.Container,{gap:"8px",width:"100%",height:p,customStyles:{...a,maxHeight:u?"0":m,transition:`max-height ${ee}ms ease-in-out`},children:n})]})};function Y(e,n,i){var s,l,c,a,h;n==null&&(n=100);function m(){var u=Date.now()-a;u<n&&u>=0?s=setTimeout(m,n-u):(s=null,i||(h=e.apply(c,l),c=l=null))}var p=function(){c=this,l=arguments,a=Date.now();var u=i&&!s;return s||(s=setTimeout(m,n)),u&&(h=e.apply(c,l),c=l=null),h};return p.clear=function(){s&&(clearTimeout(s),s=null)},p.flush=function(){s&&(h=e.apply(c,l),c=l=null,clearTimeout(s),s=null)},p}Y.debounce=Y;var ce=Y;const de=o.getDefaultExportFromCjs(ce);function Z({form:e,fieldName:n,triggerType:i=null,debounceTime:s=500}){const l=g.useCallback(()=>{e.trigger(n)},[e,n]),c=g.useMemo(()=>de(()=>l(),s),[l,s]),a=g.useMemo(()=>["all","onChange"].includes(i)?c:null,[c,i]),h=g.useMemo(()=>["all","onBlur"].includes(i)?l:null,[i]);return g.useMemo(()=>({onChangeTrigger:a,onBlurTrigger:h}),[a,h])}const ge=({form:e,name:n,label:i,options:s,readonly:l=!1,disabled:c=!1,optionsMap:a,width:h="100%",flex:m,placeholder:p,onSelect:u,parser:f,filter:b,tooltipProps:E={},infoProps:x={},maxHeigthMenu:w,isRequired:R=!1,onRemoveSelected:H,triggerFormField:C=null,displayText:W,...v})=>{const{onChangeTrigger:k}=Z({form:e,fieldName:n,triggerType:C,debounceTime:0}),O={position:"top",...E},L={...x,tooltipProps:{position:"top",maxWidth:"300px",...x==null?void 0:x.tooltipProps}},T=(y,I)=>{let A=y;f&&(A=f==null?void 0:f(y)),I(A),u==null||u(A),k==null||k()},$=g.useMemo(()=>F.valuable(a)?a:Object.fromEntries(s.map(y=>[y.value,y])),[s,a]);return o.jsxRuntimeExports.jsx(o.Container,{width:h,flex:m,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:e.control,render:({field:{onChange:y,value:I},fieldState:{error:A=null}})=>{let j=$[I];return o.jsxRuntimeExports.jsx(K,{label:i,width:"100%",size:"Small",disabled:c,readonly:l,filter:b,errorMessage:A==null?void 0:A.message,placeholder:p,value:j,handleOption:d=>{T(d.value,y)},tooltipProps:O,options:s,maxHeigthMenu:w,infoProps:L,maxHeightMenu:w,isRequired:R,onRemoveSelected:H,displayText:W,...v})}})})},oe=({form:e,name:n,label:i,readonly:s=!1,disabled:l=!1,width:c="100%",height:a="100%",flex:h,placeholder:m,charactersCounter:p=!0,maxlength:u=1e3,resize:f=!0,triggerFormField:b=null,minHeight:E,maxHeight:x,...w})=>{const{onChangeTrigger:R}=Z({form:e,fieldName:n,triggerType:b}),H=(C,W)=>{W(C),R==null||R()};return o.jsxRuntimeExports.jsx(o.Container,{width:c,flex:h,height:a,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:e.control,render:({field:{onChange:C,value:W},fieldState:{error:v=null}})=>o.jsxRuntimeExports.jsx(o.Textarea,{label:i,value:W||"",width:"100%",disabled:l,readonly:s,height:a,minHeight:E,maxHeight:x,errorMessage:v==null?void 0:v.message,placeholder:m,onChange:k=>H(k.target.value,C),charactersCounter:p,maxlength:u,size:"Small",resize:f,...w})})})};oe.displayName="TextareaField";const ue=({form:e,name:n,id:i=n,label:s,readonly:l=!1,disabled:c=!1,afterCheck:a,width:h="100%",formatter:m,parser:p,flex:u,size:f="Medium",triggerFormField:b=null,...E})=>{const{onChangeTrigger:x}=Z({form:e,fieldName:n,triggerType:b,debounceTime:0}),w=(R,H)=>{H(R),a==null||a(R),x==null||x()};return o.jsxRuntimeExports.jsx(o.Container,{width:h,flex:u,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:e.control,render:({field:{onChange:R,value:H},fieldState:{error:C=null}})=>{const W=C==null?void 0:C.message;return W&&console.log("Error on checkbox!",W),o.jsxRuntimeExports.jsx(o.Checkbox,{id:`form-checkbox-${i}`,checked:(m==null?void 0:m(H))??H,name:n,label:s,disabled:c||l,onChange:v=>{w((p==null?void 0:p(v.target.checked,H))??v.target.checked,R)},size:f,...E})}})})},fe=o.qe.ul`
2
2
  ${F.resetStyles}
3
3
  position: fixed;
4
4
  margin-top: ${({marginTop:e})=>e};
@@ -118,7 +118,7 @@
118
118
  margin: 0;
119
119
  display: flex;
120
120
  align-self: center;
121
- `,we=(e,n,i=0,s=0,l="left")=>{const[c,a]=g.useState(0),[h,m]=g.useState(),p=g.useRef(null),u=g.useCallback(()=>{if(!e.current||!p.current)return;const f=e.current.getBoundingClientRect(),b=p.current.getBoundingClientRect(),E=window.innerHeight,x=window.innerWidth,w=f.top,R=E-f.bottom,H=R<b.height+s&&w>R;let C;H?(C=f.top-b.height-i,p.current.style.maxHeight=`${w-i}px`):(C=f.bottom+s,p.current.style.maxHeight=`${R-s}px`);let W=f.left;const v=W+b.width-x;v>0&&(W-=v),W<0&&(W=0);const k=x-f.right;Object.assign(p.current.style,{position:"fixed",top:`${C}px`,...l==="left"?{left:`${W}px`}:{right:`${k}px`},width:`${Math.max(f.width,b.width)}px`,overflowY:"auto"})},[i,s,l]);return g.useEffect(()=>{var b;a(0),m((b=e.current)==null?void 0:b.clientWidth),u();const f=()=>u();return window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[e,u]),{highlightedIndex:c,setHighlightedIndex:a,isOptionSelected:f=>f.label===(n==null?void 0:n.label),optionsRef:p,parentWidth:h}},J=g.forwardRef(({selectContainerRef:e,optionsSelect:n,size:i,selectOption:s,value:l,inputValue:c,widthMenu:a,maxHeightMenu:h="180px",menuIsOpen:m,onEnter:p,marginTop:u="4px",iconName:f,iconColor:b,iconPosition:E,topOffset:x=0,bottomOffset:w=0,truncateText:R=!0,menuJustifyContent:H="flex-start",tableActionButton:C,menuLateralPadding:W="8px",menuOptionFlexDirection:v="column",confirmSelection:k,menuAlign:O="left"},L)=>{F.valuable(f)&&(f+="Ant");const{highlightedIndex:T,setHighlightedIndex:$,isOptionSelected:y,optionsRef:I,parentWidth:A}=we(e,l,x,w,O);g.useEffect(()=>{const r=S=>{if(m){if(S.key==="ArrowDown")S.preventDefault(),$(z=>z<n.length-1?z+1:z);else if(S.key==="ArrowUp")S.preventDefault(),$(z=>z>0?z-1:0);else if(S.key==="Enter"&&n[T]){S.preventDefault();const z=n[T];s(z),p&&p(z)}}};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[m,n,T,p,s,k]);const j=r=>typeof r=="string"?r:g.isValidElement(r)&&typeof r.props.children=="string"?r.props.children:String(r),d=(r,S)=>{var M,N;if(E!==S)return null;const z=F.valuable((M=r.tooltipProps)==null?void 0:M.label),B=r.iconName||f||"InfoFill0Sm",P=o.jsxRuntimeExports.jsx($e,{iconPosition:(N=r.tooltipProps)==null?void 0:N.position,id:`iconContainer-${r.value}`,children:o.jsxRuntimeExports.jsx(t.Icon,{iconName:B,color:r.disabled?t.sg.colors.neutralColors.colorNeutralCleanest:y(r)?t.sg.colors.brandColors.colorBrandSoft:b??t.sg.colors.neutralColors.colorNeutralDark})});return z?o.jsxRuntimeExports.jsx(o.Tooltip,{...r==null?void 0:r.tooltipProps,isActive:!0,children:P}):P};return o.jsxRuntimeExports.jsx(fe,{marginTop:u,width:a??`${A}px`,maxHeight:h,height:"fit-content",ref:r=>{I.current=r,typeof L=="function"?L(r):L&&(L.current=r)},"data-testid":"MenuSelect",id:"MenuSelect",children:n.length===0?o.jsxRuntimeExports.jsx(he,{size:i,children:"Sem opções"}):n.map((r,S)=>{var P,M;const z=typeof r.render=="function"?r.render():null,B=j(r.label);if(r.isSection)return o.jsxRuntimeExports.jsx(me,{size:i,children:B},B);{const N=B.toLowerCase().indexOf((c==null?void 0:c.toLowerCase())||"");return o.jsxRuntimeExports.jsxs(be,{isOptionSelected:y(r),highlightedIndex:S===T,onClick:D=>{D.stopPropagation(),r.disabled||(k?o.showConfirm({id:"select-option",title:k.title,description:k.description,icon:k.icon,iconColor:k.iconColor,leftButtonProps:{name:"Cancelar",variant:"tertiary",onClick:()=>{}},rightButtonProps:{name:"Confirmar",variant:"secondary",onClick:()=>s(r)}}):s(r))},onMouseEnter:()=>$(S),disabled:r.disabled,size:i,menuLateralPadding:W,children:[d(r,"left"),o.jsxRuntimeExports.jsxs(xe,{menuOptionFlexDirection:v,menuJustifyContent:H,iconName:f,isOptionSelected:y(r),highlightedIndex:S===T,"data-testid":r.value,size:i,hasDescription:!!r.description,optionValue:r.value,disabled:r.disabled,truncateText:R,tableActionButton:C,children:[o.jsxRuntimeExports.jsxs(Se,{truncateText:!g.isValidElement(r.label)&&R,children:[z,g.isValidElement(r.label)?o.jsxRuntimeExports.jsx("p",{title:((P=r==null?void 0:r.tooltipProps)==null?void 0:P.label)??j(r.label),children:r.label}):o.jsxRuntimeExports.jsx("p",{title:((M=r==null?void 0:r.tooltipProps)==null?void 0:M.label)??B,children:c&&N>=0?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[B.substring(0,N),o.jsxRuntimeExports.jsx(pe,{size:i,children:B.substring(N,N+((c==null?void 0:c.length)||0))}),B.substring(N+((c==null?void 0:c.length)||0))]}):B})]}),r.description&&o.jsxRuntimeExports.jsx("p",{title:r.description,children:r.description})]}),d(r,"right")]},String(r.value))}})})});J.displayName="MenuSelect";const ne=({title:e,iconName:n,onClickIcon:i,width:s,height:l,flex:c,children:a,wrapperCustomStyles:h={},contentCustomStyles:m={},titleCustomStyles:p={}})=>o.jsxRuntimeExports.jsxs(o.Container,{width:s,height:l,flex:c,direction:"vertical",padding:t.sg.spacings.spacingStack.spacingStackSm,customStyles:{backgroundColor:t.sg.colors.backgroundColors.colorBackgroundSnow,border:`1px solid ${t.sg.colors.neutralColors.colorNeutralSoft}`,borderRadius:"8px",...h},children:[o.jsxRuntimeExports.jsxs(o.Container,{width:"100%",direction:"horizontal",customStyles:m,children:[e?o.jsxRuntimeExports.jsx(o.Container,{width:"fit-content",customStyles:p,children:o.jsxRuntimeExports.jsx(o.SectionTitle,{title:e,divider:!1})}):null,n?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(o.Spacer,{size:"auto",direction:"horizontal"}),o.jsxRuntimeExports.jsx(t.Icon,{iconName:n,onClick:()=>i==null?void 0:i(),color:F.valuable(i)?t.sg.colors.neutralColors.colorNeutralDark:t.sg.colors.neutralColors.colorNeutralCloudy,cursorPointer:F.valuable(i)})]}):null]}),o.jsxRuntimeExports.jsx(o.Container,{width:"100%",flex:"1",children:a})]});ne.displayName="Section";const ye=o.qe.div`
121
+ `,we=(e,n,i=0,s=0,l="left")=>{const[c,a]=g.useState(0),[h,m]=g.useState(),p=g.useRef(null),u=g.useCallback(()=>{if(!e.current||!p.current)return;const f=e.current.getBoundingClientRect(),b=p.current.getBoundingClientRect(),E=window.innerHeight,x=window.innerWidth,w=f.top,R=E-f.bottom,H=R<b.height+s&&w>R;let C;H?(C=f.top-b.height-i,p.current.style.maxHeight=`${w-i}px`):(C=f.bottom+s,p.current.style.maxHeight=`${R-s}px`);let W=f.left;const v=W+b.width-x;v>0&&(W-=v),W<0&&(W=0);const k=x-f.right;Object.assign(p.current.style,{position:"fixed",top:`${C}px`,...l==="left"?{left:`${W}px`}:{right:`${k}px`},width:`${Math.max(f.width,b.width)}px`,overflowY:"auto"})},[i,s,l]);return g.useEffect(()=>{var b;a(0),m((b=e.current)==null?void 0:b.clientWidth),u();const f=()=>u();return window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[e,u]),{highlightedIndex:c,setHighlightedIndex:a,isOptionSelected:f=>f.label===(n==null?void 0:n.label),optionsRef:p,parentWidth:h}},J=g.forwardRef(({selectContainerRef:e,optionsSelect:n,size:i,selectOption:s,value:l,inputValue:c,widthMenu:a,maxHeightMenu:h="180px",menuIsOpen:m,onEnter:p,marginTop:u="4px",iconName:f,iconColor:b,iconPosition:E,topOffset:x=0,bottomOffset:w=0,truncateText:R=!0,menuJustifyContent:H="flex-start",tableActionButton:C,menuLateralPadding:W="8px",menuOptionFlexDirection:v="column",confirmSelection:k,menuAlign:O="left"},L)=>{F.valuable(f)&&(f+="Ant");const{highlightedIndex:T,setHighlightedIndex:$,isOptionSelected:y,optionsRef:I,parentWidth:A}=we(e,l,x,w,O);g.useEffect(()=>{const r=S=>{if(m){if(S.key==="ArrowDown")S.preventDefault(),$(z=>z<n.length-1?z+1:z);else if(S.key==="ArrowUp")S.preventDefault(),$(z=>z>0?z-1:0);else if(S.key==="Enter"&&n[T]){S.preventDefault();const z=n[T];s(z),p&&p(z)}}};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[m,n,T,p,s,k]);const j=r=>typeof r=="string"?r:g.isValidElement(r)&&typeof r.props.children=="string"?r.props.children:String(r),d=(r,S)=>{var M,N;if(E!==S)return null;const z=F.valuable((M=r.tooltipProps)==null?void 0:M.label),B=r.iconName||f||"InfoFill0Sm",D=o.jsxRuntimeExports.jsx($e,{iconPosition:(N=r.tooltipProps)==null?void 0:N.position,id:`iconContainer-${r.value}`,children:o.jsxRuntimeExports.jsx(t.Icon,{iconName:B,color:r.disabled?t.sg.colors.neutralColors.colorNeutralCleanest:y(r)?t.sg.colors.brandColors.colorBrandSoft:b??t.sg.colors.neutralColors.colorNeutralDark})});return z?o.jsxRuntimeExports.jsx(o.Tooltip,{...r==null?void 0:r.tooltipProps,isActive:!0,children:D}):D};return o.jsxRuntimeExports.jsx(fe,{marginTop:u,width:a??`${A}px`,maxHeight:h,height:"fit-content",ref:r=>{I.current=r,typeof L=="function"?L(r):L&&(L.current=r)},"data-testid":"MenuSelect",id:"MenuSelect",children:n.length===0?o.jsxRuntimeExports.jsx(he,{size:i,children:"Sem opções"}):n.map((r,S)=>{var D,M;const z=typeof r.render=="function"?r.render():null,B=j(r.label);if(r.isSection)return o.jsxRuntimeExports.jsx(me,{size:i,children:B},B);{const N=B.toLowerCase().indexOf((c==null?void 0:c.toLowerCase())||"");return o.jsxRuntimeExports.jsxs(be,{isOptionSelected:y(r),highlightedIndex:S===T,onClick:P=>{P.stopPropagation(),r.disabled||(k?o.showConfirm({id:"select-option",title:k.title,description:k.description,icon:k.icon,iconColor:k.iconColor,leftButtonProps:{name:"Cancelar",variant:"tertiary",onClick:()=>{}},rightButtonProps:{name:"Confirmar",variant:"secondary",onClick:()=>s(r)}}):s(r))},onMouseEnter:()=>$(S),disabled:r.disabled,size:i,menuLateralPadding:W,children:[d(r,"left"),o.jsxRuntimeExports.jsxs(xe,{menuOptionFlexDirection:v,menuJustifyContent:H,iconName:f,isOptionSelected:y(r),highlightedIndex:S===T,"data-testid":r.value,size:i,hasDescription:!!r.description,optionValue:r.value,disabled:r.disabled,truncateText:R,tableActionButton:C,children:[o.jsxRuntimeExports.jsxs(Se,{truncateText:!g.isValidElement(r.label)&&R,children:[z,g.isValidElement(r.label)?o.jsxRuntimeExports.jsx("p",{title:((D=r==null?void 0:r.tooltipProps)==null?void 0:D.label)??j(r.label),children:r.label}):o.jsxRuntimeExports.jsx("p",{title:((M=r==null?void 0:r.tooltipProps)==null?void 0:M.label)??B,children:c&&N>=0?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[B.substring(0,N),o.jsxRuntimeExports.jsx(pe,{size:i,children:B.substring(N,N+((c==null?void 0:c.length)||0))}),B.substring(N+((c==null?void 0:c.length)||0))]}):B})]}),r.description&&o.jsxRuntimeExports.jsx("p",{title:r.description,children:r.description})]}),d(r,"right")]},String(r.value))}})})});J.displayName="MenuSelect";const ne=({title:e,iconName:n,onClickIcon:i,width:s,height:l,flex:c,children:a,wrapperCustomStyles:h={},contentCustomStyles:m={},titleCustomStyles:p={}})=>o.jsxRuntimeExports.jsxs(o.Container,{width:s,height:l,flex:c,direction:"vertical",padding:t.sg.spacings.spacingStack.spacingStackSm,customStyles:{backgroundColor:t.sg.colors.backgroundColors.colorBackgroundSnow,border:`1px solid ${t.sg.colors.neutralColors.colorNeutralSoft}`,borderRadius:"8px",...h},children:[o.jsxRuntimeExports.jsxs(o.Container,{width:"100%",direction:"horizontal",customStyles:m,children:[e?o.jsxRuntimeExports.jsx(o.Container,{width:"fit-content",customStyles:p,children:o.jsxRuntimeExports.jsx(o.SectionTitle,{title:e,divider:!1})}):null,n?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(o.Spacer,{size:"auto",direction:"horizontal"}),o.jsxRuntimeExports.jsx(t.Icon,{iconName:n,onClick:()=>i==null?void 0:i(),color:F.valuable(i)?t.sg.colors.neutralColors.colorNeutralDark:t.sg.colors.neutralColors.colorNeutralCloudy,cursorPointer:F.valuable(i)})]}):null]}),o.jsxRuntimeExports.jsx(o.Container,{width:"100%",flex:"1",children:a})]});ne.displayName="Section";const ye=o.qe.div`
122
122
  ${F.resetStyles}
123
123
  display: flex;
124
124
  flex-direction: column;
@@ -202,7 +202,7 @@
202
202
  font-style: ${({isDisplayText:e})=>e?"italic":"normal"};
203
203
  }
204
204
  `,Re=o.qe.span`
205
- color: ${t.sg.colors.neutralColors.colorNeutralCleanest};
205
+ color: ${t.sg.colors.neutralColors.colorNeutralCloudy};
206
206
  font-size: ${({size:e,variant:n})=>n==="default"?e==="Small"?t.sg.fonts.fontSize.fontSizeBodyMd:t.sg.fonts.fontSize.fontSizeBodyLg:e==="Small"?t.sg.fonts.fontSize.fontSizeBodySm:t.sg.fonts.fontSize.fontSizeBodyMd};
207
207
  font-family: ${t.sg.fonts.fontFamily.fontFamilyPrimary};
208
208
  font-weight: ${t.sg.fonts.fontWeight.fontWeightRegular};
@@ -236,8 +236,7 @@
236
236
  font-weight: ${t.sg.fonts.fontWeight.fontWeightRegular};
237
237
  font-family: ${t.sg.fonts.fontFamily.fontFamilyPrimary};
238
238
  line-height: ${t.sg.fonts.lineHeight.lineHeightSm(t.sg.fonts.fontSize.fontSizeBodyMd)};
239
- color: ${t.sg.colors.neutralColors.colorNeutralCloudy};
240
- margin-bottom: ${t.sg.spacings.spacingStack.spacingStackNano};
239
+ color: ${t.sg.colors.neutralColors.colorNeutralDark};
241
240
  `,Be=o.qe.label`
242
241
  font-family: ${t.sg.fonts.fontFamily.fontFamilyPrimary};
243
242
  font-size: ${t.sg.fonts.fontSize.fontSizeBodyMd};
@@ -258,7 +257,7 @@
258
257
  color: ${t.sg.colors.neutralColors.colorNeutralDark};
259
258
  margin-top: ${t.sg.spacings.spacingInline.spacingInlineNano};
260
259
  width: 100%;
261
- `,Ie=(e,{value:n,options:i})=>{const[s,l]=g.useState(!1),[c,a]=g.useState(!1),[h,m]=g.useState(""),[p,u]=g.useState(i),f=g.useRef(null),b=g.useRef(null),E=g.useRef(null),x=g.useRef(null);g.useEffect(()=>{const C=()=>{a(!1)};return window.addEventListener("scroll",C,{passive:!0}),window.addEventListener("resize",C,{passive:!0}),()=>{window.removeEventListener("scroll",C),window.removeEventListener("resize",C)}},[]);function w(C){m(""),a(!1),l(!0),E!=null&&E.current&&E.current.focus(),C!==n&&e(C)}const R=C=>{if(C){const W=new RegExp(C,"i"),v=i.filter(k=>W.exec(k.label));u(v)}else u(i)};function H(C){return!C}return{isOpen:s,setIsOpen:l,expanded:c,setExpanded:a,inputValue:h,setInputValue:m,optionsSelect:p,setOptionSelect:u,selectContainerRef:f,containerRef:b,inputContainerRef:E,optionsRef:x,selectOption:w,handlerFilterOptions:R,isValue:H}},K=g.forwardRef(({value:e,handleOption:n,options:i,filter:s=!0,placeholder:l,label:c,size:a="Medium",width:h="100%",disabled:m,helpText:p,readonly:u,errorMessage:f,tooltipProps:b={},onBlur:E,onEnter:x,variant:w="default",infoProps:R={},maxHeightMenu:H,isRequired:C=!1,onRemoveSelected:W,displayText:v,displayTextProps:k={}},O)=>{const{isOpen:L,setIsOpen:T,expanded:$,setExpanded:y,inputValue:I,setInputValue:A,optionsSelect:j,selectContainerRef:d,containerRef:r,inputContainerRef:S,selectOption:z,setOptionSelect:B,handlerFilterOptions:P,isValue:M}=Ie(n,{value:e,options:i}),N=!!f,D={label:f,...b,wrapperWidth:"auto",isActive:N,isErrorTooltip:!0},q={...R,size:a},_=o.jsxRuntimeExports.jsx(t.Icon,{iconName:`Close${a==="Small"?"Sm":"Ant"}`,onClick:X=>{X.stopPropagation(),W(e)}}),V=o.jsxRuntimeExports.jsx(t.Icon,{iconName:`ExpandLess${a==="Small"?"Sm":"Ant"}`}),le=o.jsxRuntimeExports.jsx(t.Icon,{iconName:`ExpandMore${a==="Small"?"Sm":"Ant"}`});return o.jsxRuntimeExports.jsxs(ye,{ref:d,width:h,size:a,disabled:m,readonly:u,children:[c&&o.jsxRuntimeExports.jsxs(Ee,{children:[o.jsxRuntimeExports.jsxs(ze,{"data-testid":"label",ref:O,children:[c,C&&!m?o.jsxRuntimeExports.jsx(Be,{children:" *"}):null]}),((q==null?void 0:q.message)||(q==null?void 0:q.render))&&o.jsxRuntimeExports.jsx(o.Info,{...q})]}),o.jsxRuntimeExports.jsx(o.Tooltip,{...D,children:o.jsxRuntimeExports.jsxs(je,{hasError:N,readonly:u,ref:r,onBlur:()=>{setTimeout(()=>{(L||$)&&S.current!==document.activeElement&&(E&&E(e),T(!1),y(!1))},250)},onClick:()=>{!m&&!u&&(L&&!$?(y(!0),S!=null&&S.current&&S.current.focus()):!L&&!$?(T(!0),y(!0),S!=null&&S.current&&S.current.focus()):(T(!1),y(!1),S!=null&&S.current&&S.current.blur()),!I&&B(i))},tabIndex:0,width:h,size:a,isOpen:L||$,"data-testid":"select",disabled:m,helpText:p,variant:w,children:[o.jsxRuntimeExports.jsxs(Ce,{children:[F.valuable(v)?o.jsxRuntimeExports.jsx(te,{size:a,variant:w,isDisplayText:!0,children:o.jsxRuntimeExports.jsx("p",{title:e==null?void 0:e.label,...k,children:v})}):o.jsxRuntimeExports.jsxs(te,{size:a,variant:w,children:[l&&M(e)&&!I&&!L?o.jsxRuntimeExports.jsx(Re,{size:a,variant:w,children:l}):null,(e==null?void 0:e.label)&&o.jsxRuntimeExports.jsx("p",{title:(e==null?void 0:e.hint)??(e==null?void 0:e.label),children:e==null?void 0:e.label})]}),s&&!F.valuable(v)&&o.jsxRuntimeExports.jsx(ke,{ref:S,value:I,onChange:X=>{A(X.target.value),X.target.value.length>0&&(T(!0),y(!0)),P(X.target.value)},readOnly:u,width:I.length,size:a,disabled:m,variant:w})]}),W&&e?_:null,$?V:le,$&&o.jsxRuntimeExports.jsx(J,{onEnter:X=>{n&&n(X),T(!1),y(!1),x&&x(X)},menuIsOpen:L,selectContainerRef:d,value:e,optionsSelect:j,selectOption:z,size:a,inputValue:I,maxHeightMenu:H})]})}),p&&o.jsxRuntimeExports.jsx(Ne,{size:a,children:p})]})});K.displayName="Select";const re=o.We`
260
+ `,Ie=(e,{value:n,options:i})=>{const[s,l]=g.useState(!1),[c,a]=g.useState(!1),[h,m]=g.useState(""),[p,u]=g.useState(i),f=g.useRef(null),b=g.useRef(null),E=g.useRef(null),x=g.useRef(null);g.useEffect(()=>{const C=()=>{a(!1)};return window.addEventListener("scroll",C,{passive:!0}),window.addEventListener("resize",C,{passive:!0}),()=>{window.removeEventListener("scroll",C),window.removeEventListener("resize",C)}},[]);function w(C){m(""),a(!1),l(!0),E!=null&&E.current&&E.current.focus(),C!==n&&e(C)}const R=C=>{if(C){const W=new RegExp(C,"i"),v=i.filter(k=>W.exec(k.label));u(v)}else u(i)};function H(C){return!C}return{isOpen:s,setIsOpen:l,expanded:c,setExpanded:a,inputValue:h,setInputValue:m,optionsSelect:p,setOptionSelect:u,selectContainerRef:f,containerRef:b,inputContainerRef:E,optionsRef:x,selectOption:w,handlerFilterOptions:R,isValue:H}},K=g.forwardRef(({value:e,handleOption:n,options:i,filter:s=!0,placeholder:l,label:c,size:a="Medium",width:h="100%",disabled:m,helpText:p,readonly:u,errorMessage:f,tooltipProps:b={},onBlur:E,onEnter:x,variant:w="default",infoProps:R={},maxHeightMenu:H,isRequired:C=!1,onRemoveSelected:W,displayText:v,displayTextProps:k={}},O)=>{const{isOpen:L,setIsOpen:T,expanded:$,setExpanded:y,inputValue:I,setInputValue:A,optionsSelect:j,selectContainerRef:d,containerRef:r,inputContainerRef:S,selectOption:z,setOptionSelect:B,handlerFilterOptions:D,isValue:M}=Ie(n,{value:e,options:i}),N=!!f,P={label:f,...b,wrapperWidth:"auto",isActive:N,isErrorTooltip:!0},q={...R,size:a},_=o.jsxRuntimeExports.jsx(t.Icon,{iconName:`Close${a==="Small"?"Sm":"Ant"}`,onClick:X=>{X.stopPropagation(),W(e)}}),V=o.jsxRuntimeExports.jsx(t.Icon,{iconName:`ExpandLess${a==="Small"?"Sm":"Ant"}`}),le=o.jsxRuntimeExports.jsx(t.Icon,{iconName:`ExpandMore${a==="Small"?"Sm":"Ant"}`});return o.jsxRuntimeExports.jsxs(ye,{ref:d,width:h,size:a,disabled:m,readonly:u,children:[c&&o.jsxRuntimeExports.jsxs(Ee,{children:[o.jsxRuntimeExports.jsxs(ze,{"data-testid":"label",ref:O,children:[c,C&&!m?o.jsxRuntimeExports.jsx(Be,{children:" *"}):null]}),((q==null?void 0:q.message)||(q==null?void 0:q.render))&&o.jsxRuntimeExports.jsx(o.Info,{...q})]}),o.jsxRuntimeExports.jsx(o.Tooltip,{...P,children:o.jsxRuntimeExports.jsxs(je,{hasError:N,readonly:u,ref:r,onBlur:()=>{setTimeout(()=>{(L||$)&&S.current!==document.activeElement&&(E&&E(e),T(!1),y(!1))},250)},onClick:()=>{!m&&!u&&(L&&!$?(y(!0),S!=null&&S.current&&S.current.focus()):!L&&!$?(T(!0),y(!0),S!=null&&S.current&&S.current.focus()):(T(!1),y(!1),S!=null&&S.current&&S.current.blur()),!I&&B(i))},tabIndex:0,width:h,size:a,isOpen:L||$,"data-testid":"select",disabled:m,helpText:p,variant:w,children:[o.jsxRuntimeExports.jsxs(Ce,{children:[F.valuable(v)?o.jsxRuntimeExports.jsx(te,{size:a,variant:w,isDisplayText:!0,children:o.jsxRuntimeExports.jsx("p",{title:e==null?void 0:e.label,...k,children:v})}):o.jsxRuntimeExports.jsxs(te,{size:a,variant:w,children:[l&&M(e)&&!I&&!L?o.jsxRuntimeExports.jsx(Re,{size:a,variant:w,children:l}):null,(e==null?void 0:e.label)&&o.jsxRuntimeExports.jsx("p",{title:(e==null?void 0:e.hint)??(e==null?void 0:e.label),children:e==null?void 0:e.label})]}),s&&!F.valuable(v)&&o.jsxRuntimeExports.jsx(ke,{ref:S,value:I,onChange:X=>{A(X.target.value),X.target.value.length>0&&(T(!0),y(!0)),D(X.target.value)},readOnly:u,width:I.length,size:a,disabled:m,variant:w})]}),W&&e?_:null,$?V:le,$&&o.jsxRuntimeExports.jsx(J,{onEnter:X=>{n&&n(X),T(!1),y(!1),x&&x(X)},menuIsOpen:L,selectContainerRef:d,value:e,optionsSelect:j,selectOption:z,size:a,inputValue:I,maxHeightMenu:H})]})}),p&&o.jsxRuntimeExports.jsx(Ne,{size:a,children:p})]})});K.displayName="Select";const re=o.We`
262
261
  from {
263
262
  transform: rotate(0deg);
264
263
  }
@@ -416,7 +415,7 @@
416
415
  border-right: ${({selected:n})=>n?"none":`1px solid ${t.sg.colors.neutralColors.colorNeutralSoft}`};
417
416
  `}
418
417
  cursor: pointer;
419
- `;const Pe=o.qe.div`
418
+ `;const De=o.qe.div`
420
419
  display: flex;
421
420
  min-width: 0;
422
421
  height: 100%;
@@ -428,13 +427,13 @@
428
427
  height: 100%;
429
428
  background-color: 'transparent';
430
429
  overflow: hidden;
431
- `;const De=o.qe.div`
430
+ `;const Pe=o.qe.div`
432
431
  flex: 1;
433
432
  width: 100%;
434
433
  background-color: 'transparent';
435
434
  border-right: 1px solid ${t.sg.colors.neutralColors.colorNeutralSoft};
436
435
  overflow: hidden;
437
- `,Oe=({width:e="100%",height:n="fit-content",flex:i,backgroundColor:s="white",options:l=[],heightItems:c="60px",widthItems:a="155px",emptyProps:h={title:"Nenhum dado a ser mostrado",body:null},customWrapperStyles:m={},customItemStyles:p={}})=>{const[u,f]=g.useState(l[0]||null),b=g.useRef(null),E=g.useRef(null);return g.useEffect(()=>{const x=b.current,w=E.current,R=()=>{x&&w&&(w.scrollTop=x.scrollTop)};return x==null||x.addEventListener("scroll",R),()=>{x==null||x.removeEventListener("scroll",R)}},[]),g.useEffect(()=>{f(l[(l==null?void 0:l.length)-1]||null)},[l==null?void 0:l.length]),(l==null?void 0:l.length)===0?o.jsxRuntimeExports.jsx(o.Empty,{title:h.title,body:h.body,flex:"1",mode:"table"}):o.jsxRuntimeExports.jsxs(o.Container,{width:e,height:n,flex:i,backgroundColor:s,direction:"horizontal",customStyles:{border:`1px solid ${t.sg.colors.neutralColors.colorNeutralSoft}`,borderRadius:t.sg.borders.borderRadius.borderRadiusSm,...m},children:[o.jsxRuntimeExports.jsxs(Te,{ref:b,widthItems:a,children:[l==null?void 0:l.map((x,w)=>o.jsxRuntimeExports.jsx(qe,{selected:(u==null?void 0:u.key)===x.key,onClick:()=>f(x),withBorderRight:!0,heightItems:c,customStyles:p,children:x.item},w)),o.jsxRuntimeExports.jsx(De,{})]}),o.jsxRuntimeExports.jsx(Pe,{children:u&&(u==null?void 0:u.contentItem)})]})},se=o.Ae`
436
+ `,Oe=({width:e="100%",height:n="fit-content",flex:i,backgroundColor:s="white",options:l=[],heightItems:c="60px",widthItems:a="155px",emptyProps:h={title:"Nenhum dado a ser mostrado",body:null},customWrapperStyles:m={},customItemStyles:p={}})=>{const[u,f]=g.useState(l[0]||null),b=g.useRef(null),E=g.useRef(null);return g.useEffect(()=>{const x=b.current,w=E.current,R=()=>{x&&w&&(w.scrollTop=x.scrollTop)};return x==null||x.addEventListener("scroll",R),()=>{x==null||x.removeEventListener("scroll",R)}},[]),g.useEffect(()=>{f(l[(l==null?void 0:l.length)-1]||null)},[l==null?void 0:l.length]),(l==null?void 0:l.length)===0?o.jsxRuntimeExports.jsx(o.Empty,{title:h.title,body:h.body,flex:"1",mode:"table"}):o.jsxRuntimeExports.jsxs(o.Container,{width:e,height:n,flex:i,backgroundColor:s,direction:"horizontal",customStyles:{border:`1px solid ${t.sg.colors.neutralColors.colorNeutralSoft}`,borderRadius:t.sg.borders.borderRadius.borderRadiusSm,...m},children:[o.jsxRuntimeExports.jsxs(Te,{ref:b,widthItems:a,children:[l==null?void 0:l.map((x,w)=>o.jsxRuntimeExports.jsx(qe,{selected:(u==null?void 0:u.key)===x.key,onClick:()=>f(x),withBorderRight:!0,heightItems:c,customStyles:p,children:x.item},w)),o.jsxRuntimeExports.jsx(Pe,{})]}),o.jsxRuntimeExports.jsx(De,{children:u&&(u==null?void 0:u.contentItem)})]})},se=o.Ae`
438
437
  svg:not([color]):not([data-testid='icon']) {
439
438
  path {
440
439
  fill: ${t.sg.colors.neutralColors.colorNeutralDarkest};
@@ -594,4 +593,4 @@
594
593
  &:hover {
595
594
  cursor: ${e=>e.isClickable?"pointer":"default"};
596
595
  }
597
- `;function Ve(e){return n=>typeof e=="string"?n[e]:typeof e=="function"?e(n):(console.warn("Please, setup a rowKey for table."),JSON.stringify(n))}function Ye({id:e,rowKey:n="id",size:i="Small",onRowClick:s,fit:l=!1,maxHeight:c="40rem",columns:a,dataSource:h,columnsTextSize:m=i,emptyProps:p={width:"100%",height:"100%",title:"Nenhum dado a ser mostrado.",mode:"table",borders:!0,backgroundColor:t.sg.colors.backgroundColors.colorBackgroundSnow},selectedRow:u=!1,hideHeader:f=!1,withBorder:b=!0,withBorderRadius:E=!0,striped:x=!1,borderRadius:w=t.sg.borders.borderRadius.borderRadiusSm}){const R=g.useMemo(()=>Ve(n),[n]),[H,C]=g.useState(null),W=g.useRef(null),v=g.useRef(null),[k,O]=g.useState(a);g.useLayoutEffect(()=>{if(!v.current||a.length===0){O(a);return}const $=()=>{var P;const I=((P=v.current)==null?void 0:P.clientWidth)||0;if(I===0)return;let A=0,j=0;const d=[],r=[];a.forEach(M=>{const N=Number(M.flex);M.width?A+=parseInt(M.width,10)||0:M.flex&&N>0?(j+=N,d.push(M)):r.push(M)});const S=I-A,z="80";let B=[...a];if(S>0){if(d.length>0){const M=S/j;B=a.map(N=>{const D=Number(N.flex);if(D&&D>0){const q=parseInt(N.minWidth||z,10),_=D*M,V=Math.max(_,q);return{...N,width:`${Math.floor(V)}px`}}return!N.width&&!D?{...N,width:N.minWidth||`${z}px`}:N})}else if(r.length>0){const M=S/r.length;B=a.map(N=>{const D=Number(N.flex);if(!N.width&&!D){const q=parseInt(N.minWidth||z,10),_=Math.max(M,q);return{...N,width:`${Math.floor(_)}px`}}return N})}}else B=a.map(M=>M.width?M:{...M,width:M.minWidth||`${z}px`});O(B)};$();const y=new ResizeObserver($);return y.observe(v.current),()=>y.disconnect()},[a]),g.useEffect(()=>{const $=y=>{W.current&&!W.current.contains(y.target)&&C(null)};return document.addEventListener("mousedown",$),()=>{document.removeEventListener("mousedown",$)}},[]);const L=g.useMemo(()=>k?k.some($=>$.mergeHeaderId&&$.mergeHeaderLabel):!1,[k]),T=g.useMemo(()=>{var A,j;if(f||!k||k.length===0)return null;if(!L)return o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:1,borderRadius:w,children:k.map(d=>{var r;return o.jsxRuntimeExports.jsx(G,{width:d.width,minWidth:d.minWidth,maxWidth:d.maxWidth,horizontalAlign:d.horizontalAlign,size:i,columnsTextSize:m,withBorder:b,headerAlign:d.headerAlign,children:((r=d.columnRender)==null?void 0:r.call(d,h))||o.jsxRuntimeExports.jsx("span",{title:d.label,children:d.label})},d.dataIndex)})});const $=[],y=[];let I=0;for(;I<k.length;){const d=k[I];if(d.mergeHeaderId&&d.mergeHeaderLabel){let r=0;const S=d.mergeHeaderId;for(let z=I;z<k.length&&k[z].mergeHeaderId===S;z++)r++;$.push(o.jsxRuntimeExports.jsx(G,{colSpan:r,horizontalAlign:"center",size:i,columnsTextSize:m,withBorder:b,width:d.width,minWidth:d.minWidth,maxWidth:d.maxWidth,headerAlign:d.headerAlign,isTopRow:!0,children:o.jsxRuntimeExports.jsx("span",{title:d.mergeHeaderLabel,children:d.mergeHeaderLabel})},`${d.mergeHeaderId}-merged`));for(let z=0;z<r;z++){const B=k[I+z];y.push(o.jsxRuntimeExports.jsx(G,{width:B.width,minWidth:B.minWidth,maxWidth:B.maxWidth,horizontalAlign:B.horizontalAlign,size:i,columnsTextSize:m,withBorder:b,headerAlign:d.headerAlign,children:((A=B.columnRender)==null?void 0:A.call(B,h))||o.jsxRuntimeExports.jsx("span",{title:B.label,children:B.label})},B.dataIndex+"-individual"))}I+=r}else $.push(o.jsxRuntimeExports.jsx(G,{rowSpan:2,width:d.width,minWidth:d.minWidth,maxWidth:d.maxWidth,horizontalAlign:d.horizontalAlign,size:i,columnsTextSize:m,withBorder:b,headerAlign:d.headerAlign,isTopRow:!0,children:((j=d.columnRender)==null?void 0:j.call(d,h))||o.jsxRuntimeExports.jsx("span",{title:d.label,children:d.label})},d.dataIndex)),I++}return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:2,borderRadius:w,children:$}),y.length>0&&o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:2,borderRadius:w,children:y})]})},[k,f,i,m,L]);return!h||h.length===0?o.jsxRuntimeExports.jsx(o.Empty,{backgroundColor:t.sg.colors.backgroundColors.colorBackgroundSnow,borders:!0,mode:"table",...p}):o.jsxRuntimeExports.jsx(Xe,{maxHeight:c,withBorderRadius:E,ref:v,borderRadius:w,children:o.jsxRuntimeExports.jsxs(_e,{id:e,ref:W,children:[o.jsxRuntimeExports.jsx("thead",{children:T}),o.jsxRuntimeExports.jsx("tbody",{style:{width:"100%"},children:h==null?void 0:h.map(($,y,I)=>{const A=R($);return o.jsxRuntimeExports.jsx(U,{isLast:y===I.length-1,fit:l,size:i,withBorder:b,isSelected:A===H&&u,striped:x&&y%2!==0,borderRadius:w,children:k.map(j=>{var d,r,S;return o.jsxRuntimeExports.jsx(Je,{width:j.width,minWidth:j.minWidth,maxWidth:j.maxWidth,size:i,isClickable:F.valuable(s),onClick:()=>{s&&s($,j,y),u&&C(H===A?null:A)},horizontalAlign:j.horizontalAlign,verticalAlign:j.verticalAlign,rowPadding:j.rowPadding,withBorder:b,isLast:y===I.length-1,backgroundColor:(d=j.paint)==null?void 0:d.call(j,$[j.dataIndex],$,y,I),children:((r=j.render)==null?void 0:r.call(j,$[j.dataIndex],$,y,I))||o.jsxRuntimeExports.jsx("span",{title:$[j.dataIndex],style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",...(S=j.rowCss)==null?void 0:S.call(j,$)},children:$[j.dataIndex]})||""},`${A}::${j.dataIndex}`)})},A)})})]})})}exports.CheckboxField=ue;exports.CollapseSection=ae;exports.MenuSelect=J;exports.Section=ne;exports.Select=K;exports.SelectButton=Le;exports.SelectField=ge;exports.TabInfo=Oe;exports.Table=Ye;exports.TextareaField=oe;
596
+ `;function Ve(e){return n=>typeof e=="string"?n[e]:typeof e=="function"?e(n):(console.warn("Please, setup a rowKey for table."),JSON.stringify(n))}function Ye({id:e,rowKey:n="id",size:i="Small",onRowClick:s,fit:l=!1,maxHeight:c="40rem",columns:a,dataSource:h,columnsTextSize:m=i,emptyProps:p={width:"100%",height:"100%",title:"Nenhum dado a ser mostrado.",mode:"table",borders:!0,backgroundColor:t.sg.colors.backgroundColors.colorBackgroundSnow},selectedRow:u=!1,hideHeader:f=!1,withBorder:b=!0,withBorderRadius:E=!0,striped:x=!1,borderRadius:w=t.sg.borders.borderRadius.borderRadiusSm}){const R=g.useMemo(()=>Ve(n),[n]),[H,C]=g.useState(null),W=g.useRef(null),v=g.useRef(null),[k,O]=g.useState(a);g.useLayoutEffect(()=>{if(!v.current||a.length===0){O(a);return}const $=()=>{var D;const I=((D=v.current)==null?void 0:D.clientWidth)||0;if(I===0)return;let A=0,j=0;const d=[],r=[];a.forEach(M=>{const N=Number(M.flex);M.width?A+=parseInt(M.width,10)||0:M.flex&&N>0?(j+=N,d.push(M)):r.push(M)});const S=I-A,z="80";let B=[...a];if(S>0){if(d.length>0){const M=S/j;B=a.map(N=>{const P=Number(N.flex);if(P&&P>0){const q=parseInt(N.minWidth||z,10),_=P*M,V=Math.max(_,q);return{...N,width:`${Math.floor(V)}px`}}return!N.width&&!P?{...N,width:N.minWidth||`${z}px`}:N})}else if(r.length>0){const M=S/r.length;B=a.map(N=>{const P=Number(N.flex);if(!N.width&&!P){const q=parseInt(N.minWidth||z,10),_=Math.max(M,q);return{...N,width:`${Math.floor(_)}px`}}return N})}}else B=a.map(M=>M.width?M:{...M,width:M.minWidth||`${z}px`});O(B)};$();const y=new ResizeObserver($);return y.observe(v.current),()=>y.disconnect()},[a]),g.useEffect(()=>{const $=y=>{W.current&&!W.current.contains(y.target)&&C(null)};return document.addEventListener("mousedown",$),()=>{document.removeEventListener("mousedown",$)}},[]);const L=g.useMemo(()=>k?k.some($=>$.mergeHeaderId&&$.mergeHeaderLabel):!1,[k]),T=g.useMemo(()=>{var A,j;if(f||!k||k.length===0)return null;if(!L)return o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:1,borderRadius:w,children:k.map(d=>{var r;return o.jsxRuntimeExports.jsx(G,{width:d.width,minWidth:d.minWidth,maxWidth:d.maxWidth,horizontalAlign:d.horizontalAlign,size:i,columnsTextSize:m,withBorder:b,headerAlign:d.headerAlign,children:((r=d.columnRender)==null?void 0:r.call(d,h))||o.jsxRuntimeExports.jsx("span",{title:d.label,children:d.label})},d.dataIndex)})});const $=[],y=[];let I=0;for(;I<k.length;){const d=k[I];if(d.mergeHeaderId&&d.mergeHeaderLabel){let r=0;const S=d.mergeHeaderId;for(let z=I;z<k.length&&k[z].mergeHeaderId===S;z++)r++;$.push(o.jsxRuntimeExports.jsx(G,{colSpan:r,horizontalAlign:"center",size:i,columnsTextSize:m,withBorder:b,width:d.width,minWidth:d.minWidth,maxWidth:d.maxWidth,headerAlign:d.headerAlign,isTopRow:!0,children:o.jsxRuntimeExports.jsx("span",{title:d.mergeHeaderLabel,children:d.mergeHeaderLabel})},`${d.mergeHeaderId}-merged`));for(let z=0;z<r;z++){const B=k[I+z];y.push(o.jsxRuntimeExports.jsx(G,{width:B.width,minWidth:B.minWidth,maxWidth:B.maxWidth,horizontalAlign:B.horizontalAlign,size:i,columnsTextSize:m,withBorder:b,headerAlign:d.headerAlign,children:((A=B.columnRender)==null?void 0:A.call(B,h))||o.jsxRuntimeExports.jsx("span",{title:B.label,children:B.label})},B.dataIndex+"-individual"))}I+=r}else $.push(o.jsxRuntimeExports.jsx(G,{rowSpan:2,width:d.width,minWidth:d.minWidth,maxWidth:d.maxWidth,horizontalAlign:d.horizontalAlign,size:i,columnsTextSize:m,withBorder:b,headerAlign:d.headerAlign,isTopRow:!0,children:((j=d.columnRender)==null?void 0:j.call(d,h))||o.jsxRuntimeExports.jsx("span",{title:d.label,children:d.label})},d.dataIndex)),I++}return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:2,borderRadius:w,children:$}),y.length>0&&o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:2,borderRadius:w,children:y})]})},[k,f,i,m,L]);return!h||h.length===0?o.jsxRuntimeExports.jsx(o.Empty,{backgroundColor:t.sg.colors.backgroundColors.colorBackgroundSnow,borders:!0,mode:"table",...p}):o.jsxRuntimeExports.jsx(Xe,{maxHeight:c,withBorderRadius:E,ref:v,borderRadius:w,children:o.jsxRuntimeExports.jsxs(_e,{id:e,ref:W,children:[o.jsxRuntimeExports.jsx("thead",{children:T}),o.jsxRuntimeExports.jsx("tbody",{style:{width:"100%"},children:h==null?void 0:h.map(($,y,I)=>{const A=R($);return o.jsxRuntimeExports.jsx(U,{isLast:y===I.length-1,fit:l,size:i,withBorder:b,isSelected:A===H&&u,striped:x&&y%2!==0,borderRadius:w,children:k.map(j=>{var d,r,S;return o.jsxRuntimeExports.jsx(Je,{width:j.width,minWidth:j.minWidth,maxWidth:j.maxWidth,size:i,isClickable:F.valuable(s),onClick:()=>{s&&s($,j,y),u&&C(H===A?null:A)},horizontalAlign:j.horizontalAlign,verticalAlign:j.verticalAlign,rowPadding:j.rowPadding,withBorder:b,isLast:y===I.length-1,backgroundColor:(d=j.paint)==null?void 0:d.call(j,$[j.dataIndex],$,y,I),children:((r=j.render)==null?void 0:r.call(j,$[j.dataIndex],$,y,I))||o.jsxRuntimeExports.jsx("span",{title:$[j.dataIndex],style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",...(S=j.rowCss)==null?void 0:S.call(j,$)},children:$[j.dataIndex]})||""},`${A}::${j.dataIndex}`)})},A)})})]})})}exports.CheckboxField=ue;exports.CollapseSection=ae;exports.MenuSelect=J;exports.Section=ne;exports.Select=K;exports.SelectButton=Le;exports.SelectField=ge;exports.TabInfo=Oe;exports.Table=Ye;exports.TextareaField=oe;
@@ -0,0 +1 @@
1
+ "use strict";const t=require("./Tooltip.view-7yR4bqF1.cjs"),j=require("sbwb-ds"),a=require("react"),h=require("./index-BcwQwoIM.cjs"),p=({message:e})=>t.jsxRuntimeExports.jsxs(t.ErrorMessage,{children:[t.jsxRuntimeExports.jsx(t.InfoFill_default,{color:j.sg.colors.feedbackColors.colorFeedbackError}),e]}),w=({id:e,label:c,size:o="Medium",disabled:r=!1,onChange:x,checked:s})=>{const[n,u]=a.useState(s??!1);return a.useEffect(()=>{u(i=>s??!i)},[s]),t.jsxRuntimeExports.jsxs(t.SwitchContainer,{id:`switch-${e}`,"data-testid":"switch-component",children:[t.jsxRuntimeExports.jsxs(t.SwitchWrapper,{size:o,disabled:r,checked:s??n,"data-testid":"switch-wrapper",children:[t.jsxRuntimeExports.jsx(t.SwitchToggle,{type:"checkbox",disabled:r,checked:s??n,"data-testid":"switch-toggle",onChange:i=>{const{target:{checked:l}}=i;h.valuable(l)&&u(l),x==null||x(i)}}),t.jsxRuntimeExports.jsx(t.SwitchButton,{disabled:r,size:o})]}),t.jsxRuntimeExports.jsx(t.SwitchLabel,{size:o,disabled:r,children:c})]})},E=({text:e,color:c})=>t.jsxRuntimeExports.jsx(t.Title,{color:c,children:e});exports.ErrorMessage=p;exports.Switch=w;exports.Title=E;