@ufal-lccv/gpsub-ds 0.0.12 → 0.0.13
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.
- package/README.md +31 -31
- package/dist/{Table.view-BJQBIN5k.cjs → Table.view-BipNpove.cjs} +6 -6
- package/dist/{Table.view-DmikEuD8.js → Table.view-CHEV4kuX.js} +155 -155
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +1 -1
- package/dist/components/organisms/CollapseSection/CollapseSection.view.d.ts +2 -1
- package/dist/components/organisms/index.cjs.js +1 -1
- package/dist/components/organisms/index.es.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/package.json +119 -119
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,4 +1,4 @@
|
|
|
1
|
-
"use strict";const o=require("./Checkbox.view-DFbiE7Mi.cjs"),u=require("react"),t=require("sbwb-ds"),H=require("./index-BcwQwoIM.cjs"),Q=require("react-hook-form"),ee=350,ae=({title:e,children:n,endAdornment:i=null,marginBottom:s="16px",customStyles:a={},wrapperCustomStyles:c={},hideAdornmentOnCollapse:l=!1})=>{const[
|
|
1
|
+
"use strict";const o=require("./Checkbox.view-DFbiE7Mi.cjs"),u=require("react"),t=require("sbwb-ds"),H=require("./index-BcwQwoIM.cjs"),Q=require("react-hook-form"),ee=350,ae=({title:e,children:n,endAdornment:i=null,marginBottom:s="16px",customStyles:a={},wrapperCustomStyles:c={},hideAdornmentOnCollapse:l=!1,maxHeight:x="none"})=>{const[d,m]=u.useState(!1),[p,f]=u.useState(!0);u.useEffect(()=>{if(l)if(d){const h=setTimeout(()=>f(!1),ee);return()=>clearTimeout(h)}else f(!0)},[d,l]);const S=l&&!p?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:d,setCollapsed:m},endAdornment:S,customStyles:a}),o.jsxRuntimeExports.jsx(o.Container,{gap:"8px",width:"100%",customStyles:{maxHeight:d?"0":x,transition:`max-height ${ee}ms ease-in-out`},children:n})]})};function Y(e,n,i){var s,a,c,l,x;n==null&&(n=100);function d(){var p=Date.now()-l;p<n&&p>=0?s=setTimeout(d,n-p):(s=null,i||(x=e.apply(c,a),c=a=null))}var m=function(){c=this,a=arguments,l=Date.now();var p=i&&!s;return s||(s=setTimeout(d,n)),p&&(x=e.apply(c,a),c=a=null),x};return m.clear=function(){s&&(clearTimeout(s),s=null)},m.flush=function(){s&&(x=e.apply(c,a),c=a=null,clearTimeout(s),s=null)},m}Y.debounce=Y;var ce=Y;const de=o.getDefaultExportFromCjs(ce);function Z({form:e,fieldName:n,triggerType:i=null,debounceTime:s=500}){const a=u.useCallback(()=>{e.trigger(n)},[e,n]),c=u.useMemo(()=>de(()=>a(),s),[a,s]),l=u.useMemo(()=>["all","onChange"].includes(i)?c:null,[c,i]),x=u.useMemo(()=>["all","onBlur"].includes(i)?a:null,[i]);return u.useMemo(()=>({onChangeTrigger:l,onBlurTrigger:x}),[l,x])}const ge=({form:e,name:n,label:i,options:s,readonly:a=!1,disabled:c=!1,optionsMap:l,width:x="100%",flex:d,placeholder:m,onSelect:p,parser:f,filter:S,tooltipProps:h={},infoProps:j={},maxHeigthMenu:R,isRequired:E=!1,onRemoveSelected:F,triggerFormField:b=null,displayText:W,...v})=>{const{onChangeTrigger:C}=Z({form:e,fieldName:n,triggerType:b,debounceTime:0}),O={position:"top",...h},L={...j,tooltipProps:{position:"top",maxWidth:"300px",...j==null?void 0:j.tooltipProps}},T=(w,I)=>{let M=w;f&&(M=f==null?void 0:f(w)),I(M),p==null||p(M),C==null||C()},$=u.useMemo(()=>H.valuable(l)?l:Object.fromEntries(s.map(w=>[w.value,w])),[s,l]);return o.jsxRuntimeExports.jsx(o.Container,{width:x,flex:d,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:e.control,render:({field:{onChange:w,value:I},fieldState:{error:M=null}})=>{let k=$[I];return o.jsxRuntimeExports.jsx(K,{label:i,width:"100%",size:"Small",disabled:c,readonly:a,filter:S,errorMessage:M==null?void 0:M.message,placeholder:m,value:k,handleOption:g=>{T(g.value,w)},tooltipProps:O,options:s,maxHeigthMenu:R,infoProps:L,maxHeightMenu:R,isRequired:E,onRemoveSelected:F,displayText:W,...v})}})})},oe=({form:e,name:n,label:i,readonly:s=!1,disabled:a=!1,width:c="100%",height:l="100%",flex:x,placeholder:d,charactersCounter:m=!0,maxlength:p=1e3,resize:f=!0,triggerFormField:S=null,minHeight:h,maxHeight:j,...R})=>{const{onChangeTrigger:E}=Z({form:e,fieldName:n,triggerType:S}),F=(b,W)=>{W(b),E==null||E()};return o.jsxRuntimeExports.jsx(o.Container,{width:c,flex:x,height:l,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:e.control,render:({field:{onChange:b,value:W},fieldState:{error:v=null}})=>o.jsxRuntimeExports.jsx(o.Textarea,{label:i,value:W||"",width:"100%",disabled:a,readonly:s,height:l,minHeight:h,maxHeight:j,errorMessage:v==null?void 0:v.message,placeholder:d,onChange:C=>F(C.target.value,b),charactersCounter:m,maxlength:p,size:"Small",resize:f,...R})})})};oe.displayName="TextareaField";const ue=({form:e,name:n,id:i=n,label:s,readonly:a=!1,disabled:c=!1,afterCheck:l,width:x="100%",formatter:d,parser:m,flex:p,size:f="Medium",triggerFormField:S=null,...h})=>{const{onChangeTrigger:j}=Z({form:e,fieldName:n,triggerType:S,debounceTime:0}),R=(E,F)=>{F(E),l==null||l(E),j==null||j()};return o.jsxRuntimeExports.jsx(o.Container,{width:x,flex:p,children:o.jsxRuntimeExports.jsx(Q.Controller,{name:n,control:e.control,render:({field:{onChange:E,value:F},fieldState:{error:b=null}})=>{const W=b==null?void 0:b.message;return W&&console.log("Error on checkbox!",W),o.jsxRuntimeExports.jsx(o.Checkbox,{id:`form-checkbox-${i}`,checked:(d==null?void 0:d(F))??F,name:n,label:s,disabled:c||a,onChange:v=>{R((m==null?void 0:m(v.target.checked,F))??v.target.checked,E)},size:f,...h})}})})},fe=o.qe.ul`
|
|
2
2
|
${H.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,a="left")=>{const[c,l]=u.useState(0),[
|
|
121
|
+
`,we=(e,n,i=0,s=0,a="left")=>{const[c,l]=u.useState(0),[x,d]=u.useState(),m=u.useRef(null),p=u.useCallback(()=>{if(!e.current||!m.current)return;const f=e.current.getBoundingClientRect(),S=m.current.getBoundingClientRect(),h=window.innerHeight,j=window.innerWidth,R=f.top,E=h-f.bottom,F=E<S.height+s&&R>E;let b;F?(b=f.top-S.height-i,m.current.style.maxHeight=`${R-i}px`):(b=f.bottom+s,m.current.style.maxHeight=`${E-s}px`);let W=f.left;const v=W+S.width-j;v>0&&(W-=v),W<0&&(W=0);const C=j-f.right;Object.assign(m.current.style,{position:"fixed",top:`${b}px`,...a==="left"?{left:`${W}px`}:{right:`${C}px`},width:`${Math.max(f.width,S.width)}px`,overflowY:"auto"})},[i,s,a]);return u.useEffect(()=>{var S;l(0),d((S=e.current)==null?void 0:S.clientWidth),p();const f=()=>p();return window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[e,p]),{highlightedIndex:c,setHighlightedIndex:l,isOptionSelected:f=>f.label===(n==null?void 0:n.label),optionsRef:m,parentWidth:x}},J=u.forwardRef(({selectContainerRef:e,optionsSelect:n,size:i,selectOption:s,value:a,inputValue:c,widthMenu:l,maxHeightMenu:x="180px",menuIsOpen:d,onEnter:m,marginTop:p="4px",iconName:f,iconColor:S,iconPosition:h,topOffset:j=0,bottomOffset:R=0,truncateText:E=!0,menuJustifyContent:F="flex-start",tableActionButton:b,menuLateralPadding:W="8px",menuOptionFlexDirection:v="column",confirmSelection:C,menuAlign:O="left"},L)=>{H.valuable(f)&&(f+="Ant");const{highlightedIndex:T,setHighlightedIndex:$,isOptionSelected:w,optionsRef:I,parentWidth:M}=we(e,a,j,R,O);u.useEffect(()=>{const r=y=>{if(d){if(y.key==="ArrowDown")y.preventDefault(),$(z=>z<n.length-1?z+1:z);else if(y.key==="ArrowUp")y.preventDefault(),$(z=>z>0?z-1:0);else if(y.key==="Enter"&&n[T]){y.preventDefault();const z=n[T];s(z),m&&m(z)}}};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[d,n,T,m,s,C]);const k=r=>typeof r=="string"?r:u.isValidElement(r)&&typeof r.props.children=="string"?r.props.children:String(r),g=(r,y)=>{var A,N;if(h!==y)return null;const z=H.valuable((A=r.tooltipProps)==null?void 0:A.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:w(r)?t.sg.colors.brandColors.colorBrandSoft:S??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:p,width:l??`${M}px`,maxHeight:x,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,y)=>{var P,A;const z=typeof r.render=="function"?r.render():null,B=k(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:w(r),highlightedIndex:y===T,onClick:D=>{D.stopPropagation(),r.disabled||(C?o.showConfirm({id:"select-option",title:C.title,description:C.description,icon:C.icon,iconColor:C.iconColor,leftButtonProps:{name:"Cancelar",variant:"tertiary",onClick:()=>{}},rightButtonProps:{name:"Confirmar",variant:"secondary",onClick:()=>s(r)}}):s(r))},onMouseEnter:()=>$(y),disabled:r.disabled,size:i,menuLateralPadding:W,children:[g(r,"left"),o.jsxRuntimeExports.jsxs(xe,{menuOptionFlexDirection:v,menuJustifyContent:F,iconName:f,isOptionSelected:w(r),highlightedIndex:y===T,"data-testid":r.value,size:i,hasDescription:!!r.description,optionValue:r.value,disabled:r.disabled,truncateText:E,tableActionButton:b,children:[o.jsxRuntimeExports.jsxs(Se,{truncateText:!u.isValidElement(r.label)&&E,children:[z,u.isValidElement(r.label)?o.jsxRuntimeExports.jsx("p",{title:((P=r==null?void 0:r.tooltipProps)==null?void 0:P.label)??k(r.label),children:r.label}):o.jsxRuntimeExports.jsx("p",{title:((A=r==null?void 0:r.tooltipProps)==null?void 0:A.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})]}),g(r,"right")]},String(r.value))}})})});J.displayName="MenuSelect";const ne=({title:e,iconName:n,onClickIcon:i,width:s,height:a,flex:c,children:l,wrapperCustomStyles:x={},contentCustomStyles:d={},titleCustomStyles:m={}})=>o.jsxRuntimeExports.jsxs(o.Container,{width:s,height:a,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",...x},children:[o.jsxRuntimeExports.jsxs(o.Container,{width:"100%",direction:"horizontal",customStyles:d,children:[e?o.jsxRuntimeExports.jsx(o.Container,{width:"fit-content",customStyles:m,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:H.valuable(i)?t.sg.colors.neutralColors.colorNeutralDark:t.sg.colors.neutralColors.colorNeutralCloudy,cursorPointer:H.valuable(i)})]}):null]}),o.jsxRuntimeExports.jsx(o.Container,{width:"100%",flex:"1",children:l})]});ne.displayName="Section";const ye=o.qe.div`
|
|
122
122
|
${H.resetStyles}
|
|
123
123
|
display: flex;
|
|
124
124
|
flex-direction: column;
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
color: ${t.sg.colors.neutralColors.colorNeutralDark};
|
|
259
259
|
margin-top: ${t.sg.spacings.spacingInline.spacingInlineNano};
|
|
260
260
|
width: 100%;
|
|
261
|
-
`,We=(e,{value:n,options:i})=>{const[s,a]=u.useState(!1),[c,l]=u.useState(!1),[
|
|
261
|
+
`,We=(e,{value:n,options:i})=>{const[s,a]=u.useState(!1),[c,l]=u.useState(!1),[x,d]=u.useState(""),[m,p]=u.useState(i),f=u.useRef(null),S=u.useRef(null),h=u.useRef(null),j=u.useRef(null);u.useEffect(()=>{const b=()=>{l(!1)};return window.addEventListener("scroll",b,{passive:!0}),window.addEventListener("resize",b,{passive:!0}),()=>{window.removeEventListener("scroll",b),window.removeEventListener("resize",b)}},[]);function R(b){d(""),l(!1),a(!0),h!=null&&h.current&&h.current.focus(),b!==n&&e(b)}const E=b=>{if(b){const W=new RegExp(b,"i"),v=i.filter(C=>W.exec(C.label));p(v)}else p(i)};function F(b){return!b}return{isOpen:s,setIsOpen:a,expanded:c,setExpanded:l,inputValue:x,setInputValue:d,optionsSelect:m,setOptionSelect:p,selectContainerRef:f,containerRef:S,inputContainerRef:h,optionsRef:j,selectOption:R,handlerFilterOptions:E,isValue:F}},K=u.forwardRef(({value:e,handleOption:n,options:i,filter:s=!0,placeholder:a,label:c,size:l="Medium",width:x="100%",disabled:d,helpText:m,readonly:p,errorMessage:f,tooltipProps:S={},onBlur:h,onEnter:j,variant:R="default",infoProps:E={},maxHeightMenu:F,isRequired:b=!1,onRemoveSelected:W,displayText:v,displayTextProps:C={}},O)=>{const{isOpen:L,setIsOpen:T,expanded:$,setExpanded:w,inputValue:I,setInputValue:M,optionsSelect:k,selectContainerRef:g,containerRef:r,inputContainerRef:y,selectOption:z,setOptionSelect:B,handlerFilterOptions:P,isValue:A}=We(n,{value:e,options:i}),N=!!f,D={label:f,...S,wrapperWidth:"auto",isActive:N,isErrorTooltip:!0},q={...E,size:l},_=o.jsxRuntimeExports.jsx(t.Icon,{iconName:`Close${l==="Small"?"Sm":"Ant"}`,onClick:X=>{X.stopPropagation(),W(e)}}),V=o.jsxRuntimeExports.jsx(t.Icon,{iconName:`ExpandLess${l==="Small"?"Sm":"Ant"}`}),le=o.jsxRuntimeExports.jsx(t.Icon,{iconName:`ExpandMore${l==="Small"?"Sm":"Ant"}`});return o.jsxRuntimeExports.jsxs(ye,{ref:g,width:x,size:l,disabled:d,readonly:p,children:[c&&o.jsxRuntimeExports.jsxs(Ee,{children:[o.jsxRuntimeExports.jsxs(ze,{"data-testid":"label",ref:O,children:[c,b&&!d?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:p,ref:r,onBlur:()=>{setTimeout(()=>{(L||$)&&y.current!==document.activeElement&&(h&&h(e),T(!1),w(!1))},250)},onClick:()=>{!d&&!p&&(L&&!$?(w(!0),y!=null&&y.current&&y.current.focus()):!L&&!$?(T(!0),w(!0),y!=null&&y.current&&y.current.focus()):(T(!1),w(!1),y!=null&&y.current&&y.current.blur()),!I&&B(i))},tabIndex:0,width:x,size:l,isOpen:L||$,"data-testid":"select",disabled:d,helpText:m,variant:R,children:[o.jsxRuntimeExports.jsxs(Ce,{children:[H.valuable(v)?o.jsxRuntimeExports.jsx(te,{size:l,variant:R,isDisplayText:!0,children:o.jsxRuntimeExports.jsx("p",{title:e==null?void 0:e.label,...C,children:v})}):o.jsxRuntimeExports.jsxs(te,{size:l,variant:R,children:[a&&A(e)&&!I&&!L?o.jsxRuntimeExports.jsx(Re,{size:l,variant:R,children:a}):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&&!H.valuable(v)&&o.jsxRuntimeExports.jsx(ke,{ref:y,value:I,onChange:X=>{M(X.target.value),X.target.value.length>0&&(T(!0),w(!0)),P(X.target.value)},readOnly:p,width:I.length,size:l,disabled:d,variant:R})]}),W&&e?_:null,$?V:le,$&&o.jsxRuntimeExports.jsx(J,{onEnter:X=>{n&&n(X),T(!1),w(!1),j&&j(X)},menuIsOpen:L,selectContainerRef:g,value:e,optionsSelect:k,selectOption:z,size:l,inputValue:I,maxHeightMenu:F})]})}),m&&o.jsxRuntimeExports.jsx(Ne,{size:l,children:m})]})});K.displayName="Select";const re=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
|
-
`,Fe=e=>{const[n,i]=u.useState(!1),[s,a]=u.useState(e),c=u.useRef(null);return u.useEffect(()=>{a(e)},[e]),{setIsOpen:i,isOpen:n,setOptionsSelect:a,optionsSelect:s,selectContainerRef:c}},He=200,Le=({name:e,variant:n="primary",width:i="100%",size:s="Medium",disabled:a=!1,isLoading:c=!1,onClick:l,options:
|
|
383
|
+
`,Fe=e=>{const[n,i]=u.useState(!1),[s,a]=u.useState(e),c=u.useRef(null);return u.useEffect(()=>{a(e)},[e]),{setIsOpen:i,isOpen:n,setOptionsSelect:a,optionsSelect:s,selectContainerRef:c}},He=200,Le=({name:e,variant:n="primary",width:i="100%",size:s="Medium",disabled:a=!1,isLoading:c=!1,onClick:l,options:x,label:d,menuSelectProps:m={},iconName:p,optionsIconPosition:f})=>{const{isOpen:S,setIsOpen:h,selectContainerRef:j,optionsSelect:R}=Fe(x);let E=t.sg.colors.backgroundColors.colorBackgroundSnow;a?E=t.sg.colors.neutralColors.colorNeutralCloudy:n!=="primary"&&(E=t.sg.colors.neutralColors.colorNeutralDark);const F={...m};return o.jsxRuntimeExports.jsxs(ve,{ref:j,width:i,size:s,disabled:a,onBlur:()=>setTimeout(()=>h(!1),He),children:[d&&o.jsxRuntimeExports.jsx(Me,{children:d}),o.jsxRuntimeExports.jsxs(Ie,{type:"button",size:s,disabled:a,variant:n,isLoading:c,onClick:()=>!c&&h(!S),id:`button-component-${e}`,children:[c&&o.jsxRuntimeExports.jsx(Ae,{size:s,disabled:a,variant:n,children:o.jsxRuntimeExports.jsx(t.Icon,{iconName:`ProgressActivity${s==="Small"?"Ant":"Sm"}`,color:E,"data-testid":"icon-loading"})}),!c&&o.jsxRuntimeExports.jsx("p",{title:e,children:e}),!c&&(S?o.jsxRuntimeExports.jsx(t.Icon,{iconName:`ExpandLess${s==="Small"?"Ant":"Sm"}`,color:E,"data-testid":"icon-button-less"}):o.jsxRuntimeExports.jsx(t.Icon,{iconName:`ExpandMore${s==="Small"?"Ant":"Sm"}`,color:E,"data-testid":"icon-button-more"}))]}),S&&o.jsxRuntimeExports.jsx(J,{selectContainerRef:j,value:null,optionsSelect:R,selectOption:l,size:s,inputValue:null,iconPosition:f,iconName:p,...F})]})},Te=o.qe.div`
|
|
384
384
|
min-width: ${({widthItems:e})=>e};
|
|
385
385
|
max-width: ${({widthItems:e})=>e};
|
|
386
386
|
height: 100%;
|
|
@@ -425,7 +425,7 @@
|
|
|
425
425
|
height: 100%;
|
|
426
426
|
background-color: 'transparent';
|
|
427
427
|
overflow: hidden;
|
|
428
|
-
`,Xe=({width:e="100%",height:n="fit-content",flex:i,backgroundColor:s="white",options:a=[],heightItems:c="60px",widthItems:l="155px",emptyProps:
|
|
428
|
+
`,Xe=({width:e="100%",height:n="fit-content",flex:i,backgroundColor:s="white",options:a=[],heightItems:c="60px",widthItems:l="155px",emptyProps:x={title:"Nenhum dado a ser mostrado",body:null}})=>{var S;const[d,m]=u.useState(a[0]||null),p=u.useRef(null),f=u.useRef(null);return u.useEffect(()=>{const h=p.current,j=f.current,R=()=>{h&&j&&(j.scrollTop=h.scrollTop)};return h==null||h.addEventListener("scroll",R),()=>{h==null||h.removeEventListener("scroll",R)}},[]),(a==null?void 0:a.length)===0?o.jsxRuntimeExports.jsx(o.Empty,{title:x.title,body:x.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},children:[o.jsxRuntimeExports.jsx(Te,{ref:p,widthItems:l,children:a==null?void 0:a.map((h,j)=>o.jsxRuntimeExports.jsx(qe,{selected:(d==null?void 0:d.key)===h.key,onClick:()=>m(h),withBorderRight:!1,heightItems:c,children:h.item},j))}),o.jsxRuntimeExports.jsx(Oe,{ref:f,children:(S=a==null?void 0:a.concat({key:"last",item:o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{}),contentItem:o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{})}))==null?void 0:S.map((h,j)=>o.jsxRuntimeExports.jsx(Pe,{selected:(d==null?void 0:d.key)===h.key,onClick:()=>m(h),withBorderRight:!0,heightItems:c},j))}),o.jsxRuntimeExports.jsx(De,{children:d&&(d==null?void 0:d.contentItem)})]})},se=o.Ae`
|
|
429
429
|
svg:not([color]):not([data-testid='icon']) {
|
|
430
430
|
path {
|
|
431
431
|
fill: ${t.sg.colors.neutralColors.colorNeutralDarkest};
|
|
@@ -583,4 +583,4 @@
|
|
|
583
583
|
&:hover {
|
|
584
584
|
cursor: ${e=>e.isClickable?"pointer":"default"};
|
|
585
585
|
}
|
|
586
|
-
`;function Ye(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 Qe({id:e,rowKey:n="id",size:i="Small",onRowClick:s,fit:a=!1,maxHeight:c="40rem",columns:l,dataSource:
|
|
586
|
+
`;function Ye(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 Qe({id:e,rowKey:n="id",size:i="Small",onRowClick:s,fit:a=!1,maxHeight:c="40rem",columns:l,dataSource:x,columnsTextSize:d=i,emptyProps:m={width:"100%",height:"100%",title:"Nenhum dado a ser mostrado.",mode:"table",borders:!0,backgroundColor:t.sg.colors.backgroundColors.colorBackgroundSnow},selectedRow:p=!1,hideHeader:f=!1,withBorder:S=!0,withBorderRadius:h=!0,striped:j=!1,borderRadius:R=t.sg.borders.borderRadius.borderRadiusSm}){const E=u.useMemo(()=>Ye(n),[n]),[F,b]=u.useState(null),W=u.useRef(null),v=u.useRef(null),[C,O]=u.useState(l);u.useLayoutEffect(()=>{if(!v.current||l.length===0){O(l);return}const $=()=>{var P;const I=((P=v.current)==null?void 0:P.clientWidth)||0;if(I===0)return;let M=0,k=0;const g=[],r=[];l.forEach(A=>{const N=Number(A.flex);A.width?M+=parseInt(A.width,10)||0:A.flex&&N>0?(k+=N,g.push(A)):r.push(A)});const y=I-M,z="80";let B=[...l];if(y>0){if(g.length>0){const A=y/k;B=l.map(N=>{const D=Number(N.flex);if(D&&D>0){const q=parseInt(N.minWidth||z,10),_=D*A,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 A=y/r.length;B=l.map(N=>{const D=Number(N.flex);if(!N.width&&!D){const q=parseInt(N.minWidth||z,10),_=Math.max(A,q);return{...N,width:`${Math.floor(_)}px`}}return N})}}else B=l.map(A=>A.width?A:{...A,width:A.minWidth||`${z}px`});O(B)};$();const w=new ResizeObserver($);return w.observe(v.current),()=>w.disconnect()},[l]),u.useEffect(()=>{const $=w=>{W.current&&!W.current.contains(w.target)&&b(null)};return document.addEventListener("mousedown",$),()=>{document.removeEventListener("mousedown",$)}},[]);const L=u.useMemo(()=>C?C.some($=>$.mergeHeaderId&&$.mergeHeaderLabel):!1,[C]),T=u.useMemo(()=>{var M,k;if(f||!C||C.length===0)return null;if(!L)return o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:1,borderRadius:R,children:C.map(g=>{var r;return o.jsxRuntimeExports.jsx(G,{width:g.width,minWidth:g.minWidth,maxWidth:g.maxWidth,horizontalAlign:g.horizontalAlign,size:i,columnsTextSize:d,withBorder:S,headerAlign:g.headerAlign,children:((r=g.columnRender)==null?void 0:r.call(g,x))||o.jsxRuntimeExports.jsx("span",{title:g.label,children:g.label})},g.dataIndex)})});const $=[],w=[];let I=0;for(;I<C.length;){const g=C[I];if(g.mergeHeaderId&&g.mergeHeaderLabel){let r=0;const y=g.mergeHeaderId;for(let z=I;z<C.length&&C[z].mergeHeaderId===y;z++)r++;$.push(o.jsxRuntimeExports.jsx(G,{colSpan:r,horizontalAlign:"center",size:i,columnsTextSize:d,withBorder:S,width:g.width,minWidth:g.minWidth,maxWidth:g.maxWidth,headerAlign:g.headerAlign,isTopRow:!0,children:o.jsxRuntimeExports.jsx("span",{title:g.mergeHeaderLabel,children:g.mergeHeaderLabel})},`${g.mergeHeaderId}-merged`));for(let z=0;z<r;z++){const B=C[I+z];w.push(o.jsxRuntimeExports.jsx(G,{width:B.width,minWidth:B.minWidth,maxWidth:B.maxWidth,horizontalAlign:B.horizontalAlign,size:i,columnsTextSize:d,withBorder:S,headerAlign:g.headerAlign,children:((M=B.columnRender)==null?void 0:M.call(B,x))||o.jsxRuntimeExports.jsx("span",{title:B.label,children:B.label})},B.dataIndex+"-individual"))}I+=r}else $.push(o.jsxRuntimeExports.jsx(G,{rowSpan:2,width:g.width,minWidth:g.minWidth,maxWidth:g.maxWidth,horizontalAlign:g.horizontalAlign,size:i,columnsTextSize:d,withBorder:S,headerAlign:g.headerAlign,isTopRow:!0,children:((k=g.columnRender)==null?void 0:k.call(g,x))||o.jsxRuntimeExports.jsx("span",{title:g.label,children:g.label})},g.dataIndex)),I++}return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:2,borderRadius:R,children:$}),w.length>0&&o.jsxRuntimeExports.jsx(U,{isHeader:!0,size:i,numRows:2,borderRadius:R,children:w})]})},[C,f,i,d,L]);return!x||x.length===0?o.jsxRuntimeExports.jsx(o.Empty,{backgroundColor:t.sg.colors.backgroundColors.colorBackgroundSnow,borders:!0,mode:"table",...m}):o.jsxRuntimeExports.jsx(_e,{maxHeight:c,withBorderRadius:h,ref:v,borderRadius:R,children:o.jsxRuntimeExports.jsxs(Ue,{id:e,ref:W,children:[o.jsxRuntimeExports.jsx("thead",{children:T}),o.jsxRuntimeExports.jsx("tbody",{style:{width:"100%"},children:x==null?void 0:x.map(($,w,I)=>{const M=E($);return o.jsxRuntimeExports.jsx(U,{isLast:w===I.length-1,fit:a,size:i,withBorder:S,isSelected:M===F&&p,striped:j&&w%2!==0,borderRadius:R,children:C.map(k=>{var g,r;return o.jsxRuntimeExports.jsx(Ve,{width:k.width,minWidth:k.minWidth,maxWidth:k.maxWidth,size:i,isClickable:H.valuable(s),onClick:()=>{s&&s($,k,w),p&&b(F===M?null:M)},horizontalAlign:k.horizontalAlign,verticalAlign:k.verticalAlign,rowPadding:k.rowPadding,withBorder:S,isLast:w===I.length-1,children:((g=k.render)==null?void 0:g.call(k,$[k.dataIndex],$,w,I))||o.jsxRuntimeExports.jsx("span",{title:$[k.dataIndex],style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",...(r=k.rowCss)==null?void 0:r.call(k,$)},children:$[k.dataIndex]})||""},`${M}::${k.dataIndex}`)})},M)})})]})})}exports.CheckboxField=ue;exports.CollapseSection=ae;exports.MenuSelect=J;exports.Section=ne;exports.Select=K;exports.SelectButton=Le;exports.SelectField=ge;exports.TabInfo=Xe;exports.Table=Qe;exports.TextareaField=oe;
|
|
@@ -10,21 +10,23 @@ const ae = 350, yo = ({
|
|
|
10
10
|
marginBottom: l = "16px",
|
|
11
11
|
customStyles: a = {},
|
|
12
12
|
wrapperCustomStyles: d = {},
|
|
13
|
-
hideAdornmentOnCollapse: s = !1
|
|
13
|
+
hideAdornmentOnCollapse: s = !1,
|
|
14
|
+
maxHeight: g = "none"
|
|
15
|
+
// Default to 'none' to allow full expansion
|
|
14
16
|
}) => {
|
|
15
|
-
const [
|
|
17
|
+
const [c, m] = P(!1), [p, h] = P(!0);
|
|
16
18
|
Z(() => {
|
|
17
19
|
if (s)
|
|
18
|
-
if (
|
|
19
|
-
const
|
|
20
|
-
() =>
|
|
20
|
+
if (c) {
|
|
21
|
+
const u = setTimeout(
|
|
22
|
+
() => h(!1),
|
|
21
23
|
ae
|
|
22
24
|
);
|
|
23
|
-
return () => clearTimeout(
|
|
25
|
+
return () => clearTimeout(u);
|
|
24
26
|
} else
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
const
|
|
27
|
+
h(!0);
|
|
28
|
+
}, [c, s]);
|
|
29
|
+
const S = s && !p ? null : i;
|
|
28
30
|
return /* @__PURE__ */ n.jsxs(
|
|
29
31
|
_,
|
|
30
32
|
{
|
|
@@ -40,10 +42,10 @@ const ae = 350, yo = ({
|
|
|
40
42
|
divider: !0,
|
|
41
43
|
marginBottom: l,
|
|
42
44
|
collapse: {
|
|
43
|
-
collapsed:
|
|
44
|
-
setCollapsed:
|
|
45
|
+
collapsed: c,
|
|
46
|
+
setCollapsed: m
|
|
45
47
|
},
|
|
46
|
-
endAdornment:
|
|
48
|
+
endAdornment: S,
|
|
47
49
|
customStyles: a
|
|
48
50
|
}
|
|
49
51
|
),
|
|
@@ -53,9 +55,7 @@ const ae = 350, yo = ({
|
|
|
53
55
|
gap: "8px",
|
|
54
56
|
width: "100%",
|
|
55
57
|
customStyles: {
|
|
56
|
-
|
|
57
|
-
// If a maxHeight is not set, the transition won't work
|
|
58
|
-
maxHeight: h ? "0" : "2000px",
|
|
58
|
+
maxHeight: c ? "0" : g,
|
|
59
59
|
transition: `max-height ${ae}ms ease-in-out`
|
|
60
60
|
},
|
|
61
61
|
children: t
|
|
@@ -66,22 +66,22 @@ const ae = 350, yo = ({
|
|
|
66
66
|
);
|
|
67
67
|
};
|
|
68
68
|
function ne(e, t, i) {
|
|
69
|
-
var l, a, d, s,
|
|
69
|
+
var l, a, d, s, g;
|
|
70
70
|
t == null && (t = 100);
|
|
71
71
|
function c() {
|
|
72
|
-
var
|
|
73
|
-
|
|
72
|
+
var p = Date.now() - s;
|
|
73
|
+
p < t && p >= 0 ? l = setTimeout(c, t - p) : (l = null, i || (g = e.apply(d, a), d = a = null));
|
|
74
74
|
}
|
|
75
|
-
var
|
|
75
|
+
var m = function() {
|
|
76
76
|
d = this, a = arguments, s = Date.now();
|
|
77
|
-
var
|
|
78
|
-
return l || (l = setTimeout(c, t)),
|
|
77
|
+
var p = i && !l;
|
|
78
|
+
return l || (l = setTimeout(c, t)), p && (g = e.apply(d, a), d = a = null), g;
|
|
79
79
|
};
|
|
80
|
-
return
|
|
80
|
+
return m.clear = function() {
|
|
81
81
|
l && (clearTimeout(l), l = null);
|
|
82
|
-
},
|
|
83
|
-
l && (
|
|
84
|
-
},
|
|
82
|
+
}, m.flush = function() {
|
|
83
|
+
l && (g = e.apply(d, a), d = a = null, clearTimeout(l), l = null);
|
|
84
|
+
}, m;
|
|
85
85
|
}
|
|
86
86
|
ne.debounce = ne;
|
|
87
87
|
var Ie = ne;
|
|
@@ -100,16 +100,16 @@ function le({
|
|
|
100
100
|
), s = Q(
|
|
101
101
|
() => ["all", "onChange"].includes(i) ? d : null,
|
|
102
102
|
[d, i]
|
|
103
|
-
),
|
|
103
|
+
), g = Q(
|
|
104
104
|
() => ["all", "onBlur"].includes(i) ? a : null,
|
|
105
105
|
[i]
|
|
106
106
|
);
|
|
107
107
|
return Q(
|
|
108
108
|
() => ({
|
|
109
109
|
onChangeTrigger: s,
|
|
110
|
-
onBlurTrigger:
|
|
110
|
+
onBlurTrigger: g
|
|
111
111
|
}),
|
|
112
|
-
[s,
|
|
112
|
+
[s, g]
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
const Co = ({
|
|
@@ -120,13 +120,13 @@ const Co = ({
|
|
|
120
120
|
readonly: a = !1,
|
|
121
121
|
disabled: d = !1,
|
|
122
122
|
optionsMap: s,
|
|
123
|
-
width:
|
|
123
|
+
width: g = "100%",
|
|
124
124
|
flex: c,
|
|
125
|
-
placeholder:
|
|
126
|
-
onSelect:
|
|
127
|
-
parser:
|
|
125
|
+
placeholder: m,
|
|
126
|
+
onSelect: p,
|
|
127
|
+
parser: h,
|
|
128
128
|
filter: S,
|
|
129
|
-
tooltipProps:
|
|
129
|
+
tooltipProps: u = {},
|
|
130
130
|
infoProps: C = {},
|
|
131
131
|
maxHeigthMenu: z,
|
|
132
132
|
isRequired: j = !1,
|
|
@@ -142,7 +142,7 @@ const Co = ({
|
|
|
142
142
|
debounceTime: 0
|
|
143
143
|
}), J = {
|
|
144
144
|
position: "top",
|
|
145
|
-
...
|
|
145
|
+
...u
|
|
146
146
|
}, A = {
|
|
147
147
|
...C,
|
|
148
148
|
tooltipProps: {
|
|
@@ -152,9 +152,9 @@ const Co = ({
|
|
|
152
152
|
}
|
|
153
153
|
}, T = (w, R) => {
|
|
154
154
|
let H = w;
|
|
155
|
-
|
|
155
|
+
h && (H = h == null ? void 0 : h(w)), R(H), p == null || p(H), k == null || k();
|
|
156
156
|
}, x = Q(() => G(s) ? s : Object.fromEntries(l.map((w) => [w.value, w])), [l, s]);
|
|
157
|
-
return /* @__PURE__ */ n.jsx(_, { width:
|
|
157
|
+
return /* @__PURE__ */ n.jsx(_, { width: g, flex: c, children: /* @__PURE__ */ n.jsx(
|
|
158
158
|
re,
|
|
159
159
|
{
|
|
160
160
|
name: t,
|
|
@@ -174,7 +174,7 @@ const Co = ({
|
|
|
174
174
|
readonly: a,
|
|
175
175
|
filter: S,
|
|
176
176
|
errorMessage: H == null ? void 0 : H.message,
|
|
177
|
-
placeholder:
|
|
177
|
+
placeholder: m,
|
|
178
178
|
value: B,
|
|
179
179
|
handleOption: (f) => {
|
|
180
180
|
T(f.value, w);
|
|
@@ -201,13 +201,13 @@ const Co = ({
|
|
|
201
201
|
disabled: a = !1,
|
|
202
202
|
width: d = "100%",
|
|
203
203
|
height: s = "100%",
|
|
204
|
-
flex:
|
|
204
|
+
flex: g,
|
|
205
205
|
placeholder: c,
|
|
206
|
-
charactersCounter:
|
|
207
|
-
maxlength:
|
|
208
|
-
resize:
|
|
206
|
+
charactersCounter: m = !0,
|
|
207
|
+
maxlength: p = 1e3,
|
|
208
|
+
resize: h = !0,
|
|
209
209
|
triggerFormField: S = null,
|
|
210
|
-
minHeight:
|
|
210
|
+
minHeight: u,
|
|
211
211
|
maxHeight: C,
|
|
212
212
|
...z
|
|
213
213
|
}) => {
|
|
@@ -218,7 +218,7 @@ const Co = ({
|
|
|
218
218
|
}), L = (b, v) => {
|
|
219
219
|
v(b), j == null || j();
|
|
220
220
|
};
|
|
221
|
-
return /* @__PURE__ */ n.jsx(_, { width: d, flex:
|
|
221
|
+
return /* @__PURE__ */ n.jsx(_, { width: d, flex: g, height: s, children: /* @__PURE__ */ n.jsx(
|
|
222
222
|
re,
|
|
223
223
|
{
|
|
224
224
|
name: t,
|
|
@@ -235,15 +235,15 @@ const Co = ({
|
|
|
235
235
|
disabled: a,
|
|
236
236
|
readonly: l,
|
|
237
237
|
height: s,
|
|
238
|
-
minHeight:
|
|
238
|
+
minHeight: u,
|
|
239
239
|
maxHeight: C,
|
|
240
240
|
errorMessage: M == null ? void 0 : M.message,
|
|
241
241
|
placeholder: c,
|
|
242
242
|
onChange: (k) => L(k.target.value, b),
|
|
243
|
-
charactersCounter:
|
|
244
|
-
maxlength:
|
|
243
|
+
charactersCounter: m,
|
|
244
|
+
maxlength: p,
|
|
245
245
|
size: "Small",
|
|
246
|
-
resize:
|
|
246
|
+
resize: h,
|
|
247
247
|
...z
|
|
248
248
|
}
|
|
249
249
|
)
|
|
@@ -259,13 +259,13 @@ const ko = ({
|
|
|
259
259
|
readonly: a = !1,
|
|
260
260
|
disabled: d = !1,
|
|
261
261
|
afterCheck: s,
|
|
262
|
-
width:
|
|
262
|
+
width: g = "100%",
|
|
263
263
|
formatter: c,
|
|
264
|
-
parser:
|
|
265
|
-
flex:
|
|
266
|
-
size:
|
|
264
|
+
parser: m,
|
|
265
|
+
flex: p,
|
|
266
|
+
size: h = "Medium",
|
|
267
267
|
triggerFormField: S = null,
|
|
268
|
-
...
|
|
268
|
+
...u
|
|
269
269
|
}) => {
|
|
270
270
|
const { onChangeTrigger: C } = le({
|
|
271
271
|
form: e,
|
|
@@ -275,7 +275,7 @@ const ko = ({
|
|
|
275
275
|
}), z = (j, L) => {
|
|
276
276
|
L(j), s == null || s(j), C == null || C();
|
|
277
277
|
};
|
|
278
|
-
return /* @__PURE__ */ n.jsx(_, { width:
|
|
278
|
+
return /* @__PURE__ */ n.jsx(_, { width: g, flex: p, children: /* @__PURE__ */ n.jsx(
|
|
279
279
|
re,
|
|
280
280
|
{
|
|
281
281
|
name: t,
|
|
@@ -295,12 +295,12 @@ const ko = ({
|
|
|
295
295
|
disabled: d || a,
|
|
296
296
|
onChange: (M) => {
|
|
297
297
|
z(
|
|
298
|
-
(
|
|
298
|
+
(m == null ? void 0 : m(M.target.checked, L)) ?? M.target.checked,
|
|
299
299
|
j
|
|
300
300
|
);
|
|
301
301
|
},
|
|
302
|
-
size:
|
|
303
|
-
...
|
|
302
|
+
size: h,
|
|
303
|
+
...u
|
|
304
304
|
}
|
|
305
305
|
);
|
|
306
306
|
}
|
|
@@ -429,36 +429,36 @@ const ko = ({
|
|
|
429
429
|
display: flex;
|
|
430
430
|
align-self: center;
|
|
431
431
|
`, Oe = (e, t, i = 0, l = 0, a = "left") => {
|
|
432
|
-
const [d, s] = P(0), [
|
|
433
|
-
if (!e.current || !
|
|
434
|
-
const
|
|
432
|
+
const [d, s] = P(0), [g, c] = P(), m = U(null), p = ue(() => {
|
|
433
|
+
if (!e.current || !m.current) return;
|
|
434
|
+
const h = e.current.getBoundingClientRect(), S = m.current.getBoundingClientRect(), u = window.innerHeight, C = window.innerWidth, z = h.top, j = u - h.bottom, L = j < S.height + l && z > j;
|
|
435
435
|
let b;
|
|
436
|
-
L ? (b =
|
|
437
|
-
let v =
|
|
436
|
+
L ? (b = h.top - S.height - i, m.current.style.maxHeight = `${z - i}px`) : (b = h.bottom + l, m.current.style.maxHeight = `${j - l}px`);
|
|
437
|
+
let v = h.left;
|
|
438
438
|
const M = v + S.width - C;
|
|
439
439
|
M > 0 && (v -= M), v < 0 && (v = 0);
|
|
440
|
-
const k = C -
|
|
441
|
-
Object.assign(
|
|
440
|
+
const k = C - h.right;
|
|
441
|
+
Object.assign(m.current.style, {
|
|
442
442
|
position: "fixed",
|
|
443
443
|
top: `${b}px`,
|
|
444
444
|
...a === "left" ? { left: `${v}px` } : { right: `${k}px` },
|
|
445
|
-
width: `${Math.max(
|
|
445
|
+
width: `${Math.max(h.width, S.width)}px`,
|
|
446
446
|
overflowY: "auto"
|
|
447
447
|
});
|
|
448
448
|
}, [i, l, a]);
|
|
449
449
|
return Z(() => {
|
|
450
450
|
var S;
|
|
451
|
-
s(0), c((S = e.current) == null ? void 0 : S.clientWidth),
|
|
452
|
-
const
|
|
453
|
-
return window.addEventListener("scroll",
|
|
454
|
-
window.removeEventListener("scroll",
|
|
451
|
+
s(0), c((S = e.current) == null ? void 0 : S.clientWidth), p();
|
|
452
|
+
const h = () => p();
|
|
453
|
+
return window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), () => {
|
|
454
|
+
window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
|
|
455
455
|
};
|
|
456
|
-
}, [e,
|
|
456
|
+
}, [e, p]), {
|
|
457
457
|
highlightedIndex: d,
|
|
458
458
|
setHighlightedIndex: s,
|
|
459
|
-
isOptionSelected: (
|
|
460
|
-
optionsRef:
|
|
461
|
-
parentWidth:
|
|
459
|
+
isOptionSelected: (h) => h.label === (t == null ? void 0 : t.label),
|
|
460
|
+
optionsRef: m,
|
|
461
|
+
parentWidth: g
|
|
462
462
|
};
|
|
463
463
|
}, ie = ge(
|
|
464
464
|
({
|
|
@@ -469,13 +469,13 @@ const ko = ({
|
|
|
469
469
|
value: a,
|
|
470
470
|
inputValue: d,
|
|
471
471
|
widthMenu: s,
|
|
472
|
-
maxHeightMenu:
|
|
472
|
+
maxHeightMenu: g = "180px",
|
|
473
473
|
menuIsOpen: c,
|
|
474
|
-
onEnter:
|
|
475
|
-
marginTop:
|
|
476
|
-
iconName:
|
|
474
|
+
onEnter: m,
|
|
475
|
+
marginTop: p = "4px",
|
|
476
|
+
iconName: h,
|
|
477
477
|
iconColor: S,
|
|
478
|
-
iconPosition:
|
|
478
|
+
iconPosition: u,
|
|
479
479
|
topOffset: C = 0,
|
|
480
480
|
bottomOffset: z = 0,
|
|
481
481
|
truncateText: j = !0,
|
|
@@ -486,7 +486,7 @@ const ko = ({
|
|
|
486
486
|
confirmSelection: k,
|
|
487
487
|
menuAlign: J = "left"
|
|
488
488
|
}, A) => {
|
|
489
|
-
G(
|
|
489
|
+
G(h) && (h += "Ant");
|
|
490
490
|
const {
|
|
491
491
|
highlightedIndex: T,
|
|
492
492
|
setHighlightedIndex: x,
|
|
@@ -514,7 +514,7 @@ const ko = ({
|
|
|
514
514
|
else if (y.key === "Enter" && t[T]) {
|
|
515
515
|
y.preventDefault();
|
|
516
516
|
const N = t[T];
|
|
517
|
-
l(N),
|
|
517
|
+
l(N), m && m(N);
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
};
|
|
@@ -523,14 +523,14 @@ const ko = ({
|
|
|
523
523
|
c,
|
|
524
524
|
t,
|
|
525
525
|
T,
|
|
526
|
-
|
|
526
|
+
m,
|
|
527
527
|
l,
|
|
528
528
|
k
|
|
529
529
|
]);
|
|
530
530
|
const B = (r) => typeof r == "string" ? r : je.isValidElement(r) && typeof r.props.children == "string" ? r.props.children : String(r), f = (r, y) => {
|
|
531
531
|
var E, I;
|
|
532
|
-
if (
|
|
533
|
-
const N = G((E = r.tooltipProps) == null ? void 0 : E.label), W = r.iconName ||
|
|
532
|
+
if (u !== y) return null;
|
|
533
|
+
const N = G((E = r.tooltipProps) == null ? void 0 : E.label), W = r.iconName || h || "InfoFill0Sm", D = /* @__PURE__ */ n.jsx(
|
|
534
534
|
Pe,
|
|
535
535
|
{
|
|
536
536
|
iconPosition: (I = r.tooltipProps) == null ? void 0 : I.position,
|
|
@@ -549,9 +549,9 @@ const ko = ({
|
|
|
549
549
|
return /* @__PURE__ */ n.jsx(
|
|
550
550
|
Me,
|
|
551
551
|
{
|
|
552
|
-
marginTop:
|
|
552
|
+
marginTop: p,
|
|
553
553
|
width: s ?? `${H}px`,
|
|
554
|
-
maxHeight:
|
|
554
|
+
maxHeight: g,
|
|
555
555
|
height: "fit-content",
|
|
556
556
|
ref: (r) => {
|
|
557
557
|
R.current = r, typeof A == "function" ? A(r) : A && (A.current = r);
|
|
@@ -601,7 +601,7 @@ const ko = ({
|
|
|
601
601
|
{
|
|
602
602
|
menuOptionFlexDirection: M,
|
|
603
603
|
menuJustifyContent: L,
|
|
604
|
-
iconName:
|
|
604
|
+
iconName: h,
|
|
605
605
|
isOptionSelected: w(r),
|
|
606
606
|
highlightedIndex: y === T,
|
|
607
607
|
"data-testid": r.value,
|
|
@@ -667,9 +667,9 @@ const De = ({
|
|
|
667
667
|
height: a,
|
|
668
668
|
flex: d,
|
|
669
669
|
children: s,
|
|
670
|
-
wrapperCustomStyles:
|
|
670
|
+
wrapperCustomStyles: g = {},
|
|
671
671
|
contentCustomStyles: c = {},
|
|
672
|
-
titleCustomStyles:
|
|
672
|
+
titleCustomStyles: m = {}
|
|
673
673
|
}) => /* @__PURE__ */ n.jsxs(
|
|
674
674
|
_,
|
|
675
675
|
{
|
|
@@ -682,7 +682,7 @@ const De = ({
|
|
|
682
682
|
backgroundColor: o.colors.backgroundColors.colorBackgroundSnow,
|
|
683
683
|
border: `1px solid ${o.colors.neutralColors.colorNeutralSoft}`,
|
|
684
684
|
borderRadius: "8px",
|
|
685
|
-
...
|
|
685
|
+
...g
|
|
686
686
|
},
|
|
687
687
|
children: [
|
|
688
688
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -692,7 +692,7 @@ const De = ({
|
|
|
692
692
|
direction: "horizontal",
|
|
693
693
|
customStyles: c,
|
|
694
694
|
children: [
|
|
695
|
-
e ? /* @__PURE__ */ n.jsx(_, { width: "fit-content", customStyles:
|
|
695
|
+
e ? /* @__PURE__ */ n.jsx(_, { width: "fit-content", customStyles: m, children: /* @__PURE__ */ n.jsx(ce, { title: e, divider: !1 }) }) : null,
|
|
696
696
|
t ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
697
697
|
/* @__PURE__ */ n.jsx(ke, { size: "auto", direction: "horizontal" }),
|
|
698
698
|
/* @__PURE__ */ n.jsx(
|
|
@@ -873,7 +873,7 @@ const Ve = $.p`
|
|
|
873
873
|
margin-top: ${o.spacings.spacingInline.spacingInlineNano};
|
|
874
874
|
width: 100%;
|
|
875
875
|
`, Ze = (e, { value: t, options: i }) => {
|
|
876
|
-
const [l, a] = P(!1), [d, s] = P(!1), [
|
|
876
|
+
const [l, a] = P(!1), [d, s] = P(!1), [g, c] = P(""), [m, p] = P(i), h = U(null), S = U(null), u = U(null), C = U(null);
|
|
877
877
|
Z(() => {
|
|
878
878
|
const b = () => {
|
|
879
879
|
s(!1);
|
|
@@ -883,16 +883,16 @@ const Ve = $.p`
|
|
|
883
883
|
};
|
|
884
884
|
}, []);
|
|
885
885
|
function z(b) {
|
|
886
|
-
c(""), s(!1), a(!0),
|
|
886
|
+
c(""), s(!1), a(!0), u != null && u.current && u.current.focus(), b !== t && e(b);
|
|
887
887
|
}
|
|
888
888
|
const j = (b) => {
|
|
889
889
|
if (b) {
|
|
890
890
|
const v = new RegExp(b, "i"), M = i.filter(
|
|
891
891
|
(k) => v.exec(k.label)
|
|
892
892
|
);
|
|
893
|
-
|
|
893
|
+
p(M);
|
|
894
894
|
} else
|
|
895
|
-
|
|
895
|
+
p(i);
|
|
896
896
|
};
|
|
897
897
|
function L(b) {
|
|
898
898
|
return !b;
|
|
@@ -902,13 +902,13 @@ const Ve = $.p`
|
|
|
902
902
|
setIsOpen: a,
|
|
903
903
|
expanded: d,
|
|
904
904
|
setExpanded: s,
|
|
905
|
-
inputValue:
|
|
905
|
+
inputValue: g,
|
|
906
906
|
setInputValue: c,
|
|
907
|
-
optionsSelect:
|
|
908
|
-
setOptionSelect:
|
|
909
|
-
selectContainerRef:
|
|
907
|
+
optionsSelect: m,
|
|
908
|
+
setOptionSelect: p,
|
|
909
|
+
selectContainerRef: h,
|
|
910
910
|
containerRef: S,
|
|
911
|
-
inputContainerRef:
|
|
911
|
+
inputContainerRef: u,
|
|
912
912
|
optionsRef: C,
|
|
913
913
|
selectOption: z,
|
|
914
914
|
handlerFilterOptions: j,
|
|
@@ -923,13 +923,13 @@ const Ve = $.p`
|
|
|
923
923
|
placeholder: a,
|
|
924
924
|
label: d,
|
|
925
925
|
size: s = "Medium",
|
|
926
|
-
width:
|
|
926
|
+
width: g = "100%",
|
|
927
927
|
disabled: c,
|
|
928
|
-
helpText:
|
|
929
|
-
readonly:
|
|
930
|
-
errorMessage:
|
|
928
|
+
helpText: m,
|
|
929
|
+
readonly: p,
|
|
930
|
+
errorMessage: h,
|
|
931
931
|
tooltipProps: S = {},
|
|
932
|
-
onBlur:
|
|
932
|
+
onBlur: u,
|
|
933
933
|
onEnter: C,
|
|
934
934
|
variant: z = "default",
|
|
935
935
|
infoProps: j = {},
|
|
@@ -954,8 +954,8 @@ const Ve = $.p`
|
|
|
954
954
|
setOptionSelect: W,
|
|
955
955
|
handlerFilterOptions: D,
|
|
956
956
|
isValue: E
|
|
957
|
-
} = Ze(t, { value: e, options: i }), I = !!
|
|
958
|
-
label:
|
|
957
|
+
} = Ze(t, { value: e, options: i }), I = !!h, X = {
|
|
958
|
+
label: h,
|
|
959
959
|
...S,
|
|
960
960
|
wrapperWidth: "auto",
|
|
961
961
|
isActive: I,
|
|
@@ -976,10 +976,10 @@ const Ve = $.p`
|
|
|
976
976
|
Xe,
|
|
977
977
|
{
|
|
978
978
|
ref: f,
|
|
979
|
-
width:
|
|
979
|
+
width: g,
|
|
980
980
|
size: s,
|
|
981
981
|
disabled: c,
|
|
982
|
-
readonly:
|
|
982
|
+
readonly: p,
|
|
983
983
|
children: [
|
|
984
984
|
d && /* @__PURE__ */ n.jsxs(Je, { children: [
|
|
985
985
|
/* @__PURE__ */ n.jsxs(Ye, { "data-testid": "label", ref: J, children: [
|
|
@@ -992,23 +992,23 @@ const Ve = $.p`
|
|
|
992
992
|
_e,
|
|
993
993
|
{
|
|
994
994
|
hasError: I,
|
|
995
|
-
readonly:
|
|
995
|
+
readonly: p,
|
|
996
996
|
ref: r,
|
|
997
997
|
onBlur: () => {
|
|
998
998
|
setTimeout(() => {
|
|
999
|
-
(A || x) && y.current !== document.activeElement && (
|
|
999
|
+
(A || x) && y.current !== document.activeElement && (u && u(e), T(!1), w(!1));
|
|
1000
1000
|
}, 250);
|
|
1001
1001
|
},
|
|
1002
1002
|
onClick: () => {
|
|
1003
|
-
!c && !
|
|
1003
|
+
!c && !p && (A && !x ? (w(!0), y != null && y.current && y.current.focus()) : !A && !x ? (T(!0), w(!0), y != null && y.current && y.current.focus()) : (T(!1), w(!1), y != null && y.current && y.current.blur()), !R && W(i));
|
|
1004
1004
|
},
|
|
1005
1005
|
tabIndex: 0,
|
|
1006
|
-
width:
|
|
1006
|
+
width: g,
|
|
1007
1007
|
size: s,
|
|
1008
1008
|
isOpen: A || x,
|
|
1009
1009
|
"data-testid": "select",
|
|
1010
1010
|
disabled: c,
|
|
1011
|
-
helpText:
|
|
1011
|
+
helpText: m,
|
|
1012
1012
|
variant: z,
|
|
1013
1013
|
children: [
|
|
1014
1014
|
/* @__PURE__ */ n.jsxs(Ue, { children: [
|
|
@@ -1024,7 +1024,7 @@ const Ve = $.p`
|
|
|
1024
1024
|
onChange: (Y) => {
|
|
1025
1025
|
H(Y.target.value), Y.target.value.length > 0 && (T(!0), w(!0)), D(Y.target.value);
|
|
1026
1026
|
},
|
|
1027
|
-
readOnly:
|
|
1027
|
+
readOnly: p,
|
|
1028
1028
|
width: R.length,
|
|
1029
1029
|
size: s,
|
|
1030
1030
|
disabled: c,
|
|
@@ -1053,7 +1053,7 @@ const Ve = $.p`
|
|
|
1053
1053
|
]
|
|
1054
1054
|
}
|
|
1055
1055
|
) }),
|
|
1056
|
-
|
|
1056
|
+
m && /* @__PURE__ */ n.jsx(Ve, { size: s, children: m })
|
|
1057
1057
|
]
|
|
1058
1058
|
}
|
|
1059
1059
|
);
|
|
@@ -1212,17 +1212,17 @@ const to = $.div`
|
|
|
1212
1212
|
disabled: a = !1,
|
|
1213
1213
|
isLoading: d = !1,
|
|
1214
1214
|
onClick: s,
|
|
1215
|
-
options:
|
|
1215
|
+
options: g,
|
|
1216
1216
|
label: c,
|
|
1217
|
-
menuSelectProps:
|
|
1218
|
-
iconName:
|
|
1219
|
-
optionsIconPosition:
|
|
1217
|
+
menuSelectProps: m = {},
|
|
1218
|
+
iconName: p,
|
|
1219
|
+
optionsIconPosition: h
|
|
1220
1220
|
}) => {
|
|
1221
|
-
const { isOpen: S, setIsOpen:
|
|
1221
|
+
const { isOpen: S, setIsOpen: u, selectContainerRef: C, optionsSelect: z } = no(g);
|
|
1222
1222
|
let j = o.colors.backgroundColors.colorBackgroundSnow;
|
|
1223
1223
|
a ? j = o.colors.neutralColors.colorNeutralCloudy : t !== "primary" && (j = o.colors.neutralColors.colorNeutralDark);
|
|
1224
1224
|
const L = {
|
|
1225
|
-
...
|
|
1225
|
+
...m
|
|
1226
1226
|
};
|
|
1227
1227
|
return /* @__PURE__ */ n.jsxs(
|
|
1228
1228
|
eo,
|
|
@@ -1231,7 +1231,7 @@ const to = $.div`
|
|
|
1231
1231
|
width: i,
|
|
1232
1232
|
size: l,
|
|
1233
1233
|
disabled: a,
|
|
1234
|
-
onBlur: () => setTimeout(() =>
|
|
1234
|
+
onBlur: () => setTimeout(() => u(!1), ro),
|
|
1235
1235
|
children: [
|
|
1236
1236
|
c && /* @__PURE__ */ n.jsx(oo, { children: c }),
|
|
1237
1237
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -1242,7 +1242,7 @@ const to = $.div`
|
|
|
1242
1242
|
disabled: a,
|
|
1243
1243
|
variant: t,
|
|
1244
1244
|
isLoading: d,
|
|
1245
|
-
onClick: () => !d &&
|
|
1245
|
+
onClick: () => !d && u(!S),
|
|
1246
1246
|
id: `button-component-${e}`,
|
|
1247
1247
|
children: [
|
|
1248
1248
|
d && /* @__PURE__ */ n.jsx(to, { size: l, disabled: a, variant: t, children: /* @__PURE__ */ n.jsx(
|
|
@@ -1281,8 +1281,8 @@ const to = $.div`
|
|
|
1281
1281
|
selectOption: s,
|
|
1282
1282
|
size: l,
|
|
1283
1283
|
inputValue: null,
|
|
1284
|
-
iconPosition:
|
|
1285
|
-
iconName:
|
|
1284
|
+
iconPosition: h,
|
|
1285
|
+
iconName: p,
|
|
1286
1286
|
...L
|
|
1287
1287
|
}
|
|
1288
1288
|
)
|
|
@@ -1342,25 +1342,25 @@ const to = $.div`
|
|
|
1342
1342
|
options: a = [],
|
|
1343
1343
|
heightItems: d = "60px",
|
|
1344
1344
|
widthItems: s = "155px",
|
|
1345
|
-
emptyProps:
|
|
1345
|
+
emptyProps: g = {
|
|
1346
1346
|
title: "Nenhum dado a ser mostrado",
|
|
1347
1347
|
body: null
|
|
1348
1348
|
}
|
|
1349
1349
|
}) => {
|
|
1350
1350
|
var S;
|
|
1351
|
-
const [c,
|
|
1351
|
+
const [c, m] = P(a[0] || null), p = U(null), h = U(null);
|
|
1352
1352
|
return Z(() => {
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1353
|
+
const u = p.current, C = h.current, z = () => {
|
|
1354
|
+
u && C && (C.scrollTop = u.scrollTop);
|
|
1355
1355
|
};
|
|
1356
|
-
return
|
|
1357
|
-
|
|
1356
|
+
return u == null || u.addEventListener("scroll", z), () => {
|
|
1357
|
+
u == null || u.removeEventListener("scroll", z);
|
|
1358
1358
|
};
|
|
1359
1359
|
}, []), (a == null ? void 0 : a.length) === 0 ? /* @__PURE__ */ n.jsx(
|
|
1360
1360
|
he,
|
|
1361
1361
|
{
|
|
1362
|
-
title:
|
|
1363
|
-
body:
|
|
1362
|
+
title: g.title,
|
|
1363
|
+
body: g.body,
|
|
1364
1364
|
flex: "1",
|
|
1365
1365
|
mode: "table"
|
|
1366
1366
|
}
|
|
@@ -1377,22 +1377,22 @@ const to = $.div`
|
|
|
1377
1377
|
borderRadius: o.borders.borderRadius.borderRadiusSm
|
|
1378
1378
|
},
|
|
1379
1379
|
children: [
|
|
1380
|
-
/* @__PURE__ */ n.jsx(lo, { ref:
|
|
1380
|
+
/* @__PURE__ */ n.jsx(lo, { ref: p, widthItems: s, children: a == null ? void 0 : a.map((u, C) => /* @__PURE__ */ n.jsx(
|
|
1381
1381
|
io,
|
|
1382
1382
|
{
|
|
1383
|
-
selected: (c == null ? void 0 : c.key) ===
|
|
1384
|
-
onClick: () =>
|
|
1383
|
+
selected: (c == null ? void 0 : c.key) === u.key,
|
|
1384
|
+
onClick: () => m(u),
|
|
1385
1385
|
withBorderRight: !1,
|
|
1386
1386
|
heightItems: d,
|
|
1387
|
-
children:
|
|
1387
|
+
children: u.item
|
|
1388
1388
|
},
|
|
1389
1389
|
C
|
|
1390
1390
|
)) }),
|
|
1391
|
-
/* @__PURE__ */ n.jsx(co, { ref:
|
|
1391
|
+
/* @__PURE__ */ n.jsx(co, { ref: h, children: (S = a == null ? void 0 : a.concat({ key: "last", item: /* @__PURE__ */ n.jsx(n.Fragment, {}), contentItem: /* @__PURE__ */ n.jsx(n.Fragment, {}) })) == null ? void 0 : S.map((u, C) => /* @__PURE__ */ n.jsx(
|
|
1392
1392
|
so,
|
|
1393
1393
|
{
|
|
1394
|
-
selected: (c == null ? void 0 : c.key) ===
|
|
1395
|
-
onClick: () =>
|
|
1394
|
+
selected: (c == null ? void 0 : c.key) === u.key,
|
|
1395
|
+
onClick: () => m(u),
|
|
1396
1396
|
withBorderRight: !0,
|
|
1397
1397
|
heightItems: d
|
|
1398
1398
|
},
|
|
@@ -1580,9 +1580,9 @@ function jo({
|
|
|
1580
1580
|
fit: a = !1,
|
|
1581
1581
|
maxHeight: d = "40rem",
|
|
1582
1582
|
columns: s,
|
|
1583
|
-
dataSource:
|
|
1583
|
+
dataSource: g,
|
|
1584
1584
|
columnsTextSize: c = i,
|
|
1585
|
-
emptyProps:
|
|
1585
|
+
emptyProps: m = {
|
|
1586
1586
|
width: "100%",
|
|
1587
1587
|
height: "100%",
|
|
1588
1588
|
title: "Nenhum dado a ser mostrado.",
|
|
@@ -1590,10 +1590,10 @@ function jo({
|
|
|
1590
1590
|
borders: !0,
|
|
1591
1591
|
backgroundColor: o.colors.backgroundColors.colorBackgroundSnow
|
|
1592
1592
|
},
|
|
1593
|
-
selectedRow:
|
|
1594
|
-
hideHeader:
|
|
1593
|
+
selectedRow: p = !1,
|
|
1594
|
+
hideHeader: h = !1,
|
|
1595
1595
|
withBorder: S = !0,
|
|
1596
|
-
withBorderRadius:
|
|
1596
|
+
withBorderRadius: u = !0,
|
|
1597
1597
|
striped: C = !1,
|
|
1598
1598
|
borderRadius: z = o.borders.borderRadius.borderRadiusSm
|
|
1599
1599
|
}) {
|
|
@@ -1659,7 +1659,7 @@ function jo({
|
|
|
1659
1659
|
(x) => x.mergeHeaderId && x.mergeHeaderLabel
|
|
1660
1660
|
) : !1, [k]), T = Q(() => {
|
|
1661
1661
|
var H, B;
|
|
1662
|
-
if (
|
|
1662
|
+
if (h || !k || k.length === 0)
|
|
1663
1663
|
return null;
|
|
1664
1664
|
if (!A)
|
|
1665
1665
|
return /* @__PURE__ */ n.jsx(
|
|
@@ -1682,7 +1682,7 @@ function jo({
|
|
|
1682
1682
|
columnsTextSize: c,
|
|
1683
1683
|
withBorder: S,
|
|
1684
1684
|
headerAlign: f.headerAlign,
|
|
1685
|
-
children: ((r = f.columnRender) == null ? void 0 : r.call(f,
|
|
1685
|
+
children: ((r = f.columnRender) == null ? void 0 : r.call(f, g)) || /* @__PURE__ */ n.jsx("span", { title: f.label, children: f.label })
|
|
1686
1686
|
},
|
|
1687
1687
|
f.dataIndex
|
|
1688
1688
|
);
|
|
@@ -1731,7 +1731,7 @@ function jo({
|
|
|
1731
1731
|
columnsTextSize: c,
|
|
1732
1732
|
withBorder: S,
|
|
1733
1733
|
headerAlign: f.headerAlign,
|
|
1734
|
-
children: ((H = W.columnRender) == null ? void 0 : H.call(W,
|
|
1734
|
+
children: ((H = W.columnRender) == null ? void 0 : H.call(W, g)) || /* @__PURE__ */ n.jsx("span", { title: W.label, children: W.label })
|
|
1735
1735
|
},
|
|
1736
1736
|
W.dataIndex + "-individual"
|
|
1737
1737
|
)
|
|
@@ -1753,7 +1753,7 @@ function jo({
|
|
|
1753
1753
|
withBorder: S,
|
|
1754
1754
|
headerAlign: f.headerAlign,
|
|
1755
1755
|
isTopRow: !0,
|
|
1756
|
-
children: ((B = f.columnRender) == null ? void 0 : B.call(f,
|
|
1756
|
+
children: ((B = f.columnRender) == null ? void 0 : B.call(f, g)) || /* @__PURE__ */ n.jsx("span", { title: f.label, children: f.label })
|
|
1757
1757
|
},
|
|
1758
1758
|
f.dataIndex
|
|
1759
1759
|
)
|
|
@@ -1781,25 +1781,25 @@ function jo({
|
|
|
1781
1781
|
}
|
|
1782
1782
|
)
|
|
1783
1783
|
] });
|
|
1784
|
-
}, [k,
|
|
1785
|
-
return !
|
|
1784
|
+
}, [k, h, i, c, A]);
|
|
1785
|
+
return !g || g.length === 0 ? /* @__PURE__ */ n.jsx(
|
|
1786
1786
|
he,
|
|
1787
1787
|
{
|
|
1788
1788
|
backgroundColor: o.colors.backgroundColors.colorBackgroundSnow,
|
|
1789
1789
|
borders: !0,
|
|
1790
1790
|
mode: "table",
|
|
1791
|
-
...
|
|
1791
|
+
...m
|
|
1792
1792
|
}
|
|
1793
1793
|
) : /* @__PURE__ */ n.jsx(
|
|
1794
1794
|
fo,
|
|
1795
1795
|
{
|
|
1796
1796
|
maxHeight: d,
|
|
1797
|
-
withBorderRadius:
|
|
1797
|
+
withBorderRadius: u,
|
|
1798
1798
|
ref: M,
|
|
1799
1799
|
borderRadius: z,
|
|
1800
1800
|
children: /* @__PURE__ */ n.jsxs(ho, { id: e, ref: v, children: [
|
|
1801
1801
|
/* @__PURE__ */ n.jsx("thead", { children: T }),
|
|
1802
|
-
/* @__PURE__ */ n.jsx("tbody", { style: { width: "100%" }, children:
|
|
1802
|
+
/* @__PURE__ */ n.jsx("tbody", { style: { width: "100%" }, children: g == null ? void 0 : g.map((x, w, R) => {
|
|
1803
1803
|
const H = j(x);
|
|
1804
1804
|
return /* @__PURE__ */ n.jsx(
|
|
1805
1805
|
ee,
|
|
@@ -1808,7 +1808,7 @@ function jo({
|
|
|
1808
1808
|
fit: a,
|
|
1809
1809
|
size: i,
|
|
1810
1810
|
withBorder: S,
|
|
1811
|
-
isSelected: H === L &&
|
|
1811
|
+
isSelected: H === L && p,
|
|
1812
1812
|
striped: C && w % 2 !== 0,
|
|
1813
1813
|
borderRadius: z,
|
|
1814
1814
|
children: k.map((B) => {
|
|
@@ -1822,7 +1822,7 @@ function jo({
|
|
|
1822
1822
|
size: i,
|
|
1823
1823
|
isClickable: G(l),
|
|
1824
1824
|
onClick: () => {
|
|
1825
|
-
l && l(x, B, w),
|
|
1825
|
+
l && l(x, B, w), p && b(
|
|
1826
1826
|
L === H ? null : H
|
|
1827
1827
|
);
|
|
1828
1828
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Checkbox.view-DFbiE7Mi.cjs"),t=require("../Title.view-B2dLqH4V.cjs"),i=require("../RequiredLabel.view-DRKx7lq3.cjs"),o=require("../Table.view-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Checkbox.view-DFbiE7Mi.cjs"),t=require("../Title.view-B2dLqH4V.cjs"),i=require("../RequiredLabel.view-DRKx7lq3.cjs"),o=require("../Table.view-BipNpove.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.TabInfo=o.TabInfo;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 f, F as S, I as m, f as C, L as T, g as b, b as p, 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-D75146I3.js";
|
|
2
2
|
import { E as I, S as A, T as E } from "../Title.view-DGXidSXd.js";
|
|
3
3
|
import { A as k, L as V, R as j } from "../RequiredLabel.view-Cv_y1fuR.js";
|
|
4
|
-
import { a as y, C as v, M as z, b as D, c as G, d as H, S as J, e as K, f as N, T as O } from "../Table.view-
|
|
4
|
+
import { a as y, C as v, M as z, b as D, c as G, d as H, S as J, e as K, f as N, T as O } from "../Table.view-CHEV4kuX.js";
|
|
5
5
|
export {
|
|
6
6
|
s as ActionButton,
|
|
7
7
|
k as AlertInline,
|
|
@@ -7,6 +7,7 @@ type CollapseSectionProps = {
|
|
|
7
7
|
wrapperCustomStyles?: CSSProperties;
|
|
8
8
|
marginBottom?: string;
|
|
9
9
|
hideAdornmentOnCollapse?: boolean;
|
|
10
|
+
maxHeight?: string;
|
|
10
11
|
};
|
|
11
|
-
export declare const CollapseSection: ({ title, children, endAdornment, marginBottom, customStyles, wrapperCustomStyles, hideAdornmentOnCollapse, }: CollapseSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const CollapseSection: ({ title, children, endAdornment, marginBottom, customStyles, wrapperCustomStyles, hideAdornmentOnCollapse, maxHeight, }: CollapseSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Table.view-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Table.view-BipNpove.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.TabInfo=e.TabInfo;exports.Table=e.Table;exports.TextareaField=e.TextareaField;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as s, C as l, M as t, b as c, c as o, d as S, S as i, e as n, f as b, T as d } from "../../Table.view-
|
|
1
|
+
import { a as s, C as l, M as t, b as c, c as o, d as S, S as i, e as n, f as b, T as d } from "../../Table.view-CHEV4kuX.js";
|
|
2
2
|
export {
|
|
3
3
|
s as CheckboxField,
|
|
4
4
|
l 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-DFbiE7Mi.cjs"),o=require("./Title.view-B2dLqH4V.cjs"),l=require("./RequiredLabel.view-DRKx7lq3.cjs"),t=require("./Table.view-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Checkbox.view-DFbiE7Mi.cjs"),o=require("./Title.view-B2dLqH4V.cjs"),l=require("./RequiredLabel.view-DRKx7lq3.cjs"),t=require("./Table.view-BipNpove.cjs"),i=require("./index-BcwQwoIM.cjs"),a=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.TabInfo=t.TabInfo;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=a.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 f, F as m, I as S, f as p, L as b, g as x, b as T, M as C, R as F, i as u, S as L, j as B, T as M, s as g, h, k as w } from "./Checkbox.view-D75146I3.js";
|
|
2
2
|
import { E as I, S as R, T as y } from "./Title.view-DGXidSXd.js";
|
|
3
3
|
import { A as k, L as v, R as z } from "./RequiredLabel.view-Cv_y1fuR.js";
|
|
4
|
-
import { a as V, C as j, M as q, b as H, c as D, d as J, S as K, e as N, f as O, T as P } from "./Table.view-
|
|
4
|
+
import { a as V, C as j, M as q, b as H, c as D, d as J, S as K, e as N, f as O, T as P } from "./Table.view-CHEV4kuX.js";
|
|
5
5
|
import { a as U, c as W, b as X, d as Y, r as Z, v as _ } from "./index-_v6RoRxb.js";
|
|
6
6
|
import { stableStringify as aa } from "./helpers/index.es.js";
|
|
7
7
|
export {
|
package/package.json
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@ufal-lccv/gpsub-ds",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "Design system temporário do GP-SUB para auxiliar na futura migração para o DS Subweb 2.0",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/Subweb-LCCV/gpsub-ds.git"
|
|
9
|
-
},
|
|
10
|
-
"main": "dist/index.cjs.js",
|
|
11
|
-
"types": "dist/index.d.ts",
|
|
12
|
-
"module": "dist/index.es.js",
|
|
13
|
-
"exports": {
|
|
14
|
-
".": {
|
|
15
|
-
"import": "./dist/index.es.js",
|
|
16
|
-
"require": "./dist/index.cjs.js",
|
|
17
|
-
"types": "./dist/index.d.ts"
|
|
18
|
-
},
|
|
19
|
-
"./components": {
|
|
20
|
-
"import": "./dist/components/index.es.js",
|
|
21
|
-
"require": "./dist/components/index.cjs.js",
|
|
22
|
-
"types": "./dist/components/index.d.ts"
|
|
23
|
-
},
|
|
24
|
-
"./components/atoms": {
|
|
25
|
-
"import": "./dist/components/atoms/index.es.js",
|
|
26
|
-
"require": "./dist/components/atoms/index.cjs.js",
|
|
27
|
-
"types": "./dist/components/atoms/index.d.ts"
|
|
28
|
-
},
|
|
29
|
-
"./components/molecules": {
|
|
30
|
-
"import": "./dist/components/molecules/index.es.js",
|
|
31
|
-
"require": "./dist/components/molecules/index.cjs.js",
|
|
32
|
-
"types": "./dist/components/molecules/index.d.ts"
|
|
33
|
-
},
|
|
34
|
-
"./components/organisms": {
|
|
35
|
-
"import": "./dist/components/organisms/index.es.js",
|
|
36
|
-
"require": "./dist/components/organisms/index.cjs.js",
|
|
37
|
-
"types": "./dist/components/organisms/index.d.ts"
|
|
38
|
-
},
|
|
39
|
-
"./helpers": {
|
|
40
|
-
"import": "./dist/helpers/index.es.js",
|
|
41
|
-
"require": "./dist/helpers/index.cjs.js",
|
|
42
|
-
"types": "./dist/helpers/index.d.ts"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"files": [
|
|
46
|
-
"dist/",
|
|
47
|
-
"dist/components",
|
|
48
|
-
"dist/components/atoms",
|
|
49
|
-
"dist/components/molecules",
|
|
50
|
-
"dist/components/organisms",
|
|
51
|
-
"dist/helpers"
|
|
52
|
-
],
|
|
53
|
-
"scripts": {
|
|
54
|
-
"publish:public": "npm run build && npm publish --access public",
|
|
55
|
-
"publish:private": "npm run build && npm publish --access restricted",
|
|
56
|
-
"clean": "rimraf -rf dist",
|
|
57
|
-
"build": "npm run clean && vite build",
|
|
58
|
-
"build:watch": "vite build --watch",
|
|
59
|
-
"build:publish": "npm run build && npm run publish",
|
|
60
|
-
"lint": "eslint . --ext .ts,.tsx && tsc",
|
|
61
|
-
"lint:fix": "eslint . --ext .ts,.tsx --fix",
|
|
62
|
-
"prettier:fix": "prettier --write .",
|
|
63
|
-
"prettier:check": "prettier --check ."
|
|
64
|
-
},
|
|
65
|
-
"keywords": [],
|
|
66
|
-
"author": "Eric Macedo Cabral",
|
|
67
|
-
"license": "ISC",
|
|
68
|
-
"peerDependencies": {
|
|
69
|
-
"react": "^18.2.0",
|
|
70
|
-
"react-dom": "^18.2.0",
|
|
71
|
-
"react-hook-form": "7.55.0",
|
|
72
|
-
"sbwb-ds": "1.2.2"
|
|
73
|
-
},
|
|
74
|
-
"dependencies": {
|
|
75
|
-
"debounce": "^1.2.1",
|
|
76
|
-
"postmate": "^1.5.2",
|
|
77
|
-
"react-datepicker": "^4.18.0",
|
|
78
|
-
"react-router-dom": "^6.9.0",
|
|
79
|
-
"react-text-mask": "^5.5.0",
|
|
80
|
-
"sbwb-icons": "1.2.0",
|
|
81
|
-
"styled-components": "^5.3.9"
|
|
82
|
-
},
|
|
83
|
-
"resolutions": {
|
|
84
|
-
"@types/react": "^18.2.0",
|
|
85
|
-
"@types/react-dom": "^18.2.0",
|
|
86
|
-
"react": "^18.2.0",
|
|
87
|
-
"react-dom": "^18.2.0",
|
|
88
|
-
"sbwb-ds": "1.2.2"
|
|
89
|
-
},
|
|
90
|
-
"devDependencies": {
|
|
91
|
-
"@babel/core": "^7.21.3",
|
|
92
|
-
"@changesets/cli": "^2.29.4",
|
|
93
|
-
"@swc/core": "^1.3.40",
|
|
94
|
-
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
95
|
-
"@types/node": "^24.0.3",
|
|
96
|
-
"@types/react": "^18.2.0",
|
|
97
|
-
"@types/react-dom": "^18.2.0",
|
|
98
|
-
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
|
99
|
-
"@typescript-eslint/parser": "^6.4.0",
|
|
100
|
-
"@vitejs/plugin-react": "^4.7.0",
|
|
101
|
-
"babel-loader": "^8.3.0",
|
|
102
|
-
"eslint": "^8.57.1",
|
|
103
|
-
"eslint-config-airbnb-typescript": "^17.1.0",
|
|
104
|
-
"eslint-config-prettier": "^8.7.0",
|
|
105
|
-
"eslint-config-standard-with-typescript": "^43.0.1",
|
|
106
|
-
"eslint-plugin-import": "^2.27.5",
|
|
107
|
-
"eslint-plugin-n": "^15.6.1",
|
|
108
|
-
"eslint-plugin-promise": "^6.1.1",
|
|
109
|
-
"eslint-plugin-react": "^7.32.2",
|
|
110
|
-
"prettier": "^3.5.3",
|
|
111
|
-
"pretty-quick": "^4.1.1",
|
|
112
|
-
"rimraf": "^5.0.10",
|
|
113
|
-
"sbwb-ds": "1.2.2",
|
|
114
|
-
"typescript": "^5.6.3",
|
|
115
|
-
"vite": "^5.4.10",
|
|
116
|
-
"vite-plugin-dts": "^4.5.4",
|
|
117
|
-
"vite-plugin-svgr": "^4.3.0"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@ufal-lccv/gpsub-ds",
|
|
3
|
+
"version": "0.0.13",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Design system temporário do GP-SUB para auxiliar na futura migração para o DS Subweb 2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/Subweb-LCCV/gpsub-ds.git"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/index.cjs.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"module": "dist/index.es.js",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/index.es.js",
|
|
16
|
+
"require": "./dist/index.cjs.js",
|
|
17
|
+
"types": "./dist/index.d.ts"
|
|
18
|
+
},
|
|
19
|
+
"./components": {
|
|
20
|
+
"import": "./dist/components/index.es.js",
|
|
21
|
+
"require": "./dist/components/index.cjs.js",
|
|
22
|
+
"types": "./dist/components/index.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./components/atoms": {
|
|
25
|
+
"import": "./dist/components/atoms/index.es.js",
|
|
26
|
+
"require": "./dist/components/atoms/index.cjs.js",
|
|
27
|
+
"types": "./dist/components/atoms/index.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./components/molecules": {
|
|
30
|
+
"import": "./dist/components/molecules/index.es.js",
|
|
31
|
+
"require": "./dist/components/molecules/index.cjs.js",
|
|
32
|
+
"types": "./dist/components/molecules/index.d.ts"
|
|
33
|
+
},
|
|
34
|
+
"./components/organisms": {
|
|
35
|
+
"import": "./dist/components/organisms/index.es.js",
|
|
36
|
+
"require": "./dist/components/organisms/index.cjs.js",
|
|
37
|
+
"types": "./dist/components/organisms/index.d.ts"
|
|
38
|
+
},
|
|
39
|
+
"./helpers": {
|
|
40
|
+
"import": "./dist/helpers/index.es.js",
|
|
41
|
+
"require": "./dist/helpers/index.cjs.js",
|
|
42
|
+
"types": "./dist/helpers/index.d.ts"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"dist/",
|
|
47
|
+
"dist/components",
|
|
48
|
+
"dist/components/atoms",
|
|
49
|
+
"dist/components/molecules",
|
|
50
|
+
"dist/components/organisms",
|
|
51
|
+
"dist/helpers"
|
|
52
|
+
],
|
|
53
|
+
"scripts": {
|
|
54
|
+
"publish:public": "npm run build && npm publish --access public",
|
|
55
|
+
"publish:private": "npm run build && npm publish --access restricted",
|
|
56
|
+
"clean": "rimraf -rf dist",
|
|
57
|
+
"build": "npm run clean && vite build",
|
|
58
|
+
"build:watch": "vite build --watch",
|
|
59
|
+
"build:publish": "npm run build && npm run publish",
|
|
60
|
+
"lint": "eslint . --ext .ts,.tsx && tsc",
|
|
61
|
+
"lint:fix": "eslint . --ext .ts,.tsx --fix",
|
|
62
|
+
"prettier:fix": "prettier --write .",
|
|
63
|
+
"prettier:check": "prettier --check ."
|
|
64
|
+
},
|
|
65
|
+
"keywords": [],
|
|
66
|
+
"author": "Eric Macedo Cabral",
|
|
67
|
+
"license": "ISC",
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"react": "^18.2.0",
|
|
70
|
+
"react-dom": "^18.2.0",
|
|
71
|
+
"react-hook-form": "7.55.0",
|
|
72
|
+
"sbwb-ds": "1.2.2"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"debounce": "^1.2.1",
|
|
76
|
+
"postmate": "^1.5.2",
|
|
77
|
+
"react-datepicker": "^4.18.0",
|
|
78
|
+
"react-router-dom": "^6.9.0",
|
|
79
|
+
"react-text-mask": "^5.5.0",
|
|
80
|
+
"sbwb-icons": "1.2.0",
|
|
81
|
+
"styled-components": "^5.3.9"
|
|
82
|
+
},
|
|
83
|
+
"resolutions": {
|
|
84
|
+
"@types/react": "^18.2.0",
|
|
85
|
+
"@types/react-dom": "^18.2.0",
|
|
86
|
+
"react": "^18.2.0",
|
|
87
|
+
"react-dom": "^18.2.0",
|
|
88
|
+
"sbwb-ds": "1.2.2"
|
|
89
|
+
},
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@babel/core": "^7.21.3",
|
|
92
|
+
"@changesets/cli": "^2.29.4",
|
|
93
|
+
"@swc/core": "^1.3.40",
|
|
94
|
+
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
95
|
+
"@types/node": "^24.0.3",
|
|
96
|
+
"@types/react": "^18.2.0",
|
|
97
|
+
"@types/react-dom": "^18.2.0",
|
|
98
|
+
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
|
99
|
+
"@typescript-eslint/parser": "^6.4.0",
|
|
100
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
101
|
+
"babel-loader": "^8.3.0",
|
|
102
|
+
"eslint": "^8.57.1",
|
|
103
|
+
"eslint-config-airbnb-typescript": "^17.1.0",
|
|
104
|
+
"eslint-config-prettier": "^8.7.0",
|
|
105
|
+
"eslint-config-standard-with-typescript": "^43.0.1",
|
|
106
|
+
"eslint-plugin-import": "^2.27.5",
|
|
107
|
+
"eslint-plugin-n": "^15.6.1",
|
|
108
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
109
|
+
"eslint-plugin-react": "^7.32.2",
|
|
110
|
+
"prettier": "^3.5.3",
|
|
111
|
+
"pretty-quick": "^4.1.1",
|
|
112
|
+
"rimraf": "^5.0.10",
|
|
113
|
+
"sbwb-ds": "1.2.2",
|
|
114
|
+
"typescript": "^5.6.3",
|
|
115
|
+
"vite": "^5.4.10",
|
|
116
|
+
"vite-plugin-dts": "^4.5.4",
|
|
117
|
+
"vite-plugin-svgr": "^4.3.0"
|
|
118
|
+
}
|
|
119
|
+
}
|