@ufal-lccv/gpsub-ds 0.0.6-alpha-0 → 0.0.6-alpha-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./Checkbox.view-CDJhnIP4.cjs"),g=require("react"),e=require("sbwb-ds"),F=require("./index-BcwQwoIM.cjs"),Q=require("react-hook-form");function Y(t,n,i){var r,d,a,l,h;n==null&&(n=100);function f(){var x=Date.now()-l;x<n&&x>=0?r=setTimeout(f,n-x):(r=null,i||(h=t.apply(a,d),a=d=null))}var m=function(){a=this,d=arguments,l=Date.now();var x=i&&!r;return r||(r=setTimeout(f,n)),x&&(h=t.apply(a,d),a=d=null),h};return m.clear=function(){r&&(clearTimeout(r),r=null)},m.flush=function(){r&&(h=t.apply(a,d),a=d=null,clearTimeout(r),r=null)},m}Y.debounce=Y;var le=Y;const ae=o.getDefaultExportFromCjs(le);function Z({form:t,fieldName:n,triggerType:i=null,debounceTime:r=500}){const d=g.useCallback(()=>{t.trigger(n)},[t,n]),a=g.useMemo(()=>ae(()=>d(),r),[d,r]),l=g.useMemo(()=>["all","onChange"].includes(i)?a:null,[a,i]),h=g.useMemo(()=>["all","onBlur"].includes(i)?d:null,[i]);return g.useMemo(()=>({onChangeTrigger:l,onBlurTrigger:h}),[l,h])}const ce=({form:t,name:n,label:i,options:r,readonly:d=!1,disabled:a=!1,optionsMap:l,width:h="100%",flex:f,placeholder:m,onSelect:x,parser:u,filter:y,tooltipProps:v={},infoProps:B={},maxHeigthMenu:z,isRequired:C=!1,onRemoveSelected:H,triggerFormField:p=null,displayText:W,...N})=>{const{onChangeTrigger:w}=Z({form:t,fieldName:n,triggerType:p,debounceTime:0}),O={position:"top",...v},L={...B,tooltipProps:{position:"top",maxWidth:"300px",...B==null?void 0:B.tooltipProps}},T=(b,I)=>{let M=b;u&&(M=u==null?void 0:u(b)),I(M),x==null||x(M),w==null||w()},S=g.useMemo(()=>F.valuable(l)?l:Object.fromEntries(r.map(b=>[b.value,b])),[r,l]);return o.jsxRuntimeExports.jsx(o.Container,{width:h,flex:f,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:t.control,render:({field:{onChange:b,value:I},fieldState:{error:M=null}})=>{let j=S[I];return o.jsxRuntimeExports.jsx(K,{label:i,width:"100%",size:"Small",disabled:a,readonly:d,filter:y,errorMessage:M==null?void 0:M.message,placeholder:m,value:j,handleOption:c=>{T(c.value,b)},tooltipProps:O,options:r,maxHeigthMenu:z,infoProps:L,maxHeightMenu:z,isRequired:C,onRemoveSelected:H,displayText:W,...N})}})})},te=({form:t,name:n,label:i,readonly:r=!1,disabled:d=!1,width:a="100%",height:l="100%",flex:h,placeholder:f,charactersCounter:m=!0,maxlength:x=1e3,resize:u=!0,triggerFormField:y=null,minHeight:v,maxHeight:B,...z})=>{const{onChangeTrigger:C}=Z({form:t,fieldName:n,triggerType:y}),H=(p,W)=>{W(p),C==null||C()};return o.jsxRuntimeExports.jsx(o.Container,{width:a,flex:h,height:l,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:t.control,render:({field:{onChange:p,value:W},fieldState:{error:N=null}})=>o.jsxRuntimeExports.jsx(o.Textarea,{label:i,value:W||"",width:"100%",disabled:d,readonly:r,height:l,minHeight:v,maxHeight:B,errorMessage:N==null?void 0:N.message,placeholder:f,onChange:w=>H(w.target.value,p),charactersCounter:m,maxlength:x,size:"Small",resize:u,...z})})})};te.displayName="TextareaField";const de=({form:t,name:n,id:i=n,label:r,readonly:d=!1,disabled:a=!1,afterCheck:l,width:h="100%",formatter:f,parser:m,flex:x,size:u="Medium",triggerFormField:y=null,...v})=>{const{onChangeTrigger:B}=Z({form:t,fieldName:n,triggerType:y,debounceTime:0}),z=(C,H)=>{H(C),l==null||l(C),B==null||B()};return o.jsxRuntimeExports.jsx(o.Container,{width:h,flex:x,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:t.control,render:({field:{onChange:C,value:H},fieldState:{error:p=null}})=>{const W=p==null?void 0:p.message;return W&&console.log("Error on checkbox!",W),o.jsxRuntimeExports.jsx(o.Checkbox,{id:`form-checkbox-${i}`,checked:(f==null?void 0:f(H))??H,name:n,label:r,disabled:a||d,onChange:N=>{z((m==null?void 0:m(N.target.checked,H))??N.target.checked,C)},size:u,...v})}})})},ge=o.qe.ul`
1
+ "use strict";const o=require("./Checkbox.view-CDJhnIP4.cjs"),g=require("react"),e=require("sbwb-ds"),F=require("./index-BcwQwoIM.cjs"),Q=require("react-hook-form");function Y(t,n,i){var r,d,a,l,h;n==null&&(n=100);function f(){var m=Date.now()-l;m<n&&m>=0?r=setTimeout(f,n-m):(r=null,i||(h=t.apply(a,d),a=d=null))}var x=function(){a=this,d=arguments,l=Date.now();var m=i&&!r;return r||(r=setTimeout(f,n)),m&&(h=t.apply(a,d),a=d=null),h};return x.clear=function(){r&&(clearTimeout(r),r=null)},x.flush=function(){r&&(h=t.apply(a,d),a=d=null,clearTimeout(r),r=null)},x}Y.debounce=Y;var le=Y;const ae=o.getDefaultExportFromCjs(le);function Z({form:t,fieldName:n,triggerType:i=null,debounceTime:r=500}){const d=g.useCallback(()=>{t.trigger(n)},[t,n]),a=g.useMemo(()=>ae(()=>d(),r),[d,r]),l=g.useMemo(()=>["all","onChange"].includes(i)?a:null,[a,i]),h=g.useMemo(()=>["all","onBlur"].includes(i)?d:null,[i]);return g.useMemo(()=>({onChangeTrigger:l,onBlurTrigger:h}),[l,h])}const ce=({form:t,name:n,label:i,options:r,readonly:d=!1,disabled:a=!1,optionsMap:l,width:h="100%",flex:f,placeholder:x,onSelect:m,parser:u,filter:y,tooltipProps:v={},infoProps:B={},maxHeigthMenu:z,isRequired:C=!1,onRemoveSelected:H,triggerFormField:p=null,displayText:W,...N})=>{const{onChangeTrigger:w}=Z({form:t,fieldName:n,triggerType:p,debounceTime:0}),O={position:"top",...v},L={...B,tooltipProps:{position:"top",maxWidth:"300px",...B==null?void 0:B.tooltipProps}},T=(b,I)=>{let M=b;u&&(M=u==null?void 0:u(b)),I(M),m==null||m(M),w==null||w()},S=g.useMemo(()=>F.valuable(l)?l:Object.fromEntries(r.map(b=>[b.value,b])),[r,l]);return o.jsxRuntimeExports.jsx(o.Container,{width:h,flex:f,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:t.control,render:({field:{onChange:b,value:I},fieldState:{error:M=null}})=>{let j=S[I];return o.jsxRuntimeExports.jsx(K,{label:i,width:"100%",size:"Small",disabled:a,readonly:d,filter:y,errorMessage:M==null?void 0:M.message,placeholder:x,value:j,handleOption:c=>{T(c.value,b)},tooltipProps:O,options:r,maxHeigthMenu:z,infoProps:L,maxHeightMenu:z,isRequired:C,onRemoveSelected:H,displayText:W,...N})}})})},te=({form:t,name:n,label:i,readonly:r=!1,disabled:d=!1,width:a="100%",height:l="100%",flex:h,placeholder:f,charactersCounter:x=!0,maxlength:m=1e3,resize:u=!0,triggerFormField:y=null,minHeight:v,maxHeight:B,...z})=>{const{onChangeTrigger:C}=Z({form:t,fieldName:n,triggerType:y}),H=(p,W)=>{W(p),C==null||C()};return o.jsxRuntimeExports.jsx(o.Container,{width:a,flex:h,height:l,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:t.control,render:({field:{onChange:p,value:W},fieldState:{error:N=null}})=>o.jsxRuntimeExports.jsx(o.Textarea,{label:i,value:W||"",width:"100%",disabled:d,readonly:r,height:l,minHeight:v,maxHeight:B,errorMessage:N==null?void 0:N.message,placeholder:f,onChange:w=>H(w.target.value,p),charactersCounter:x,maxlength:m,size:"Small",resize:u,...z})})})};te.displayName="TextareaField";const de=({form:t,name:n,id:i=n,label:r,readonly:d=!1,disabled:a=!1,afterCheck:l,width:h="100%",formatter:f,parser:x,flex:m,size:u="Medium",triggerFormField:y=null,...v})=>{const{onChangeTrigger:B}=Z({form:t,fieldName:n,triggerType:y,debounceTime:0}),z=(C,H)=>{H(C),l==null||l(C),B==null||B()};return o.jsxRuntimeExports.jsx(o.Container,{width:h,flex:m,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:t.control,render:({field:{onChange:C,value:H},fieldState:{error:p=null}})=>{const W=p==null?void 0:p.message;return W&&console.log("Error on checkbox!",W),o.jsxRuntimeExports.jsx(o.Checkbox,{id:`form-checkbox-${i}`,checked:(f==null?void 0:f(H))??H,name:n,label:r,disabled:a||d,onChange:N=>{z((x==null?void 0:x(N.target.checked,H))??N.target.checked,C)},size:u,...v})}})})},ge=o.qe.ul`
2
2
  ${F.resetStyles}
3
3
  position: fixed;
4
4
  margin-top: ${({marginTop:t})=>t};
@@ -79,13 +79,13 @@
79
79
  margin: ${({size:t})=>t==="Small"?`${e.sg.spacings.spacingStack.spacingStackSm} ${e.sg.spacings.spacingInline.spacingInlineXs}
80
80
  ${e.sg.spacings.spacingStack.spacingStackNano}`:`${e.sg.spacings.spacingStack.spacingStackSm} ${e.sg.spacings.spacingInline.spacingInlineXs}
81
81
  ${e.sg.spacings.spacingStack.spacingStackXs}`};
82
- `,me=o.qe.span`
82
+ `,xe=o.qe.span`
83
83
  ${F.resetStyles}
84
84
  font-family: ${e.sg.fonts.fontFamily.fontFamilyPrimary};
85
85
  font-size: ${({size:t})=>t==="Small"?e.sg.fonts.fontSize.fontSizeBodyMd:e.sg.fonts.fontSize.fontSizeBodyLg};
86
86
  font-weight: ${e.sg.fonts.fontWeight.fontWeightSemiBold};
87
87
  line-height: ${({size:t})=>t==="Small"?e.sg.fonts.lineHeight.lineHeightSm(e.sg.fonts.fontSize.fontSizeBodyMd):e.sg.fonts.lineHeight.lineHeightMd(e.sg.fonts.fontSize.fontSizeBodyLg)};
88
- `,xe=o.qe.div`
88
+ `,me=o.qe.div`
89
89
  ${F.resetStyles}
90
90
  display: flex;
91
91
  font-family: ${e.sg.fonts.fontFamily.fontFamilyPrimary};
@@ -118,7 +118,7 @@
118
118
  margin: 0;
119
119
  display: flex;
120
120
  align-self: center;
121
- `,be=(t,n,i=0,r=0,d="left")=>{const[a,l]=g.useState(0),[h,f]=g.useState(),m=g.useRef(null),x=g.useCallback(()=>{if(!t.current||!m.current)return;const u=t.current.getBoundingClientRect(),y=m.current.getBoundingClientRect(),v=window.innerHeight,B=window.innerWidth,z=u.top,C=v-u.bottom,H=C<y.height+r&&z>C;let p;H?(p=u.top-y.height-i,m.current.style.maxHeight=`${z-i}px`):(p=u.bottom+r,m.current.style.maxHeight=`${C-r}px`);let W=u.left;const N=W+y.width-B;N>0&&(W-=N),W<0&&(W=0);const w=B-u.right;Object.assign(m.current.style,{position:"fixed",top:`${p}px`,...d==="left"?{left:`${W}px`}:{right:`${w}px`},width:`${Math.max(u.width,y.width)}px`,overflowY:"auto"})},[i,r,d]);return g.useEffect(()=>{var y;l(0),f((y=t.current)==null?void 0:y.clientWidth),x();const u=()=>x();return window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),()=>{window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u)}},[t,x]),{highlightedIndex:a,setHighlightedIndex:l,isOptionSelected:u=>u.label===(n==null?void 0:n.label),optionsRef:m,parentWidth:h}},J=g.forwardRef(({selectContainerRef:t,optionsSelect:n,size:i,selectOption:r,value:d,inputValue:a,widthMenu:l,maxHeightMenu:h="180px",menuIsOpen:f,onEnter:m,marginTop:x="4px",iconName:u,iconColor:y,iconPosition:v,topOffset:B=0,bottomOffset:z=0,truncateText:C=!0,menuJustifyContent:H="flex-start",tableActionButton:p,menuLateralPadding:W="8px",menuOptionFlexDirection:N="column",confirmSelection:w,menuAlign:O="left"},L)=>{F.valuable(u)&&(u+="Ant");const{highlightedIndex:T,setHighlightedIndex:S,isOptionSelected:b,optionsRef:I,parentWidth:M}=be(t,d,B,z,O);g.useEffect(()=>{const s=$=>{if(f){if($.key==="ArrowDown")$.preventDefault(),S(R=>R<n.length-1?R+1:R);else if($.key==="ArrowUp")$.preventDefault(),S(R=>R>0?R-1:0);else if($.key==="Enter"&&n[T]){$.preventDefault();const R=n[T];r(R),m&&m(R)}}};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[f,n,T,m,r,w]);const j=s=>typeof s=="string"?s:g.isValidElement(s)&&typeof s.props.children=="string"?s.props.children:String(s),c=(s,$)=>{var A,E;if(v!==$)return null;const R=F.valuable((A=s.tooltipProps)==null?void 0:A.label),k=s.iconName||u||"InfoFill0Sm",q=o.jsxRuntimeExports.jsx(Se,{iconPosition:(E=s.tooltipProps)==null?void 0:E.position,id:`iconContainer-${s.value}`,children:o.jsxRuntimeExports.jsx(e.Icon,{iconName:k,color:s.disabled?e.sg.colors.neutralColors.colorNeutralCleanest:b(s)?e.sg.colors.brandColors.colorBrandSoft:y??e.sg.colors.neutralColors.colorNeutralDark})});return R?o.jsxRuntimeExports.jsx(o.Tooltip,{...s==null?void 0:s.tooltipProps,isActive:!0,children:q}):q};return o.jsxRuntimeExports.jsx(ge,{marginTop:x,width:l??`${M}px`,maxHeight:h,height:"fit-content",ref:s=>{I.current=s,typeof L=="function"?L(s):L&&(L.current=s)},"data-testid":"MenuSelect",id:"MenuSelect",children:n.length===0?o.jsxRuntimeExports.jsx(ue,{size:i,children:"Sem opções"}):n.map((s,$)=>{var q,A;const R=typeof s.render=="function"?s.render():null,k=j(s.label);if(s.isSection)return o.jsxRuntimeExports.jsx(he,{size:i,children:k},k);{const E=k.toLowerCase().indexOf((a==null?void 0:a.toLowerCase())||"");return o.jsxRuntimeExports.jsxs(pe,{isOptionSelected:b(s),highlightedIndex:$===T,onClick:D=>{D.stopPropagation(),s.disabled||(w?o.showConfirm({id:"select-option",title:w.title,description:w.description,icon:w.icon,iconColor:w.iconColor,leftButtonProps:{name:"Cancelar",variant:"tertiary",onClick:()=>{}},rightButtonProps:{name:"Confirmar",variant:"secondary",onClick:()=>r(s)}}):r(s))},onMouseEnter:()=>S($),disabled:s.disabled,size:i,menuLateralPadding:W,children:[c(s,"left"),o.jsxRuntimeExports.jsxs(fe,{menuOptionFlexDirection:N,menuJustifyContent:H,iconName:u,isOptionSelected:b(s),highlightedIndex:$===T,"data-testid":s.value,size:i,hasDescription:!!s.description,optionValue:s.value,disabled:s.disabled,truncateText:C,tableActionButton:p,children:[o.jsxRuntimeExports.jsxs(xe,{truncateText:!g.isValidElement(s.label)&&C,children:[R,g.isValidElement(s.label)?o.jsxRuntimeExports.jsx("p",{title:((q=s==null?void 0:s.tooltipProps)==null?void 0:q.label)??j(s.label),children:s.label}):o.jsxRuntimeExports.jsx("p",{title:((A=s==null?void 0:s.tooltipProps)==null?void 0:A.label)??k,children:a&&E>=0?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[k.substring(0,E),o.jsxRuntimeExports.jsx(me,{size:i,children:k.substring(E,E+((a==null?void 0:a.length)||0))}),k.substring(E+((a==null?void 0:a.length)||0))]}):k})]}),s.description&&o.jsxRuntimeExports.jsx("p",{title:s.description,children:s.description})]}),c(s,"right")]},String(s.value))}})})});J.displayName="MenuSelect";const oe=({title:t,iconName:n,onClickIcon:i,width:r,height:d,flex:a,children:l,wrapperCustomStyles:h={},contentCustomStyles:f={},titleCustomStyles:m={}})=>o.jsxRuntimeExports.jsxs(o.Container,{width:r,height:d,flex:a,direction:"vertical",padding:e.sg.spacings.spacingStack.spacingStackSm,customStyles:{backgroundColor:e.sg.colors.backgroundColors.colorBackgroundSnow,border:`1px solid ${e.sg.colors.neutralColors.colorNeutralSoft}`,borderRadius:"8px",...h},children:[o.jsxRuntimeExports.jsxs(o.Container,{width:"100%",direction:"horizontal",customStyles:f,children:[t?o.jsxRuntimeExports.jsx(o.Container,{width:"fit-content",customStyles:m,children:o.jsxRuntimeExports.jsx(o.SectionTitle,{title:t,divider:!1})}):null,n?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(o.Spacer,{size:"auto",direction:"horizontal"}),o.jsxRuntimeExports.jsx(e.Icon,{iconName:n,onClick:()=>i==null?void 0:i(),color:F.valuable(i)?e.sg.colors.neutralColors.colorNeutralDark:e.sg.colors.neutralColors.colorNeutralCloudy,cursorPointer:F.valuable(i)})]}):null]}),o.jsxRuntimeExports.jsx(o.Container,{width:"100%",flex:"1",children:l})]});oe.displayName="Section";const $e=o.qe.div`
121
+ `,be=(t,n,i=0,r=0,d="left")=>{const[a,l]=g.useState(0),[h,f]=g.useState(),x=g.useRef(null),m=g.useCallback(()=>{if(!t.current||!x.current)return;const u=t.current.getBoundingClientRect(),y=x.current.getBoundingClientRect(),v=window.innerHeight,B=window.innerWidth,z=u.top,C=v-u.bottom,H=C<y.height+r&&z>C;let p;H?(p=u.top-y.height-i,x.current.style.maxHeight=`${z-i}px`):(p=u.bottom+r,x.current.style.maxHeight=`${C-r}px`);let W=u.left;const N=W+y.width-B;N>0&&(W-=N),W<0&&(W=0);const w=B-u.right;Object.assign(x.current.style,{position:"fixed",top:`${p}px`,...d==="left"?{left:`${W}px`}:{right:`${w}px`},width:`${Math.max(u.width,y.width)}px`,overflowY:"auto"})},[i,r,d]);return g.useEffect(()=>{var y;l(0),f((y=t.current)==null?void 0:y.clientWidth),m();const u=()=>m();return window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),()=>{window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u)}},[t,m]),{highlightedIndex:a,setHighlightedIndex:l,isOptionSelected:u=>u.label===(n==null?void 0:n.label),optionsRef:x,parentWidth:h}},J=g.forwardRef(({selectContainerRef:t,optionsSelect:n,size:i,selectOption:r,value:d,inputValue:a,widthMenu:l,maxHeightMenu:h="180px",menuIsOpen:f,onEnter:x,marginTop:m="4px",iconName:u,iconColor:y,iconPosition:v,topOffset:B=0,bottomOffset:z=0,truncateText:C=!0,menuJustifyContent:H="flex-start",tableActionButton:p,menuLateralPadding:W="8px",menuOptionFlexDirection:N="column",confirmSelection:w,menuAlign:O="left"},L)=>{F.valuable(u)&&(u+="Ant");const{highlightedIndex:T,setHighlightedIndex:S,isOptionSelected:b,optionsRef:I,parentWidth:M}=be(t,d,B,z,O);g.useEffect(()=>{const s=$=>{if(f){if($.key==="ArrowDown")$.preventDefault(),S(R=>R<n.length-1?R+1:R);else if($.key==="ArrowUp")$.preventDefault(),S(R=>R>0?R-1:0);else if($.key==="Enter"&&n[T]){$.preventDefault();const R=n[T];r(R),x&&x(R)}}};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[f,n,T,x,r,w]);const j=s=>typeof s=="string"?s:g.isValidElement(s)&&typeof s.props.children=="string"?s.props.children:String(s),c=(s,$)=>{var A,E;if(v!==$)return null;const R=F.valuable((A=s.tooltipProps)==null?void 0:A.label),k=s.iconName||u||"InfoFill0Sm",q=o.jsxRuntimeExports.jsx(Se,{iconPosition:(E=s.tooltipProps)==null?void 0:E.position,id:`iconContainer-${s.value}`,children:o.jsxRuntimeExports.jsx(e.Icon,{iconName:k,color:s.disabled?e.sg.colors.neutralColors.colorNeutralCleanest:b(s)?e.sg.colors.brandColors.colorBrandSoft:y??e.sg.colors.neutralColors.colorNeutralDark})});return R?o.jsxRuntimeExports.jsx(o.Tooltip,{...s==null?void 0:s.tooltipProps,isActive:!0,children:q}):q};return o.jsxRuntimeExports.jsx(ge,{marginTop:m,width:l??`${M}px`,maxHeight:h,height:"fit-content",ref:s=>{I.current=s,typeof L=="function"?L(s):L&&(L.current=s)},"data-testid":"MenuSelect",id:"MenuSelect",children:n.length===0?o.jsxRuntimeExports.jsx(ue,{size:i,children:"Sem opções"}):n.map((s,$)=>{var q,A;const R=typeof s.render=="function"?s.render():null,k=j(s.label);if(s.isSection)return o.jsxRuntimeExports.jsx(he,{size:i,children:k},k);{const E=k.toLowerCase().indexOf((a==null?void 0:a.toLowerCase())||"");return o.jsxRuntimeExports.jsxs(pe,{isOptionSelected:b(s),highlightedIndex:$===T,onClick:D=>{D.stopPropagation(),s.disabled||(w?o.showConfirm({id:"select-option",title:w.title,description:w.description,icon:w.icon,iconColor:w.iconColor,leftButtonProps:{name:"Cancelar",variant:"tertiary",onClick:()=>{}},rightButtonProps:{name:"Confirmar",variant:"secondary",onClick:()=>r(s)}}):r(s))},onMouseEnter:()=>S($),disabled:s.disabled,size:i,menuLateralPadding:W,children:[c(s,"left"),o.jsxRuntimeExports.jsxs(fe,{menuOptionFlexDirection:N,menuJustifyContent:H,iconName:u,isOptionSelected:b(s),highlightedIndex:$===T,"data-testid":s.value,size:i,hasDescription:!!s.description,optionValue:s.value,disabled:s.disabled,truncateText:C,tableActionButton:p,children:[o.jsxRuntimeExports.jsxs(me,{truncateText:!g.isValidElement(s.label)&&C,children:[R,g.isValidElement(s.label)?o.jsxRuntimeExports.jsx("p",{title:((q=s==null?void 0:s.tooltipProps)==null?void 0:q.label)??j(s.label),children:s.label}):o.jsxRuntimeExports.jsx("p",{title:((A=s==null?void 0:s.tooltipProps)==null?void 0:A.label)??k,children:a&&E>=0?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[k.substring(0,E),o.jsxRuntimeExports.jsx(xe,{size:i,children:k.substring(E,E+((a==null?void 0:a.length)||0))}),k.substring(E+((a==null?void 0:a.length)||0))]}):k})]}),s.description&&o.jsxRuntimeExports.jsx("p",{title:s.description,children:s.description})]}),c(s,"right")]},String(s.value))}})})});J.displayName="MenuSelect";const oe=({title:t,iconName:n,onClickIcon:i,width:r,height:d,flex:a,children:l,wrapperCustomStyles:h={},contentCustomStyles:f={},titleCustomStyles:x={}})=>o.jsxRuntimeExports.jsxs(o.Container,{width:r,height:d,flex:a,direction:"vertical",padding:e.sg.spacings.spacingStack.spacingStackSm,customStyles:{backgroundColor:e.sg.colors.backgroundColors.colorBackgroundSnow,border:`1px solid ${e.sg.colors.neutralColors.colorNeutralSoft}`,borderRadius:"8px",...h},children:[o.jsxRuntimeExports.jsxs(o.Container,{width:"100%",direction:"horizontal",customStyles:f,children:[t?o.jsxRuntimeExports.jsx(o.Container,{width:"fit-content",customStyles:x,children:o.jsxRuntimeExports.jsx(o.SectionTitle,{title:t,divider:!1})}):null,n?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(o.Spacer,{size:"auto",direction:"horizontal"}),o.jsxRuntimeExports.jsx(e.Icon,{iconName:n,onClick:()=>i==null?void 0:i(),color:F.valuable(i)?e.sg.colors.neutralColors.colorNeutralDark:e.sg.colors.neutralColors.colorNeutralCloudy,cursorPointer:F.valuable(i)})]}):null]}),o.jsxRuntimeExports.jsx(o.Container,{width:"100%",flex:"1",children:l})]});oe.displayName="Section";const $e=o.qe.div`
122
122
  ${F.resetStyles}
123
123
  display: flex;
124
124
  flex-direction: column;
@@ -258,7 +258,7 @@
258
258
  color: ${e.sg.colors.neutralColors.colorNeutralDark};
259
259
  margin-top: ${e.sg.spacings.spacingInline.spacingInlineNano};
260
260
  width: 100%;
261
- `,Be=(t,{value:n,options:i})=>{const[r,d]=g.useState(!1),[a,l]=g.useState(!1),[h,f]=g.useState(""),[m,x]=g.useState(i),u=g.useRef(null),y=g.useRef(null),v=g.useRef(null),B=g.useRef(null);g.useEffect(()=>{const p=()=>{l(!1)};return window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[]);function z(p){f(""),l(!1),d(!0),v!=null&&v.current&&v.current.focus(),p!==n&&t(p)}const C=p=>{if(p){const W=new RegExp(p,"i"),N=i.filter(w=>W.exec(w.label));x(N)}else x(i)};function H(p){return!p}return{isOpen:r,setIsOpen:d,expanded:a,setExpanded:l,inputValue:h,setInputValue:f,optionsSelect:m,setOptionSelect:x,selectContainerRef:u,containerRef:y,inputContainerRef:v,optionsRef:B,selectOption:z,handlerFilterOptions:C,isValue:H}},K=g.forwardRef(({value:t,handleOption:n,options:i,filter:r=!0,placeholder:d,label:a,size:l="Medium",width:h="100%",disabled:f,helpText:m,readonly:x,errorMessage:u,tooltipProps:y={},onBlur:v,onEnter:B,variant:z="default",infoProps:C={},maxHeightMenu:H,isRequired:p=!1,onRemoveSelected:W,displayText:N,displayTextProps:w={}},O)=>{const{isOpen:L,setIsOpen:T,expanded:S,setExpanded:b,inputValue:I,setInputValue:M,optionsSelect:j,selectContainerRef:c,containerRef:s,inputContainerRef:$,selectOption:R,setOptionSelect:k,handlerFilterOptions:q,isValue:A}=Be(n,{value:t,options:i}),E=!!u,D={label:u,...y,wrapperWidth:"auto",isActive:E,isErrorTooltip:!0},P={...C,size:l},_=o.jsxRuntimeExports.jsx(e.Icon,{iconName:`Close${l==="Small"?"Sm":"Ant"}`,onClick:X=>{X.stopPropagation(),W(t)}}),V=o.jsxRuntimeExports.jsx(e.Icon,{iconName:`ExpandLess${l==="Small"?"Sm":"Ant"}`}),ie=o.jsxRuntimeExports.jsx(e.Icon,{iconName:`ExpandMore${l==="Small"?"Sm":"Ant"}`});return o.jsxRuntimeExports.jsxs($e,{ref:c,width:h,size:l,disabled:f,readonly:x,children:[a&&o.jsxRuntimeExports.jsxs(Re,{children:[o.jsxRuntimeExports.jsxs(ke,{"data-testid":"label",ref:O,children:[a,p&&!f?o.jsxRuntimeExports.jsx(Ee,{children:" *"}):null]}),((P==null?void 0:P.message)||(P==null?void 0:P.render))&&o.jsxRuntimeExports.jsx(o.Info,{...P})]}),o.jsxRuntimeExports.jsx(o.Tooltip,{...D,children:o.jsxRuntimeExports.jsxs(we,{hasError:E,readonly:x,ref:s,onBlur:()=>{setTimeout(()=>{(L||S)&&$.current!==document.activeElement&&(v&&v(t),T(!1),b(!1))},250)},onClick:()=>{!f&&!x&&(L&&!S?(b(!0),$!=null&&$.current&&$.current.focus()):!L&&!S?(T(!0),b(!0),$!=null&&$.current&&$.current.focus()):(T(!1),b(!1),$!=null&&$.current&&$.current.blur()),!I&&k(i))},tabIndex:0,width:h,size:l,isOpen:L||S,"data-testid":"select",disabled:f,helpText:m,variant:z,children:[o.jsxRuntimeExports.jsxs(ye,{children:[F.valuable(N)?o.jsxRuntimeExports.jsx(ee,{size:l,variant:z,isDisplayText:!0,children:o.jsxRuntimeExports.jsx("p",{title:t==null?void 0:t.label,...w,children:N})}):o.jsxRuntimeExports.jsxs(ee,{size:l,variant:z,children:[d&&A(t)&&!I&&!L?o.jsxRuntimeExports.jsx(je,{size:l,variant:z,children:d}):null,(t==null?void 0:t.label)&&o.jsxRuntimeExports.jsx("p",{title:(t==null?void 0:t.hint)??(t==null?void 0:t.label),children:t==null?void 0:t.label})]}),r&&!F.valuable(N)&&o.jsxRuntimeExports.jsx(Ce,{ref:$,value:I,onChange:X=>{M(X.target.value),X.target.value.length>0&&(T(!0),b(!0)),q(X.target.value)},readOnly:x,width:I.length,size:l,disabled:f,variant:z})]}),W&&t?_:null,S?V:ie,S&&o.jsxRuntimeExports.jsx(J,{onEnter:X=>{n&&n(X),T(!1),b(!1),B&&B(X)},menuIsOpen:L,selectContainerRef:c,value:t,optionsSelect:j,selectOption:R,size:l,inputValue:I,maxHeightMenu:H})]})}),m&&o.jsxRuntimeExports.jsx(ze,{size:l,children:m})]})});K.displayName="Select";const ne=o.We`
261
+ `,Be=(t,{value:n,options:i})=>{const[r,d]=g.useState(!1),[a,l]=g.useState(!1),[h,f]=g.useState(""),[x,m]=g.useState(i),u=g.useRef(null),y=g.useRef(null),v=g.useRef(null),B=g.useRef(null);g.useEffect(()=>{const p=()=>{l(!1)};return window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[]);function z(p){f(""),l(!1),d(!0),v!=null&&v.current&&v.current.focus(),p!==n&&t(p)}const C=p=>{if(p){const W=new RegExp(p,"i"),N=i.filter(w=>W.exec(w.label));m(N)}else m(i)};function H(p){return!p}return{isOpen:r,setIsOpen:d,expanded:a,setExpanded:l,inputValue:h,setInputValue:f,optionsSelect:x,setOptionSelect:m,selectContainerRef:u,containerRef:y,inputContainerRef:v,optionsRef:B,selectOption:z,handlerFilterOptions:C,isValue:H}},K=g.forwardRef(({value:t,handleOption:n,options:i,filter:r=!0,placeholder:d,label:a,size:l="Medium",width:h="100%",disabled:f,helpText:x,readonly:m,errorMessage:u,tooltipProps:y={},onBlur:v,onEnter:B,variant:z="default",infoProps:C={},maxHeightMenu:H,isRequired:p=!1,onRemoveSelected:W,displayText:N,displayTextProps:w={}},O)=>{const{isOpen:L,setIsOpen:T,expanded:S,setExpanded:b,inputValue:I,setInputValue:M,optionsSelect:j,selectContainerRef:c,containerRef:s,inputContainerRef:$,selectOption:R,setOptionSelect:k,handlerFilterOptions:q,isValue:A}=Be(n,{value:t,options:i}),E=!!u,D={label:u,...y,wrapperWidth:"auto",isActive:E,isErrorTooltip:!0},P={...C,size:l},_=o.jsxRuntimeExports.jsx(e.Icon,{iconName:`Close${l==="Small"?"Sm":"Ant"}`,onClick:X=>{X.stopPropagation(),W(t)}}),V=o.jsxRuntimeExports.jsx(e.Icon,{iconName:`ExpandLess${l==="Small"?"Sm":"Ant"}`}),ie=o.jsxRuntimeExports.jsx(e.Icon,{iconName:`ExpandMore${l==="Small"?"Sm":"Ant"}`});return o.jsxRuntimeExports.jsxs($e,{ref:c,width:h,size:l,disabled:f,readonly:m,children:[a&&o.jsxRuntimeExports.jsxs(Re,{children:[o.jsxRuntimeExports.jsxs(ke,{"data-testid":"label",ref:O,children:[a,p&&!f?o.jsxRuntimeExports.jsx(Ee,{children:" *"}):null]}),((P==null?void 0:P.message)||(P==null?void 0:P.render))&&o.jsxRuntimeExports.jsx(o.Info,{...P})]}),o.jsxRuntimeExports.jsx(o.Tooltip,{...D,children:o.jsxRuntimeExports.jsxs(we,{hasError:E,readonly:m,ref:s,onBlur:()=>{setTimeout(()=>{(L||S)&&$.current!==document.activeElement&&(v&&v(t),T(!1),b(!1))},250)},onClick:()=>{!f&&!m&&(L&&!S?(b(!0),$!=null&&$.current&&$.current.focus()):!L&&!S?(T(!0),b(!0),$!=null&&$.current&&$.current.focus()):(T(!1),b(!1),$!=null&&$.current&&$.current.blur()),!I&&k(i))},tabIndex:0,width:h,size:l,isOpen:L||S,"data-testid":"select",disabled:f,helpText:x,variant:z,children:[o.jsxRuntimeExports.jsxs(ye,{children:[F.valuable(N)?o.jsxRuntimeExports.jsx(ee,{size:l,variant:z,isDisplayText:!0,children:o.jsxRuntimeExports.jsx("p",{title:t==null?void 0:t.label,...w,children:N})}):o.jsxRuntimeExports.jsxs(ee,{size:l,variant:z,children:[d&&A(t)&&!I&&!L?o.jsxRuntimeExports.jsx(je,{size:l,variant:z,children:d}):null,(t==null?void 0:t.label)&&o.jsxRuntimeExports.jsx("p",{title:(t==null?void 0:t.hint)??(t==null?void 0:t.label),children:t==null?void 0:t.label})]}),r&&!F.valuable(N)&&o.jsxRuntimeExports.jsx(Ce,{ref:$,value:I,onChange:X=>{M(X.target.value),X.target.value.length>0&&(T(!0),b(!0)),q(X.target.value)},readOnly:m,width:I.length,size:l,disabled:f,variant:z})]}),W&&t?_:null,S?V:ie,S&&o.jsxRuntimeExports.jsx(J,{onEnter:X=>{n&&n(X),T(!1),b(!1),B&&B(X)},menuIsOpen:L,selectContainerRef:c,value:t,optionsSelect:j,selectOption:R,size:l,inputValue:I,maxHeightMenu:H})]})}),x&&o.jsxRuntimeExports.jsx(ze,{size:l,children:x})]})});K.displayName="Select";const ne=o.We`
262
262
  from {
263
263
  transform: rotate(0deg);
264
264
  }
@@ -380,7 +380,7 @@
380
380
  &:hover {
381
381
  cursor: not-allowed;
382
382
  }
383
- `,Me=t=>{const[n,i]=g.useState(!1),[r,d]=g.useState(t),a=g.useRef(null);return g.useEffect(()=>{d(t)},[t]),{setIsOpen:i,isOpen:n,setOptionsSelect:d,optionsSelect:r,selectContainerRef:a}},Ae=200,He=({name:t,variant:n="primary",width:i="100%",size:r="Medium",disabled:d=!1,isLoading:a=!1,onClick:l,options:h,label:f,menuSelectProps:m={},iconName:x,optionsIconPosition:u})=>{const{isOpen:y,setIsOpen:v,selectContainerRef:B,optionsSelect:z}=Me(h);let C=e.sg.colors.backgroundColors.colorBackgroundSnow;d?C=e.sg.colors.neutralColors.colorNeutralCloudy:n!=="primary"&&(C=e.sg.colors.neutralColors.colorNeutralDark);const H={...m};return o.jsxRuntimeExports.jsxs(Ie,{ref:B,width:i,size:r,disabled:d,onBlur:()=>setTimeout(()=>v(!1),Ae),children:[f&&o.jsxRuntimeExports.jsx(Ne,{children:f}),o.jsxRuntimeExports.jsxs(We,{type:"button",size:r,disabled:d,variant:n,isLoading:a,onClick:()=>!a&&v(!y),id:`button-component-${t}`,children:[a&&o.jsxRuntimeExports.jsx(ve,{size:r,disabled:d,variant:n,children:o.jsxRuntimeExports.jsx(e.Icon,{iconName:`ProgressActivity${r==="Small"?"Ant":"Sm"}`,color:C,"data-testid":"icon-loading"})}),!a&&o.jsxRuntimeExports.jsx("p",{title:t,children:t}),!a&&(y?o.jsxRuntimeExports.jsx(e.Icon,{iconName:`ExpandLess${r==="Small"?"Ant":"Sm"}`,color:C,"data-testid":"icon-button-less"}):o.jsxRuntimeExports.jsx(e.Icon,{iconName:`ExpandMore${r==="Small"?"Ant":"Sm"}`,color:C,"data-testid":"icon-button-more"}))]}),y&&o.jsxRuntimeExports.jsx(J,{selectContainerRef:B,value:null,optionsSelect:z,selectOption:l,size:r,inputValue:null,iconPosition:u,iconName:x,...H})]})},Fe=({title:t,children:n,endAdornment:i=null,marginBottom:r="16px",customStyles:d={},wrapperCustomStyles:a={},hideAdornmentOnCollapse:l=!1})=>{const[h,f]=g.useState(!1),m=l&&h?null:i;return o.jsxRuntimeExports.jsxs(o.Container,{width:"100%",flex:"1",gap:"8px",customStyles:a,children:[o.jsxRuntimeExports.jsx(o.SectionTitle,{title:t,divider:!0,marginBottom:r,collapse:{collapsed:h,setCollapsed:f},endAdornment:m,customStyles:d}),h?null:n]})},se=o.Ae`
383
+ `,Me=t=>{const[n,i]=g.useState(!1),[r,d]=g.useState(t),a=g.useRef(null);return g.useEffect(()=>{d(t)},[t]),{setIsOpen:i,isOpen:n,setOptionsSelect:d,optionsSelect:r,selectContainerRef:a}},Ae=200,He=({name:t,variant:n="primary",width:i="100%",size:r="Medium",disabled:d=!1,isLoading:a=!1,onClick:l,options:h,label:f,menuSelectProps:x={},iconName:m,optionsIconPosition:u})=>{const{isOpen:y,setIsOpen:v,selectContainerRef:B,optionsSelect:z}=Me(h);let C=e.sg.colors.backgroundColors.colorBackgroundSnow;d?C=e.sg.colors.neutralColors.colorNeutralCloudy:n!=="primary"&&(C=e.sg.colors.neutralColors.colorNeutralDark);const H={...x};return o.jsxRuntimeExports.jsxs(Ie,{ref:B,width:i,size:r,disabled:d,onBlur:()=>setTimeout(()=>v(!1),Ae),children:[f&&o.jsxRuntimeExports.jsx(Ne,{children:f}),o.jsxRuntimeExports.jsxs(We,{type:"button",size:r,disabled:d,variant:n,isLoading:a,onClick:()=>!a&&v(!y),id:`button-component-${t}`,children:[a&&o.jsxRuntimeExports.jsx(ve,{size:r,disabled:d,variant:n,children:o.jsxRuntimeExports.jsx(e.Icon,{iconName:`ProgressActivity${r==="Small"?"Ant":"Sm"}`,color:C,"data-testid":"icon-loading"})}),!a&&o.jsxRuntimeExports.jsx("p",{title:t,children:t}),!a&&(y?o.jsxRuntimeExports.jsx(e.Icon,{iconName:`ExpandLess${r==="Small"?"Ant":"Sm"}`,color:C,"data-testid":"icon-button-less"}):o.jsxRuntimeExports.jsx(e.Icon,{iconName:`ExpandMore${r==="Small"?"Ant":"Sm"}`,color:C,"data-testid":"icon-button-more"}))]}),y&&o.jsxRuntimeExports.jsx(J,{selectContainerRef:B,value:null,optionsSelect:z,selectOption:l,size:r,inputValue:null,iconPosition:u,iconName:m,...H})]})},Fe=({title:t,children:n,endAdornment:i=null,marginBottom:r="16px",customStyles:d={},wrapperCustomStyles:a={},hideAdornmentOnCollapse:l=!1})=>{const[h,f]=g.useState(!1),x=l&&h?null:i;return o.jsxRuntimeExports.jsxs(o.Container,{width:"100%",flex:"1",gap:"8px",customStyles:a,children:[o.jsxRuntimeExports.jsx(o.SectionTitle,{title:t,divider:!0,marginBottom:r,collapse:{collapsed:h,setCollapsed:f},endAdornment:x,customStyles:d}),o.jsxRuntimeExports.jsx(o.Container,{gap:"8px",width:"100%",customStyles:{maxHeight:h?"0":"2000px",transition:"max-height 0.35s ease-in-out"},children:n})]})},se=o.Ae`
384
384
  svg:not([color]):not([data-testid='icon']) {
385
385
  path {
386
386
  fill: ${e.sg.colors.neutralColors.colorNeutralDarkest};
@@ -538,4 +538,4 @@
538
538
  &:hover {
539
539
  cursor: ${t=>t.isClickable?"pointer":"default"};
540
540
  }
541
- `;function Oe(t){return n=>typeof t=="string"?n[t]:typeof t=="function"?t(n):(console.warn("Please, setup a rowKey for table."),JSON.stringify(n))}function Xe({id:t,rowKey:n="id",size:i="Small",onRowClick:r,fit:d=!1,maxHeight:a="40rem",columns:l,dataSource:h,columnsTextSize:f=i,emptyProps:m={width:"100%",height:"100%",title:"Nenhum dado a ser mostrado.",mode:"table",borders:!0,backgroundColor:e.sg.colors.backgroundColors.colorBackgroundSnow},selectedRow:x=!1,hideHeader:u=!1,withBorder:y=!0,withBorderRadius:v=!0,striped:B=!1,borderRadius:z=e.sg.borders.borderRadius.borderRadiusSm}){const C=g.useMemo(()=>Oe(n),[n]),[H,p]=g.useState(null),W=g.useRef(null),N=g.useRef(null),[w,O]=g.useState(l);g.useLayoutEffect(()=>{if(!N.current||l.length===0){O(l);return}const S=()=>{var q;const I=((q=N.current)==null?void 0:q.clientWidth)||0;if(I===0)return;let M=0,j=0;const c=[],s=[];l.forEach(A=>{const E=Number(A.flex);A.width?M+=parseInt(A.width,10)||0:A.flex&&E>0?(j+=E,c.push(A)):s.push(A)});const $=I-M,R="80";let k=[...l];if($>0){if(c.length>0){const A=$/j;k=l.map(E=>{const D=Number(E.flex);if(D&&D>0){const P=parseInt(E.minWidth||R,10),_=D*A,V=Math.max(_,P);return{...E,width:`${Math.floor(V)}px`}}return!E.width&&!D?{...E,width:E.minWidth||`${R}px`}:E})}else if(s.length>0){const A=$/s.length;k=l.map(E=>{const D=Number(E.flex);if(!E.width&&!D){const P=parseInt(E.minWidth||R,10),_=Math.max(A,P);return{...E,width:`${Math.floor(_)}px`}}return E})}}else k=l.map(A=>A.width?A:{...A,width:A.minWidth||`${R}px`});O(k)};S();const b=new ResizeObserver(S);return b.observe(N.current),()=>b.disconnect()},[l]),g.useEffect(()=>{const S=b=>{W.current&&!W.current.contains(b.target)&&p(null)};return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[]);const L=g.useMemo(()=>w?w.some(S=>S.mergeHeaderId&&S.mergeHeaderLabel):!1,[w]),T=g.useMemo(()=>{var M,j;if(u||!w||w.length===0)return null;if(!L)return o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:1,borderRadius:z,children:w.map(c=>{var s;return o.jsxRuntimeExports.jsx(G,{width:c.width,minWidth:c.minWidth,maxWidth:c.maxWidth,horizontalAlign:c.horizontalAlign,size:i,columnsTextSize:f,withBorder:y,headerAlign:c.headerAlign,children:((s=c.columnRender)==null?void 0:s.call(c))||o.jsxRuntimeExports.jsx("span",{title:c.label,children:c.label})},c.dataIndex)})});const S=[],b=[];let I=0;for(;I<w.length;){const c=w[I];if(c.mergeHeaderId&&c.mergeHeaderLabel){let s=0;const $=c.mergeHeaderId;for(let R=I;R<w.length&&w[R].mergeHeaderId===$;R++)s++;S.push(o.jsxRuntimeExports.jsx(G,{colSpan:s,horizontalAlign:"center",size:i,columnsTextSize:f,withBorder:y,width:c.width,minWidth:c.minWidth,maxWidth:c.maxWidth,headerAlign:c.headerAlign,isTopRow:!0,children:o.jsxRuntimeExports.jsx("span",{title:c.mergeHeaderLabel,children:c.mergeHeaderLabel})},`${c.mergeHeaderId}-merged`));for(let R=0;R<s;R++){const k=w[I+R];b.push(o.jsxRuntimeExports.jsx(G,{width:k.width,minWidth:k.minWidth,maxWidth:k.maxWidth,horizontalAlign:k.horizontalAlign,size:i,columnsTextSize:f,withBorder:y,headerAlign:c.headerAlign,children:((M=k.columnRender)==null?void 0:M.call(k))||o.jsxRuntimeExports.jsx("span",{title:k.label,children:k.label})},k.dataIndex+"-individual"))}I+=s}else S.push(o.jsxRuntimeExports.jsx(G,{rowSpan:2,width:c.width,minWidth:c.minWidth,maxWidth:c.maxWidth,horizontalAlign:c.horizontalAlign,size:i,columnsTextSize:f,withBorder:y,headerAlign:c.headerAlign,isTopRow:!0,children:((j=c.columnRender)==null?void 0:j.call(c))||o.jsxRuntimeExports.jsx("span",{title:c.label,children:c.label})},c.dataIndex)),I++}return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:2,borderRadius:z,children:S}),b.length>0&&o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:2,borderRadius:z,children:b})]})},[w,u,i,f,L]);return!h||h.length===0?o.jsxRuntimeExports.jsx(o.Empty,{backgroundColor:e.sg.colors.backgroundColors.colorBackgroundSnow,borders:!0,mode:"table",...m}):o.jsxRuntimeExports.jsx(Le,{maxHeight:a,withBorderRadius:v,ref:N,borderRadius:z,children:o.jsxRuntimeExports.jsxs(Te,{id:t,ref:W,children:[o.jsxRuntimeExports.jsx("thead",{children:T}),o.jsxRuntimeExports.jsx("tbody",{style:{width:"100%"},children:h==null?void 0:h.map((S,b,I)=>{const M=C(S);return o.jsxRuntimeExports.jsx(U,{isLast:b===I.length-1,fit:d,size:i,withBorder:y,isSelected:M===H&&x,striped:B&&b%2!==0,borderRadius:z,children:w.map(j=>{var c,s;return o.jsxRuntimeExports.jsx(De,{width:j.width,minWidth:j.minWidth,maxWidth:j.maxWidth,size:i,isClickable:F.valuable(r),onClick:()=>{r&&r(S,j,b),x&&p(H===M?null:M)},horizontalAlign:j.horizontalAlign,verticalAlign:j.verticalAlign,rowPadding:j.rowPadding,withBorder:y,isLast:b===I.length-1,children:((c=j.render)==null?void 0:c.call(j,S[j.dataIndex],S,b,I))||o.jsxRuntimeExports.jsx("span",{title:S[j.dataIndex],style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",...(s=j.rowCss)==null?void 0:s.call(j,S)},children:S[j.dataIndex]})||""},`${M}::${j.dataIndex}`)})},M)})})]})})}exports.CheckboxField=de;exports.CollapseSection=Fe;exports.MenuSelect=J;exports.Section=oe;exports.Select=K;exports.SelectButton=He;exports.SelectField=ce;exports.Table=Xe;exports.TextareaField=te;
541
+ `;function Oe(t){return n=>typeof t=="string"?n[t]:typeof t=="function"?t(n):(console.warn("Please, setup a rowKey for table."),JSON.stringify(n))}function Xe({id:t,rowKey:n="id",size:i="Small",onRowClick:r,fit:d=!1,maxHeight:a="40rem",columns:l,dataSource:h,columnsTextSize:f=i,emptyProps:x={width:"100%",height:"100%",title:"Nenhum dado a ser mostrado.",mode:"table",borders:!0,backgroundColor:e.sg.colors.backgroundColors.colorBackgroundSnow},selectedRow:m=!1,hideHeader:u=!1,withBorder:y=!0,withBorderRadius:v=!0,striped:B=!1,borderRadius:z=e.sg.borders.borderRadius.borderRadiusSm}){const C=g.useMemo(()=>Oe(n),[n]),[H,p]=g.useState(null),W=g.useRef(null),N=g.useRef(null),[w,O]=g.useState(l);g.useLayoutEffect(()=>{if(!N.current||l.length===0){O(l);return}const S=()=>{var q;const I=((q=N.current)==null?void 0:q.clientWidth)||0;if(I===0)return;let M=0,j=0;const c=[],s=[];l.forEach(A=>{const E=Number(A.flex);A.width?M+=parseInt(A.width,10)||0:A.flex&&E>0?(j+=E,c.push(A)):s.push(A)});const $=I-M,R="80";let k=[...l];if($>0){if(c.length>0){const A=$/j;k=l.map(E=>{const D=Number(E.flex);if(D&&D>0){const P=parseInt(E.minWidth||R,10),_=D*A,V=Math.max(_,P);return{...E,width:`${Math.floor(V)}px`}}return!E.width&&!D?{...E,width:E.minWidth||`${R}px`}:E})}else if(s.length>0){const A=$/s.length;k=l.map(E=>{const D=Number(E.flex);if(!E.width&&!D){const P=parseInt(E.minWidth||R,10),_=Math.max(A,P);return{...E,width:`${Math.floor(_)}px`}}return E})}}else k=l.map(A=>A.width?A:{...A,width:A.minWidth||`${R}px`});O(k)};S();const b=new ResizeObserver(S);return b.observe(N.current),()=>b.disconnect()},[l]),g.useEffect(()=>{const S=b=>{W.current&&!W.current.contains(b.target)&&p(null)};return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[]);const L=g.useMemo(()=>w?w.some(S=>S.mergeHeaderId&&S.mergeHeaderLabel):!1,[w]),T=g.useMemo(()=>{var M,j;if(u||!w||w.length===0)return null;if(!L)return o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:1,borderRadius:z,children:w.map(c=>{var s;return o.jsxRuntimeExports.jsx(G,{width:c.width,minWidth:c.minWidth,maxWidth:c.maxWidth,horizontalAlign:c.horizontalAlign,size:i,columnsTextSize:f,withBorder:y,headerAlign:c.headerAlign,children:((s=c.columnRender)==null?void 0:s.call(c))||o.jsxRuntimeExports.jsx("span",{title:c.label,children:c.label})},c.dataIndex)})});const S=[],b=[];let I=0;for(;I<w.length;){const c=w[I];if(c.mergeHeaderId&&c.mergeHeaderLabel){let s=0;const $=c.mergeHeaderId;for(let R=I;R<w.length&&w[R].mergeHeaderId===$;R++)s++;S.push(o.jsxRuntimeExports.jsx(G,{colSpan:s,horizontalAlign:"center",size:i,columnsTextSize:f,withBorder:y,width:c.width,minWidth:c.minWidth,maxWidth:c.maxWidth,headerAlign:c.headerAlign,isTopRow:!0,children:o.jsxRuntimeExports.jsx("span",{title:c.mergeHeaderLabel,children:c.mergeHeaderLabel})},`${c.mergeHeaderId}-merged`));for(let R=0;R<s;R++){const k=w[I+R];b.push(o.jsxRuntimeExports.jsx(G,{width:k.width,minWidth:k.minWidth,maxWidth:k.maxWidth,horizontalAlign:k.horizontalAlign,size:i,columnsTextSize:f,withBorder:y,headerAlign:c.headerAlign,children:((M=k.columnRender)==null?void 0:M.call(k))||o.jsxRuntimeExports.jsx("span",{title:k.label,children:k.label})},k.dataIndex+"-individual"))}I+=s}else S.push(o.jsxRuntimeExports.jsx(G,{rowSpan:2,width:c.width,minWidth:c.minWidth,maxWidth:c.maxWidth,horizontalAlign:c.horizontalAlign,size:i,columnsTextSize:f,withBorder:y,headerAlign:c.headerAlign,isTopRow:!0,children:((j=c.columnRender)==null?void 0:j.call(c))||o.jsxRuntimeExports.jsx("span",{title:c.label,children:c.label})},c.dataIndex)),I++}return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:2,borderRadius:z,children:S}),b.length>0&&o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:2,borderRadius:z,children:b})]})},[w,u,i,f,L]);return!h||h.length===0?o.jsxRuntimeExports.jsx(o.Empty,{backgroundColor:e.sg.colors.backgroundColors.colorBackgroundSnow,borders:!0,mode:"table",...x}):o.jsxRuntimeExports.jsx(Le,{maxHeight:a,withBorderRadius:v,ref:N,borderRadius:z,children:o.jsxRuntimeExports.jsxs(Te,{id:t,ref:W,children:[o.jsxRuntimeExports.jsx("thead",{children:T}),o.jsxRuntimeExports.jsx("tbody",{style:{width:"100%"},children:h==null?void 0:h.map((S,b,I)=>{const M=C(S);return o.jsxRuntimeExports.jsx(U,{isLast:b===I.length-1,fit:d,size:i,withBorder:y,isSelected:M===H&&m,striped:B&&b%2!==0,borderRadius:z,children:w.map(j=>{var c,s;return o.jsxRuntimeExports.jsx(De,{width:j.width,minWidth:j.minWidth,maxWidth:j.maxWidth,size:i,isClickable:F.valuable(r),onClick:()=>{r&&r(S,j,b),m&&p(H===M?null:M)},horizontalAlign:j.horizontalAlign,verticalAlign:j.verticalAlign,rowPadding:j.rowPadding,withBorder:y,isLast:b===I.length-1,children:((c=j.render)==null?void 0:c.call(j,S[j.dataIndex],S,b,I))||o.jsxRuntimeExports.jsx("span",{title:S[j.dataIndex],style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",...(s=j.rowCss)==null?void 0:s.call(j,S)},children:S[j.dataIndex]})||""},`${M}::${j.dataIndex}`)})},M)})})]})})}exports.CheckboxField=de;exports.CollapseSection=Fe;exports.MenuSelect=J;exports.Section=oe;exports.Select=K;exports.SelectButton=He;exports.SelectField=ce;exports.Table=Xe;exports.TextareaField=te;
@@ -1,7 +1,7 @@
1
- import { G as $e, l as n, C as J, j as be, c as xe, H as k, J as L, s as we, T as de, i as ce, S as ye, I as Ce, K as ke, E as ze } from "./Checkbox.view-DEBTcr4E.js";
1
+ import { G as $e, l as n, C as _, j as be, c as xe, H as k, J as L, s as we, T as de, i as ce, S as ye, I as Ce, K as ke, E as ze } from "./Checkbox.view-DEBTcr4E.js";
2
2
  import Be, { useCallback as fe, useMemo as Y, useState as O, useRef as Q, useEffect as K, forwardRef as ue, isValidElement as se, useLayoutEffect as We } from "react";
3
3
  import { sg as o, Icon as V } from "sbwb-ds";
4
- import { v as _, r as U, b as je } from "./index-_v6RoRxb.js";
4
+ import { v as U, r as G, b as je } from "./index-_v6RoRxb.js";
5
5
  import { Controller as re } from "react-hook-form";
6
6
  function ne(e, t, i) {
7
7
  var l, c, a, s, h;
@@ -78,7 +78,7 @@ const po = ({
78
78
  fieldName: t,
79
79
  triggerType: p,
80
80
  debounceTime: 0
81
- }), G = {
81
+ }), q = {
82
82
  position: "top",
83
83
  ...H
84
84
  }, A = {
@@ -91,8 +91,8 @@ const po = ({
91
91
  }, P = ($, M) => {
92
92
  let R = $;
93
93
  f && (R = f == null ? void 0 : f($)), M(R), m == null || m(R), x == null || x();
94
- }, S = Y(() => _(s) ? s : Object.fromEntries(l.map(($) => [$.value, $])), [l, s]);
95
- return /* @__PURE__ */ n.jsx(J, { width: h, flex: u, children: /* @__PURE__ */ n.jsx(
94
+ }, S = Y(() => U(s) ? s : Object.fromEntries(l.map(($) => [$.value, $])), [l, s]);
95
+ return /* @__PURE__ */ n.jsx(_, { width: h, flex: u, children: /* @__PURE__ */ n.jsx(
96
96
  re,
97
97
  {
98
98
  name: t,
@@ -117,7 +117,7 @@ const po = ({
117
117
  handleOption: (d) => {
118
118
  P(d.value, $);
119
119
  },
120
- tooltipProps: G,
120
+ tooltipProps: q,
121
121
  options: l,
122
122
  maxHeigthMenu: j,
123
123
  infoProps: A,
@@ -156,7 +156,7 @@ const po = ({
156
156
  }), E = (p, I) => {
157
157
  I(p), C == null || C();
158
158
  };
159
- return /* @__PURE__ */ n.jsx(J, { width: a, flex: h, height: s, children: /* @__PURE__ */ n.jsx(
159
+ return /* @__PURE__ */ n.jsx(_, { width: a, flex: h, height: s, children: /* @__PURE__ */ n.jsx(
160
160
  re,
161
161
  {
162
162
  name: t,
@@ -213,7 +213,7 @@ const So = ({
213
213
  }), j = (C, E) => {
214
214
  E(C), s == null || s(C), N == null || N();
215
215
  };
216
- return /* @__PURE__ */ n.jsx(J, { width: h, flex: m, children: /* @__PURE__ */ n.jsx(
216
+ return /* @__PURE__ */ n.jsx(_, { width: h, flex: m, children: /* @__PURE__ */ n.jsx(
217
217
  re,
218
218
  {
219
219
  name: t,
@@ -245,7 +245,7 @@ const So = ({
245
245
  }
246
246
  ) });
247
247
  }, ve = k.ul`
248
- ${U}
248
+ ${G}
249
249
  position: fixed;
250
250
  margin-top: ${({ marginTop: e }) => e};
251
251
  padding: ${o.spacings.spacingStack.spacingStackXs} 4px
@@ -275,7 +275,7 @@ const So = ({
275
275
  border-radius: ${o.borders.borderRadius.borderRadiusPill};
276
276
  }
277
277
  `, He = k.li`
278
- ${U}
278
+ ${G}
279
279
  font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
280
280
  font-size: ${({ size: e }) => e === "Small" ? o.fonts.fontSize.fontSizeBodyMd : o.fonts.fontSize.fontSizeBodyLg};
281
281
  padding: ${o.spacings.spacingInline.spacingInlineXs};
@@ -283,7 +283,7 @@ const So = ({
283
283
  cursor: default;
284
284
  color: ${o.colors.neutralColors.colorNeutralDark};
285
285
  `, Re = k.li`
286
- ${U}
286
+ ${G}
287
287
  display: flex;
288
288
  flex: 2;
289
289
  flex-direction: ${({ menuOptionFlexDirection: e }) => e};
@@ -317,7 +317,7 @@ const So = ({
317
317
  }
318
318
  `}
319
319
  `, Fe = k.li`
320
- ${U}
320
+ ${G}
321
321
  font-size: ${({ size: e }) => e === "Small" ? o.fonts.fontSize.fontSizeBodySm : o.fonts.fontSize.fontSizeBodyMd};
322
322
  font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
323
323
  font-weight: ${o.fonts.fontWeight.fontWeightSemiBold};
@@ -328,13 +328,13 @@ const So = ({
328
328
  ${o.spacings.spacingStack.spacingStackNano}` : `${o.spacings.spacingStack.spacingStackSm} ${o.spacings.spacingInline.spacingInlineXs}
329
329
  ${o.spacings.spacingStack.spacingStackXs}`};
330
330
  `, Ee = k.span`
331
- ${U}
331
+ ${G}
332
332
  font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
333
333
  font-size: ${({ size: e }) => e === "Small" ? o.fonts.fontSize.fontSizeBodyMd : o.fonts.fontSize.fontSizeBodyLg};
334
334
  font-weight: ${o.fonts.fontWeight.fontWeightSemiBold};
335
335
  line-height: ${({ size: e }) => e === "Small" ? o.fonts.lineHeight.lineHeightSm(o.fonts.fontSize.fontSizeBodyMd) : o.fonts.lineHeight.lineHeightMd(o.fonts.fontSize.fontSizeBodyLg)};
336
336
  `, Le = k.div`
337
- ${U}
337
+ ${G}
338
338
  display: flex;
339
339
  font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
340
340
 
@@ -350,7 +350,7 @@ const So = ({
350
350
  text-align: start;
351
351
  }
352
352
  `, Ae = k.div`
353
- ${U}
353
+ ${G}
354
354
  display: flex;
355
355
  flex-direction: row;
356
356
  align-items: center;
@@ -361,7 +361,7 @@ const So = ({
361
361
  border-radius: ${o.borders.borderRadius.borderRadiusSm};
362
362
  min-height: ${({ size: e }) => e === "Small" ? "28px" : "40px"};
363
363
  `, Pe = k.div`
364
- ${U}
364
+ ${G}
365
365
  padding: ${({ iconPosition: e }) => e === "left" ? `0 ${o.spacings.spacingInline.spacingInlineNano} 0 0` : `0 0 0 ${o.spacings.spacingInline.spacingInlineNano}`};
366
366
  margin: 0;
367
367
  display: flex;
@@ -422,9 +422,9 @@ const So = ({
422
422
  menuLateralPadding: I = "8px",
423
423
  menuOptionFlexDirection: v = "column",
424
424
  confirmSelection: x,
425
- menuAlign: G = "left"
425
+ menuAlign: q = "left"
426
426
  }, A) => {
427
- _(f) && (f += "Ant");
427
+ U(f) && (f += "Ant");
428
428
  const {
429
429
  highlightedIndex: P,
430
430
  setHighlightedIndex: S,
@@ -436,7 +436,7 @@ const So = ({
436
436
  c,
437
437
  N,
438
438
  j,
439
- G
439
+ q
440
440
  );
441
441
  K(() => {
442
442
  const r = (b) => {
@@ -468,7 +468,7 @@ const So = ({
468
468
  const y = (r) => typeof r == "string" ? r : Be.isValidElement(r) && typeof r.props.children == "string" ? r.props.children : String(r), d = (r, b) => {
469
469
  var F, W;
470
470
  if (H !== b) return null;
471
- const z = _((F = r.tooltipProps) == null ? void 0 : F.label), B = r.iconName || f || "InfoFill0Sm", D = /* @__PURE__ */ n.jsx(
471
+ const z = U((F = r.tooltipProps) == null ? void 0 : F.label), B = r.iconName || f || "InfoFill0Sm", D = /* @__PURE__ */ n.jsx(
472
472
  Pe,
473
473
  {
474
474
  iconPosition: (W = r.tooltipProps) == null ? void 0 : W.position,
@@ -609,7 +609,7 @@ const Oe = ({
609
609
  contentCustomStyles: u = {},
610
610
  titleCustomStyles: g = {}
611
611
  }) => /* @__PURE__ */ n.jsxs(
612
- J,
612
+ _,
613
613
  {
614
614
  width: l,
615
615
  height: c,
@@ -624,13 +624,13 @@ const Oe = ({
624
624
  },
625
625
  children: [
626
626
  /* @__PURE__ */ n.jsxs(
627
- J,
627
+ _,
628
628
  {
629
629
  width: "100%",
630
630
  direction: "horizontal",
631
631
  customStyles: u,
632
632
  children: [
633
- e ? /* @__PURE__ */ n.jsx(J, { width: "fit-content", customStyles: g, children: /* @__PURE__ */ n.jsx(ce, { title: e, divider: !1 }) }) : null,
633
+ e ? /* @__PURE__ */ n.jsx(_, { width: "fit-content", customStyles: g, children: /* @__PURE__ */ n.jsx(ce, { title: e, divider: !1 }) }) : null,
634
634
  t ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
635
635
  /* @__PURE__ */ n.jsx(ye, { size: "auto", direction: "horizontal" }),
636
636
  /* @__PURE__ */ n.jsx(
@@ -638,21 +638,21 @@ const Oe = ({
638
638
  {
639
639
  iconName: t,
640
640
  onClick: () => i == null ? void 0 : i(),
641
- color: _(i) ? o.colors.neutralColors.colorNeutralDark : o.colors.neutralColors.colorNeutralCloudy,
642
- cursorPointer: _(i)
641
+ color: U(i) ? o.colors.neutralColors.colorNeutralDark : o.colors.neutralColors.colorNeutralCloudy,
642
+ cursorPointer: U(i)
643
643
  }
644
644
  )
645
645
  ] }) : null
646
646
  ]
647
647
  }
648
648
  ),
649
- /* @__PURE__ */ n.jsx(J, { width: "100%", flex: "1", children: s })
649
+ /* @__PURE__ */ n.jsx(_, { width: "100%", flex: "1", children: s })
650
650
  ]
651
651
  }
652
652
  );
653
653
  Oe.displayName = "Section";
654
654
  const De = k.div`
655
- ${U}
655
+ ${G}
656
656
  display: flex;
657
657
  flex-direction: column;
658
658
  width: ${({ width: e }) => e};
@@ -876,7 +876,7 @@ const Qe = k.p`
876
876
  onRemoveSelected: I,
877
877
  displayText: v,
878
878
  displayTextProps: x = {}
879
- }, G) => {
879
+ }, q) => {
880
880
  const {
881
881
  isOpen: A,
882
882
  setIsOpen: P,
@@ -905,8 +905,8 @@ const Qe = k.p`
905
905
  V,
906
906
  {
907
907
  iconName: `Close${s === "Small" ? "Sm" : "Ant"}`,
908
- onClick: (q) => {
909
- q.stopPropagation(), I(e);
908
+ onClick: (J) => {
909
+ J.stopPropagation(), I(e);
910
910
  }
911
911
  }
912
912
  ), te = /* @__PURE__ */ n.jsx(V, { iconName: `ExpandLess${s === "Small" ? "Sm" : "Ant"}` }), Se = /* @__PURE__ */ n.jsx(V, { iconName: `ExpandMore${s === "Small" ? "Sm" : "Ant"}` });
@@ -920,7 +920,7 @@ const Qe = k.p`
920
920
  readonly: m,
921
921
  children: [
922
922
  a && /* @__PURE__ */ n.jsxs(qe, { children: [
923
- /* @__PURE__ */ n.jsxs(Je, { "data-testid": "label", ref: G, children: [
923
+ /* @__PURE__ */ n.jsxs(Je, { "data-testid": "label", ref: q, children: [
924
924
  a,
925
925
  p && !u ? /* @__PURE__ */ n.jsx(Ye, { children: " *" }) : null
926
926
  ] }),
@@ -950,17 +950,17 @@ const Qe = k.p`
950
950
  variant: j,
951
951
  children: [
952
952
  /* @__PURE__ */ n.jsxs(_e, { children: [
953
- _(v) ? /* @__PURE__ */ n.jsx(ae, { size: s, variant: j, isDisplayText: !0, children: /* @__PURE__ */ n.jsx("p", { title: e == null ? void 0 : e.label, ...x, children: v }) }) : /* @__PURE__ */ n.jsxs(ae, { size: s, variant: j, children: [
953
+ U(v) ? /* @__PURE__ */ n.jsx(ae, { size: s, variant: j, isDisplayText: !0, children: /* @__PURE__ */ n.jsx("p", { title: e == null ? void 0 : e.label, ...x, children: v }) }) : /* @__PURE__ */ n.jsxs(ae, { size: s, variant: j, children: [
954
954
  c && F(e) && !M && !A ? /* @__PURE__ */ n.jsx(Ue, { size: s, variant: j, children: c }) : null,
955
955
  (e == null ? void 0 : e.label) && /* @__PURE__ */ n.jsx("p", { title: (e == null ? void 0 : e.hint) ?? (e == null ? void 0 : e.label), children: e == null ? void 0 : e.label })
956
956
  ] }),
957
- l && !_(v) && /* @__PURE__ */ n.jsx(
957
+ l && !U(v) && /* @__PURE__ */ n.jsx(
958
958
  Ge,
959
959
  {
960
960
  ref: b,
961
961
  value: M,
962
- onChange: (q) => {
963
- R(q.target.value), q.target.value.length > 0 && (P(!0), $(!0)), D(q.target.value);
962
+ onChange: (J) => {
963
+ R(J.target.value), J.target.value.length > 0 && (P(!0), $(!0)), D(J.target.value);
964
964
  },
965
965
  readOnly: m,
966
966
  width: M.length,
@@ -975,8 +975,8 @@ const Qe = k.p`
975
975
  S && /* @__PURE__ */ n.jsx(
976
976
  ie,
977
977
  {
978
- onEnter: (q) => {
979
- t && t(q), P(!1), $(!1), N && N(q);
978
+ onEnter: (J) => {
979
+ t && t(J), P(!1), $(!1), N && N(J);
980
980
  },
981
981
  menuIsOpen: A,
982
982
  selectContainerRef: d,
@@ -1238,7 +1238,7 @@ const oo = k.div`
1238
1238
  }) => {
1239
1239
  const [h, u] = O(!1), g = s && h ? null : i;
1240
1240
  return /* @__PURE__ */ n.jsxs(
1241
- J,
1241
+ _,
1242
1242
  {
1243
1243
  width: "100%",
1244
1244
  flex: "1",
@@ -1259,7 +1259,20 @@ const oo = k.div`
1259
1259
  customStyles: c
1260
1260
  }
1261
1261
  ),
1262
- h ? null : t
1262
+ /* @__PURE__ */ n.jsx(
1263
+ _,
1264
+ {
1265
+ gap: "8px",
1266
+ width: "100%",
1267
+ customStyles: {
1268
+ // assuming max content height won't exceed 2000px (a large value)
1269
+ // If a maxHeight is not set, the transition won't work
1270
+ maxHeight: h ? "0" : "2000px",
1271
+ transition: "max-height 0.35s ease-in-out"
1272
+ },
1273
+ children: t
1274
+ }
1275
+ )
1263
1276
  ]
1264
1277
  }
1265
1278
  );
@@ -1351,7 +1364,7 @@ const oo = k.div`
1351
1364
  }
1352
1365
  `}
1353
1366
  `, pe = ({ width: e }) => {
1354
- if (_(e))
1367
+ if (U(e))
1355
1368
  return L`
1356
1369
  width: ${e};
1357
1370
  `;
@@ -1458,10 +1471,10 @@ function xo({
1458
1471
  striped: N = !1,
1459
1472
  borderRadius: j = o.borders.borderRadius.borderRadiusSm
1460
1473
  }) {
1461
- const C = Y(() => co(t), [t]), [E, p] = O(null), I = Q(null), v = Q(null), [x, G] = O(s);
1474
+ const C = Y(() => co(t), [t]), [E, p] = O(null), I = Q(null), v = Q(null), [x, q] = O(s);
1462
1475
  We(() => {
1463
1476
  if (!v.current || s.length === 0) {
1464
- G(s);
1477
+ q(s);
1465
1478
  return;
1466
1479
  }
1467
1480
  const S = () => {
@@ -1503,7 +1516,7 @@ function xo({
1503
1516
  }
1504
1517
  } else
1505
1518
  B = s.map((F) => F.width ? F : { ...F, width: F.minWidth || `${z}px` });
1506
- G(B);
1519
+ q(B);
1507
1520
  };
1508
1521
  S();
1509
1522
  const $ = new ResizeObserver(S);
@@ -1681,7 +1694,7 @@ function xo({
1681
1694
  minWidth: y.minWidth,
1682
1695
  maxWidth: y.maxWidth,
1683
1696
  size: i,
1684
- isClickable: _(l),
1697
+ isClickable: U(l),
1685
1698
  onClick: () => {
1686
1699
  l && l(S, y, $), m && p(
1687
1700
  E === R ? null : R
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Checkbox.view-CDJhnIP4.cjs"),t=require("../Title.view-CX_Y7KM1.cjs"),i=require("../RequiredLabel.view-CV4twgie.cjs"),o=require("../Table.view-LmJArBb-.cjs");exports.ActionButton=e.ActionButton;exports.Badge=e.Badge;exports.Button=e.Button;exports.Checkbox=e.Checkbox;exports.Confirm=e.ConfirmModal;exports.ConfirmButton=e.ConfirmButton;exports.ConfirmModal=e.ConfirmModal;exports.Container=e.Container;exports.Empty=e.Empty;exports.Frame=e.FrameView;exports.FrameView=e.FrameView;exports.Info=e.Info;exports.Input=e.Input;exports.Label=e.Label;exports.Loading=e.Loading;exports.LoadingBar=e.LoadingBar;exports.Modal=e.Modal;exports.Radio=e.Radio;exports.SectionTitle=e.SectionTitle;exports.Spacer=e.Spacer;exports.Textarea=e.Textarea;exports.Tooltip=e.Tooltip;exports.showConfirm=e.showConfirm;exports.showModal=e.showModal;exports.ErrorMessage=t.ErrorMessage;exports.Switch=t.Switch;exports.Title=t.Title;exports.AlertInline=i.AlertInline;exports.LabelField=i.LabelField;exports.RequiredLabelView=i.RequiredLabelView;exports.CheckboxField=o.CheckboxField;exports.CollapseSection=o.CollapseSection;exports.MenuSelect=o.MenuSelect;exports.Section=o.Section;exports.Select=o.Select;exports.SelectButton=o.SelectButton;exports.SelectField=o.SelectField;exports.Table=o.Table;exports.TextareaField=o.TextareaField;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Checkbox.view-CDJhnIP4.cjs"),t=require("../Title.view-CX_Y7KM1.cjs"),i=require("../RequiredLabel.view-CV4twgie.cjs"),o=require("../Table.view-CnPzI0s1.cjs");exports.ActionButton=e.ActionButton;exports.Badge=e.Badge;exports.Button=e.Button;exports.Checkbox=e.Checkbox;exports.Confirm=e.ConfirmModal;exports.ConfirmButton=e.ConfirmButton;exports.ConfirmModal=e.ConfirmModal;exports.Container=e.Container;exports.Empty=e.Empty;exports.Frame=e.FrameView;exports.FrameView=e.FrameView;exports.Info=e.Info;exports.Input=e.Input;exports.Label=e.Label;exports.Loading=e.Loading;exports.LoadingBar=e.LoadingBar;exports.Modal=e.Modal;exports.Radio=e.Radio;exports.SectionTitle=e.SectionTitle;exports.Spacer=e.Spacer;exports.Textarea=e.Textarea;exports.Tooltip=e.Tooltip;exports.showConfirm=e.showConfirm;exports.showModal=e.showModal;exports.ErrorMessage=t.ErrorMessage;exports.Switch=t.Switch;exports.Title=t.Title;exports.AlertInline=i.AlertInline;exports.LabelField=i.LabelField;exports.RequiredLabelView=i.RequiredLabelView;exports.CheckboxField=o.CheckboxField;exports.CollapseSection=o.CollapseSection;exports.MenuSelect=o.MenuSelect;exports.Section=o.Section;exports.Select=o.Select;exports.SelectButton=o.SelectButton;exports.SelectField=o.SelectField;exports.Table=o.Table;exports.TextareaField=o.TextareaField;
@@ -1,7 +1,7 @@
1
1
  import { A as s, B as o, a as t, c as i, e as r, d as l, e as n, C as c, E as d, F as S, F as m, I as f, f as C, L as p, g as T, b, M as x, R as F, i as u, S as B, j as L, T as M, s as h, h as g } from "../Checkbox.view-DEBTcr4E.js";
2
2
  import { E as A, S as E, T as I } from "../Title.view-DK7iD7P1.js";
3
3
  import { A as k, L as V, R as j } from "../RequiredLabel.view-DeP7ncq9.js";
4
- import { C as y, d as v, M as z, a as D, b as G, c as H, S as J, e as K, T as N } from "../Table.view-DvQLVQpE.js";
4
+ import { C as y, d as v, M as z, a as D, b as G, c as H, S as J, e as K, T as N } from "../Table.view-DNLacIcf.js";
5
5
  export {
6
6
  s as ActionButton,
7
7
  k as AlertInline,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Table.view-LmJArBb-.cjs");exports.CheckboxField=e.CheckboxField;exports.CollapseSection=e.CollapseSection;exports.MenuSelect=e.MenuSelect;exports.Section=e.Section;exports.Select=e.Select;exports.SelectButton=e.SelectButton;exports.SelectField=e.SelectField;exports.Table=e.Table;exports.TextareaField=e.TextareaField;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Table.view-CnPzI0s1.cjs");exports.CheckboxField=e.CheckboxField;exports.CollapseSection=e.CollapseSection;exports.MenuSelect=e.MenuSelect;exports.Section=e.Section;exports.Select=e.Select;exports.SelectButton=e.SelectButton;exports.SelectField=e.SelectField;exports.Table=e.Table;exports.TextareaField=e.TextareaField;
@@ -1,4 +1,4 @@
1
- import { C as l, d as s, M as t, a as c, b as o, c as S, S as i, e as d, T as n } from "../../Table.view-DvQLVQpE.js";
1
+ import { C as l, d as s, M as t, a as c, b as o, c as S, S as i, e as d, T as n } from "../../Table.view-DNLacIcf.js";
2
2
  export {
3
3
  l as CheckboxField,
4
4
  s as CollapseSection,
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Checkbox.view-CDJhnIP4.cjs"),o=require("./Title.view-CX_Y7KM1.cjs"),l=require("./RequiredLabel.view-CV4twgie.cjs"),t=require("./Table.view-LmJArBb-.cjs"),i=require("./index-BcwQwoIM.cjs"),r=require("./helpers/index.cjs.js");exports.ActionButton=e.ActionButton;exports.Badge=e.Badge;exports.Button=e.Button;exports.Checkbox=e.Checkbox;exports.Confirm=e.ConfirmModal;exports.ConfirmButton=e.ConfirmButton;exports.ConfirmModal=e.ConfirmModal;exports.Container=e.Container;exports.Empty=e.Empty;exports.Frame=e.FrameView;exports.FrameView=e.FrameView;exports.Info=e.Info;exports.Input=e.Input;exports.Label=e.Label;exports.Loading=e.Loading;exports.LoadingBar=e.LoadingBar;exports.Modal=e.Modal;exports.Radio=e.Radio;exports.SectionTitle=e.SectionTitle;exports.Spacer=e.Spacer;exports.Textarea=e.Textarea;exports.Tooltip=e.Tooltip;exports.showConfirm=e.showConfirm;exports.showModal=e.showModal;exports.styleGuide=e.index;exports.ErrorMessage=o.ErrorMessage;exports.Switch=o.Switch;exports.Title=o.Title;exports.AlertInline=l.AlertInline;exports.LabelField=l.LabelField;exports.RequiredLabelView=l.RequiredLabelView;exports.CheckboxField=t.CheckboxField;exports.CollapseSection=t.CollapseSection;exports.MenuSelect=t.MenuSelect;exports.Section=t.Section;exports.Select=t.Select;exports.SelectButton=t.SelectButton;exports.SelectField=t.SelectField;exports.Table=t.Table;exports.TextareaField=t.TextareaField;exports.capitalizeAllFirstLetters=i.capitalizeAllFirstLetters;exports.capitalizeFirstLetter=i.capitalizeFirstLetter;exports.convertHexToRGB=i.convertHexToRGB;exports.dom=i.dom;exports.resetStyles=i.resetStyles;exports.valuable=i.valuable;exports.stableStringify=r.stableStringify;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Checkbox.view-CDJhnIP4.cjs"),o=require("./Title.view-CX_Y7KM1.cjs"),l=require("./RequiredLabel.view-CV4twgie.cjs"),t=require("./Table.view-CnPzI0s1.cjs"),i=require("./index-BcwQwoIM.cjs"),r=require("./helpers/index.cjs.js");exports.ActionButton=e.ActionButton;exports.Badge=e.Badge;exports.Button=e.Button;exports.Checkbox=e.Checkbox;exports.Confirm=e.ConfirmModal;exports.ConfirmButton=e.ConfirmButton;exports.ConfirmModal=e.ConfirmModal;exports.Container=e.Container;exports.Empty=e.Empty;exports.Frame=e.FrameView;exports.FrameView=e.FrameView;exports.Info=e.Info;exports.Input=e.Input;exports.Label=e.Label;exports.Loading=e.Loading;exports.LoadingBar=e.LoadingBar;exports.Modal=e.Modal;exports.Radio=e.Radio;exports.SectionTitle=e.SectionTitle;exports.Spacer=e.Spacer;exports.Textarea=e.Textarea;exports.Tooltip=e.Tooltip;exports.showConfirm=e.showConfirm;exports.showModal=e.showModal;exports.styleGuide=e.index;exports.ErrorMessage=o.ErrorMessage;exports.Switch=o.Switch;exports.Title=o.Title;exports.AlertInline=l.AlertInline;exports.LabelField=l.LabelField;exports.RequiredLabelView=l.RequiredLabelView;exports.CheckboxField=t.CheckboxField;exports.CollapseSection=t.CollapseSection;exports.MenuSelect=t.MenuSelect;exports.Section=t.Section;exports.Select=t.Select;exports.SelectButton=t.SelectButton;exports.SelectField=t.SelectField;exports.Table=t.Table;exports.TextareaField=t.TextareaField;exports.capitalizeAllFirstLetters=i.capitalizeAllFirstLetters;exports.capitalizeFirstLetter=i.capitalizeFirstLetter;exports.convertHexToRGB=i.convertHexToRGB;exports.dom=i.dom;exports.resetStyles=i.resetStyles;exports.valuable=i.valuable;exports.stableStringify=r.stableStringify;
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { A as s, B as t, a as o, c as r, e as i, d as l, e as n, C as c, E as d, F as m, F as S, I as f, f as p, L as b, g as x, b as C, M as F, R as T, i as u, S as L, j as B, T as M, s as g, h, k as w } from "./Checkbox.view-DEBTcr4E.js";
2
2
  import { E as R, S as y, T as E } from "./Title.view-DK7iD7P1.js";
3
3
  import { A as k, L as v, R as z } from "./RequiredLabel.view-DeP7ncq9.js";
4
- import { C as V, d as j, M as q, a as H, b as D, c as J, S as K, e as N, T as O } from "./Table.view-DvQLVQpE.js";
4
+ import { C as V, d as j, M as q, a as H, b as D, c as J, S as K, e as N, T as O } from "./Table.view-DNLacIcf.js";
5
5
  import { a as Q, c as U, b as W, d as X, r as Y, v as Z } from "./index-_v6RoRxb.js";
6
6
  import { stableStringify as $ } from "./helpers/index.es.js";
7
7
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ufal-lccv/gpsub-ds",
3
- "version": "0.0.6-alpha-0",
3
+ "version": "0.0.6-alpha-2",
4
4
  "type": "module",
5
5
  "description": "Design system temporário do GP-SUB para auxiliar na futura migração para o DS Subweb 2.0",
6
6
  "repository": {