@ufal-lccv/gpsub-ds 0.1.8 → 0.1.9

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
- import { q as o, G as j, o as r, H as F, u as f, b as c, J as m, W as I, K as E, N as S, O as w, P as R, e as A, I as L, Q as O } from "./Tooltip.view-CFhTAlxb.js";
1
+ import { q as o, G as j, o as r, H as F, u as f, b as c, J as m, W as I, K as E, N as S, O as w, P as R, e as A, I as L, Q as O } from "./Tooltip.view-Dd6qerbv.js";
2
2
  import { useState as _ } from "react";
3
3
  const W = ({
4
4
  width: l = "100%",
@@ -1 +1 @@
1
- "use strict";const r=require("./Tooltip.view-De9mbx2q.cjs"),h=require("react"),m=({width:s="100%",height:n="fit-content",type:o,variant:t="small",title:i,message:l,margin:c,open:a=!0,onClose:x,canClose:p=!0})=>{var d,u;const[g,j]=h.useState(a),e={info:{backgroundColor:"#D5EBFD",borderColor:r.sg.colors.feedbackColors.colorFeedbackInfo,icon:r.jsxRuntimeExports.jsx(r.InfoFill_default,{color:r.sg.colors.feedbackColors.colorFeedbackInfo,height:"24px",width:"24px"})},success:{backgroundColor:"#DAF9DB",borderColor:r.sg.colors.feedbackColors.colorFeedbackSuccess,icon:r.jsxRuntimeExports.jsx(r.CheckCircleFill_default,{color:r.sg.colors.feedbackColors.colorFeedbackSuccess,height:"24px",width:"24px"})},warning:{backgroundColor:"#FEEECF",borderColor:r.sg.colors.feedbackColors.colorFeedbackWarning},error:{backgroundColor:"#FFE1E1",borderColor:r.sg.colors.feedbackColors.colorFeedbackError,icon:r.jsxRuntimeExports.jsx(r.ErrorFill_default,{color:r.sg.colors.feedbackColors.colorFeedbackError,height:"24px",width:"24px"})}};function b(){j(!1),x==null||x()}return r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:g?r.jsxRuntimeExports.jsxs(r.Container,{width:s,height:n,direction:"horizontal",verticalAlign:i?"top":"center",gap:r.sg.spacings.spacingInline.spacingInlineAnt,padding:t=="small"?`${r.sg.spacings.spacingStack.spacingStackXs} ${r.sg.spacings.spacingInline.spacingInlineAnt}`:r.sg.spacings.spacingInline.spacingInlineSm,backgroundColor:(d=e==null?void 0:e[o])==null?void 0:d.backgroundColor,customStyles:{border:`1px solid ${(u=e==null?void 0:e[o])==null?void 0:u.borderColor}`,borderRadius:r.sg.borders.borderRadius.borderRadiusSm,margin:c,position:"relative"},children:[o==="warning"?r.jsxRuntimeExports.jsx(r.ContainerWarning,{children:r.jsxRuntimeExports.jsx(r.WarningFill_default,{width:"24px",height:"24px"})}):r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:e==null?void 0:e[o].icon}),r.jsxRuntimeExports.jsxs(r.Container,{width:"100%",flex:"1",height:"100%",children:[r.jsxRuntimeExports.jsx(r.Title$1,{children:i}),r.jsxRuntimeExports.jsx(r.Message,{children:l})]}),p&&r.jsxRuntimeExports.jsx(r.Container,{children:r.jsxRuntimeExports.jsx(r.Close_default,{color:r.sg.colors.neutralColors.colorNeutralCloudy,cursor:"pointer",onClick:b,height:"20px",width:"20px"})})]}):r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{})})},E=({label:s,labelRender:n,infoProps:o={},withInfo:t=!0,flex:i,width:l="100%",isRequired:c=!1})=>{const a={tooltipProps:{position:"top",...o==null?void 0:o.tooltipProps,size:"Small"}};return r.jsxRuntimeExports.jsxs(r.Container,{width:l,direction:"horizontal",gap:"4px",flex:i,children:[n??r.jsxRuntimeExports.jsxs(r.Label$1,{children:[s," ",c?r.jsxRuntimeExports.jsx(r.Required,{}):null]}),t&&r.jsxRuntimeExports.jsx(r.Info,{...a})]})},R=({width:s="100%",flex:n,label:o="Obrigatório",margin:t="0 0 16px 0"})=>r.jsxRuntimeExports.jsx(r.Container,{width:s,flex:n,customStyles:{margin:t},children:r.jsxRuntimeExports.jsx(r.Label$2,{children:`* ${o}`})});exports.AlertInline=m;exports.LabelField=E;exports.RequiredLabelView=R;
1
+ "use strict";const r=require("./Tooltip.view-CHY5IFVx.cjs"),h=require("react"),m=({width:s="100%",height:n="fit-content",type:o,variant:t="small",title:i,message:l,margin:c,open:a=!0,onClose:x,canClose:p=!0})=>{var d,u;const[g,j]=h.useState(a),e={info:{backgroundColor:"#D5EBFD",borderColor:r.sg.colors.feedbackColors.colorFeedbackInfo,icon:r.jsxRuntimeExports.jsx(r.InfoFill_default,{color:r.sg.colors.feedbackColors.colorFeedbackInfo,height:"24px",width:"24px"})},success:{backgroundColor:"#DAF9DB",borderColor:r.sg.colors.feedbackColors.colorFeedbackSuccess,icon:r.jsxRuntimeExports.jsx(r.CheckCircleFill_default,{color:r.sg.colors.feedbackColors.colorFeedbackSuccess,height:"24px",width:"24px"})},warning:{backgroundColor:"#FEEECF",borderColor:r.sg.colors.feedbackColors.colorFeedbackWarning},error:{backgroundColor:"#FFE1E1",borderColor:r.sg.colors.feedbackColors.colorFeedbackError,icon:r.jsxRuntimeExports.jsx(r.ErrorFill_default,{color:r.sg.colors.feedbackColors.colorFeedbackError,height:"24px",width:"24px"})}};function b(){j(!1),x==null||x()}return r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:g?r.jsxRuntimeExports.jsxs(r.Container,{width:s,height:n,direction:"horizontal",verticalAlign:i?"top":"center",gap:r.sg.spacings.spacingInline.spacingInlineAnt,padding:t=="small"?`${r.sg.spacings.spacingStack.spacingStackXs} ${r.sg.spacings.spacingInline.spacingInlineAnt}`:r.sg.spacings.spacingInline.spacingInlineSm,backgroundColor:(d=e==null?void 0:e[o])==null?void 0:d.backgroundColor,customStyles:{border:`1px solid ${(u=e==null?void 0:e[o])==null?void 0:u.borderColor}`,borderRadius:r.sg.borders.borderRadius.borderRadiusSm,margin:c,position:"relative"},children:[o==="warning"?r.jsxRuntimeExports.jsx(r.ContainerWarning,{children:r.jsxRuntimeExports.jsx(r.WarningFill_default,{width:"24px",height:"24px"})}):r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:e==null?void 0:e[o].icon}),r.jsxRuntimeExports.jsxs(r.Container,{width:"100%",flex:"1",height:"100%",children:[r.jsxRuntimeExports.jsx(r.Title$1,{children:i}),r.jsxRuntimeExports.jsx(r.Message,{children:l})]}),p&&r.jsxRuntimeExports.jsx(r.Container,{children:r.jsxRuntimeExports.jsx(r.Close_default,{color:r.sg.colors.neutralColors.colorNeutralCloudy,cursor:"pointer",onClick:b,height:"20px",width:"20px"})})]}):r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{})})},E=({label:s,labelRender:n,infoProps:o={},withInfo:t=!0,flex:i,width:l="100%",isRequired:c=!1})=>{const a={tooltipProps:{position:"top",...o==null?void 0:o.tooltipProps,size:"Small"}};return r.jsxRuntimeExports.jsxs(r.Container,{width:l,direction:"horizontal",gap:"4px",flex:i,children:[n??r.jsxRuntimeExports.jsxs(r.Label$1,{children:[s," ",c?r.jsxRuntimeExports.jsx(r.Required,{}):null]}),t&&r.jsxRuntimeExports.jsx(r.Info,{...a})]})},R=({width:s="100%",flex:n,label:o="Obrigatório",margin:t="0 0 16px 0"})=>r.jsxRuntimeExports.jsx(r.Container,{width:s,flex:n,customStyles:{margin:t},children:r.jsxRuntimeExports.jsx(r.Label$2,{children:`* ${o}`})});exports.AlertInline=m;exports.LabelField=E;exports.RequiredLabelView=R;
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./Tooltip.view-De9mbx2q.cjs"),g=require("react"),H=require("./index-mEVOkuDx.cjs"),Q=require("react-hook-form"),X=require("sbwb-ds"),ee=350,ce=({title:t,children:o,endAdornment:r=null,marginBottom:l="16px",customStyles:s={},wrapperCustomStyles:a={},animationContainerCustomStyles:i={},hideAdornmentOnCollapse:u=!1,maxHeight:h="none",height:p="fit-content"})=>{const[f,c]=g.useState(!1),[m,k]=g.useState(!0);g.useEffect(()=>{if(u)if(f){const b=setTimeout(()=>k(!1),ee);return()=>clearTimeout(b)}else k(!0)},[f,u]);const S=u&&!m?null:r;return e.jsxRuntimeExports.jsxs(e.Container,{width:"100%",flex:"1",gap:"8px",customStyles:a,children:[e.jsxRuntimeExports.jsx(e.SectionTitle,{title:t,divider:!0,marginBottom:l,collapse:{collapsed:f,setCollapsed:c},endAdornment:S,customStyles:s}),e.jsxRuntimeExports.jsx(e.Container,{gap:"8px",width:"100%",height:p,customStyles:{...i,maxHeight:f?"0":h,transition:`max-height ${ee}ms ease-in-out`},children:o})]})};var Y,te;function de(){if(te)return Y;te=1;function t(o,r,l){var s,a,i,u,h;r==null&&(r=100);function p(){var c=Date.now()-u;c<r&&c>=0?s=setTimeout(p,r-c):(s=null,l||(h=o.apply(i,a),i=a=null))}var f=function(){i=this,a=arguments,u=Date.now();var c=l&&!s;return s||(s=setTimeout(p,r)),c&&(h=o.apply(i,a),i=a=null),h};return f.clear=function(){s&&(clearTimeout(s),s=null)},f.flush=function(){s&&(h=o.apply(i,a),i=a=null,clearTimeout(s),s=null)},f}return t.debounce=t,Y=t,Y}var ge=de();const ue=e.getDefaultExportFromCjs(ge);function Z({form:t,fieldName:o,triggerType:r=null,debounceTime:l=500}){const s=g.useCallback(()=>{t.trigger(o)},[t,o]),a=g.useMemo(()=>ue(()=>s(),l),[s,l]),i=g.useMemo(()=>["all","onChange"].includes(r)?a:null,[a,r]),u=g.useMemo(()=>["all","onBlur"].includes(r)?s:null,[r]);return g.useMemo(()=>({onChangeTrigger:i,onBlurTrigger:u}),[i,u])}const fe=({variant:t="default",form:o,name:r,label:l,options:s,readonly:a=!1,disabled:i=!1,optionsMap:u,width:h="100%",flex:p,placeholder:f,onSelect:c,parser:m,filter:k,tooltipProps:S={},infoProps:b={},maxHeigthMenu:y,isRequired:A=!1,onRemoveSelected:j,triggerFormField:I=null,displayText:v,...C})=>{const{onChangeTrigger:q}=Z({form:o,fieldName:r,triggerType:I,debounceTime:0}),F={position:"top",...S},L={...b,tooltipProps:{position:"top",maxWidth:"300px",...b==null?void 0:b.tooltipProps}},w=(R,M)=>{let x=R;m&&(x=m==null?void 0:m(R)),M(x),c==null||c(x),q==null||q()},E=g.useMemo(()=>H.valuable(u)?u:Object.fromEntries(s.map(R=>[R.value,R])),[s,u]);return e.jsxRuntimeExports.jsx(e.Container,{width:h,flex:p,children:e.jsxRuntimeExports.jsx(Q.Controller,{name:r,control:o.control,render:({field:{onChange:R,value:M},fieldState:{error:x=null}})=>{let d=E[M];return e.jsxRuntimeExports.jsx(K,{label:l,width:"100%",size:"Small",variant:t,disabled:i,readonly:a,filter:k,errorMessage:x==null?void 0:x.message,placeholder:f,value:d,handleOption:n=>{w(n.value,R)},tooltipProps:F,options:s,maxHeigthMenu:y,infoProps:L,maxHeightMenu:y,isRequired:A,onRemoveSelected:j,displayText:v,...C})}})})},ne=({form:t,name:o,label:r,readonly:l=!1,disabled:s=!1,width:a="100%",height:i="100%",flex:u,placeholder:h,charactersCounter:p=!0,maxlength:f=1e3,resize:c=!0,triggerFormField:m=null,minHeight:k,maxHeight:S,...b})=>{const{onChangeTrigger:y}=Z({form:t,fieldName:o,triggerType:m}),A=(j,I)=>{I(j),y==null||y()};return e.jsxRuntimeExports.jsx(e.Container,{width:a,flex:u,height:i,children:e.jsxRuntimeExports.jsx(Q.Controller,{name:o,control:t.control,render:({field:{onChange:j,value:I},fieldState:{error:v=null}})=>e.jsxRuntimeExports.jsx(e.Textarea,{label:r,value:I||"",width:"100%",disabled:s,readonly:l,height:i,minHeight:k,maxHeight:S,errorMessage:v==null?void 0:v.message,placeholder:h,onChange:C=>A(C.target.value,j),charactersCounter:p,maxlength:f,size:"Small",resize:c,...b})})})};ne.displayName="TextareaField";const he=({form:t,name:o,id:r=o,label:l,readonly:s=!1,disabled:a=!1,afterCheck:i,width:u="100%",formatter:h,parser:p,flex:f,size:c="Medium",triggerFormField:m=null,...k})=>{const{onChangeTrigger:S}=Z({form:t,fieldName:o,triggerType:m,debounceTime:0}),b=(y,A)=>{A(y),i==null||i(y),S==null||S()};return e.jsxRuntimeExports.jsx(e.Container,{width:u,flex:f,children:e.jsxRuntimeExports.jsx(Q.Controller,{name:o,control:t.control,render:({field:{onChange:y,value:A},fieldState:{error:j=null}})=>{const I=j==null?void 0:j.message;return I&&console.log("Error on checkbox!",I),e.jsxRuntimeExports.jsx(e.Checkbox,{id:`form-checkbox-${r}`,checked:(h==null?void 0:h(A))??A,name:o,label:l,disabled:a||s,onChange:v=>{b((p==null?void 0:p(v.target.checked,A))??v.target.checked,y)},size:c,...k})}})})},xe=e.qe.ul`
1
+ "use strict";const e=require("./Tooltip.view-CHY5IFVx.cjs"),g=require("react"),H=require("./index-mEVOkuDx.cjs"),Q=require("react-hook-form"),X=require("sbwb-ds"),ee=350,ce=({title:t,children:o,endAdornment:r=null,marginBottom:l="16px",customStyles:s={},wrapperCustomStyles:a={},animationContainerCustomStyles:i={},hideAdornmentOnCollapse:u=!1,maxHeight:h="none",height:p="fit-content"})=>{const[f,c]=g.useState(!1),[m,k]=g.useState(!0);g.useEffect(()=>{if(u)if(f){const b=setTimeout(()=>k(!1),ee);return()=>clearTimeout(b)}else k(!0)},[f,u]);const S=u&&!m?null:r;return e.jsxRuntimeExports.jsxs(e.Container,{width:"100%",flex:"1",gap:"8px",customStyles:a,children:[e.jsxRuntimeExports.jsx(e.SectionTitle,{title:t,divider:!0,marginBottom:l,collapse:{collapsed:f,setCollapsed:c},endAdornment:S,customStyles:s}),e.jsxRuntimeExports.jsx(e.Container,{gap:"8px",width:"100%",height:p,customStyles:{...i,maxHeight:f?"0":h,transition:`max-height ${ee}ms ease-in-out`},children:o})]})};var Y,te;function de(){if(te)return Y;te=1;function t(o,r,l){var s,a,i,u,h;r==null&&(r=100);function p(){var c=Date.now()-u;c<r&&c>=0?s=setTimeout(p,r-c):(s=null,l||(h=o.apply(i,a),i=a=null))}var f=function(){i=this,a=arguments,u=Date.now();var c=l&&!s;return s||(s=setTimeout(p,r)),c&&(h=o.apply(i,a),i=a=null),h};return f.clear=function(){s&&(clearTimeout(s),s=null)},f.flush=function(){s&&(h=o.apply(i,a),i=a=null,clearTimeout(s),s=null)},f}return t.debounce=t,Y=t,Y}var ge=de();const ue=e.getDefaultExportFromCjs(ge);function Z({form:t,fieldName:o,triggerType:r=null,debounceTime:l=500}){const s=g.useCallback(()=>{t.trigger(o)},[t,o]),a=g.useMemo(()=>ue(()=>s(),l),[s,l]),i=g.useMemo(()=>["all","onChange"].includes(r)?a:null,[a,r]),u=g.useMemo(()=>["all","onBlur"].includes(r)?s:null,[r]);return g.useMemo(()=>({onChangeTrigger:i,onBlurTrigger:u}),[i,u])}const fe=({variant:t="default",form:o,name:r,label:l,options:s,readonly:a=!1,disabled:i=!1,optionsMap:u,width:h="100%",flex:p,placeholder:f,onSelect:c,parser:m,filter:k,tooltipProps:S={},infoProps:b={},maxHeigthMenu:y,isRequired:A=!1,onRemoveSelected:j,triggerFormField:I=null,displayText:v,...C})=>{const{onChangeTrigger:q}=Z({form:o,fieldName:r,triggerType:I,debounceTime:0}),F={position:"top",...S},L={...b,tooltipProps:{position:"top",maxWidth:"300px",...b==null?void 0:b.tooltipProps}},w=(R,M)=>{let x=R;m&&(x=m==null?void 0:m(R)),M(x),c==null||c(x),q==null||q()},E=g.useMemo(()=>H.valuable(u)?u:Object.fromEntries(s.map(R=>[R.value,R])),[s,u]);return e.jsxRuntimeExports.jsx(e.Container,{width:h,flex:p,children:e.jsxRuntimeExports.jsx(Q.Controller,{name:r,control:o.control,render:({field:{onChange:R,value:M},fieldState:{error:x=null}})=>{let d=E[M];return e.jsxRuntimeExports.jsx(K,{label:l,width:"100%",size:"Small",variant:t,disabled:i,readonly:a,filter:k,errorMessage:x==null?void 0:x.message,placeholder:f,value:d,handleOption:n=>{w(n.value,R)},tooltipProps:F,options:s,maxHeigthMenu:y,infoProps:L,maxHeightMenu:y,isRequired:A,onRemoveSelected:j,displayText:v,...C})}})})},ne=({form:t,name:o,label:r,readonly:l=!1,disabled:s=!1,width:a="100%",height:i="100%",flex:u,placeholder:h,charactersCounter:p=!0,maxlength:f=1e3,resize:c=!0,triggerFormField:m=null,minHeight:k,maxHeight:S,...b})=>{const{onChangeTrigger:y}=Z({form:t,fieldName:o,triggerType:m}),A=(j,I)=>{I(j),y==null||y()};return e.jsxRuntimeExports.jsx(e.Container,{width:a,flex:u,height:i,children:e.jsxRuntimeExports.jsx(Q.Controller,{name:o,control:t.control,render:({field:{onChange:j,value:I},fieldState:{error:v=null}})=>e.jsxRuntimeExports.jsx(e.Textarea,{label:r,value:I||"",width:"100%",disabled:s,readonly:l,height:i,minHeight:k,maxHeight:S,errorMessage:v==null?void 0:v.message,placeholder:h,onChange:C=>A(C.target.value,j),charactersCounter:p,maxlength:f,size:"Small",resize:c,...b})})})};ne.displayName="TextareaField";const he=({form:t,name:o,id:r=o,label:l,readonly:s=!1,disabled:a=!1,afterCheck:i,width:u="100%",formatter:h,parser:p,flex:f,size:c="Medium",triggerFormField:m=null,...k})=>{const{onChangeTrigger:S}=Z({form:t,fieldName:o,triggerType:m,debounceTime:0}),b=(y,A)=>{A(y),i==null||i(y),S==null||S()};return e.jsxRuntimeExports.jsx(e.Container,{width:u,flex:f,children:e.jsxRuntimeExports.jsx(Q.Controller,{name:o,control:t.control,render:({field:{onChange:y,value:A},fieldState:{error:j=null}})=>{const I=j==null?void 0:j.message;return I&&console.log("Error on checkbox!",I),e.jsxRuntimeExports.jsx(e.Checkbox,{id:`form-checkbox-${r}`,checked:(h==null?void 0:h(A))??A,name:o,label:l,disabled:a||s,onChange:v=>{b((p==null?void 0:p(v.target.checked,A))??v.target.checked,y)},size:c,...k})}})})},xe=e.qe.ul`
2
2
  ${H.resetStyles}
3
3
  position: fixed;
4
4
  margin-top: ${({marginTop:t})=>t};
@@ -1,4 +1,4 @@
1
- import { q as n, b as U, m as fe, U as we, n as ye, C as Ce, o, V as y, X as M, s as ke, T as ue, S as ze, e as Be, I as je, Y as Ne, E as he } from "./Tooltip.view-CFhTAlxb.js";
1
+ import { q as n, b as U, m as fe, U as we, n as ye, C as Ce, o, V as y, X as M, s as ke, T as ue, S as ze, e as Be, I as je, Y as Ne, E as he } from "./Tooltip.view-Dd6qerbv.js";
2
2
  import We, { useState as D, useEffect as Z, useCallback as ge, useMemo as V, useRef as q, forwardRef as me, isValidElement as se, useLayoutEffect as Ie } from "react";
3
3
  import { v as G, r as Y, b as ve } from "./index-BU7Rzx2_.js";
4
4
  import { Controller as re } from "react-hook-form";
@@ -1,4 +1,4 @@
1
- import { q as t, t as u, u as f, o as p, v as x, w as d, x as l, y as S, z as j, D as m } from "./Tooltip.view-CFhTAlxb.js";
1
+ import { q as t, t as u, u as f, o as p, v as x, w as d, x as l, y as S, z as j, D as m } from "./Tooltip.view-Dd6qerbv.js";
2
2
  import { useState as g, useEffect as $ } from "react";
3
3
  import { v as k } from "./index-BU7Rzx2_.js";
4
4
  const v = ({ message: s }) => /* @__PURE__ */ t.jsxs(u, { children: [
@@ -1 +1 @@
1
- "use strict";const t=require("./Tooltip.view-De9mbx2q.cjs"),h=require("react"),p=require("./index-mEVOkuDx.cjs"),w=({message:s})=>t.jsxRuntimeExports.jsxs(t.ErrorMessage,{children:[t.jsxRuntimeExports.jsx(t.InfoFill_default,{color:t.sg.colors.feedbackColors.colorFeedbackError}),s]}),j=({id:s,label:e,size:c="Medium",disabled:i=!1,onChange:n,checked:r})=>{const[x,u]=h.useState(r??!1);return h.useEffect(()=>{u(o=>r??!o)},[r]),t.jsxRuntimeExports.jsxs(t.SwitchContainer,{id:`switch-${s}`,"data-testid":"switch-component",children:[t.jsxRuntimeExports.jsxs(t.SwitchWrapper,{size:c,disabled:i,checked:r??x,"data-testid":"switch-wrapper",children:[t.jsxRuntimeExports.jsx(t.SwitchToggle,{type:"checkbox",disabled:i,checked:r??x,"data-testid":"switch-toggle",id:`switch-${typeof e=="string"?e:"unknown"}-${s}`,"data-cy":`switch-${typeof e=="string"?e:"unknown"}-${s}`,onChange:o=>{const{target:{checked:a}}=o;p.valuable(a)&&u(a),n==null||n(o)}}),t.jsxRuntimeExports.jsx(t.SwitchButton,{disabled:i,size:c})]}),t.jsxRuntimeExports.jsx(t.SwitchLabel,{size:c,disabled:i,children:e})]})},l=({text:s,color:e})=>t.jsxRuntimeExports.jsx(t.Title,{color:e,children:s});exports.ErrorMessage=w;exports.Switch=j;exports.Title=l;
1
+ "use strict";const t=require("./Tooltip.view-CHY5IFVx.cjs"),h=require("react"),p=require("./index-mEVOkuDx.cjs"),w=({message:s})=>t.jsxRuntimeExports.jsxs(t.ErrorMessage,{children:[t.jsxRuntimeExports.jsx(t.InfoFill_default,{color:t.sg.colors.feedbackColors.colorFeedbackError}),s]}),j=({id:s,label:e,size:c="Medium",disabled:i=!1,onChange:n,checked:r})=>{const[x,u]=h.useState(r??!1);return h.useEffect(()=>{u(o=>r??!o)},[r]),t.jsxRuntimeExports.jsxs(t.SwitchContainer,{id:`switch-${s}`,"data-testid":"switch-component",children:[t.jsxRuntimeExports.jsxs(t.SwitchWrapper,{size:c,disabled:i,checked:r??x,"data-testid":"switch-wrapper",children:[t.jsxRuntimeExports.jsx(t.SwitchToggle,{type:"checkbox",disabled:i,checked:r??x,"data-testid":"switch-toggle",id:`switch-${typeof e=="string"?e:"unknown"}-${s}`,"data-cy":`switch-${typeof e=="string"?e:"unknown"}-${s}`,onChange:o=>{const{target:{checked:a}}=o;p.valuable(a)&&u(a),n==null||n(o)}}),t.jsxRuntimeExports.jsx(t.SwitchButton,{disabled:i,size:c})]}),t.jsxRuntimeExports.jsx(t.SwitchLabel,{size:c,disabled:i,children:e})]})},l=({text:s,color:e})=>t.jsxRuntimeExports.jsx(t.Title,{color:e,children:s});exports.ErrorMessage=w;exports.Switch=j;exports.Title=l;
@@ -8490,7 +8490,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
8490
8490
  & > svg > path {
8491
8491
  fill: ${q.colors.feedbackColors.colorFeedbackWarning};
8492
8492
  }
8493
- `,$Ge=({cancel:{...e},confirm:{...t}})=>Le.jsxs(Qn,{width:"100%",height:"fit-content",direction:"horizontal",gap:"12px",children:[Le.jsx(U3,{...e}),Le.jsx(U3,{...t})]}),BGe=st.div`
8493
+ `,$Ge=({cancel:{...e},confirm:{...t}})=>Le.jsxs(Qn,{width:"100%",height:"fit-content",direction:"horizontal",gap:"12px","data-testid":"modal-footer-container",children:[Le.jsx(U3,{...e}),Le.jsx(U3,{...t})]}),BGe=st.div`
8494
8494
  position: fixed;
8495
8495
  top: 0;
8496
8496
  left: 0;
@@ -88380,6 +88380,7 @@ const MUe = st.span`
88380
88380
  height: "fit-content",
88381
88381
  direction: "horizontal",
88382
88382
  gap: "12px",
88383
+ "data-testid": "modal-footer-container",
88383
88384
  children: [
88384
88385
  /* @__PURE__ */ Le.jsx(is, { ...e }),
88385
88386
  /* @__PURE__ */ Le.jsx(is, { ...t })
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Tooltip.view-De9mbx2q.cjs"),r=require("../../Title.view-6pDDXp2W.cjs");exports.Badge=e.Badge;exports.Button=e.Button;exports.Checkbox=e.Checkbox;exports.Container=e.Container;exports.Label=e.Label;exports.LibraryCard=e.LibraryCard;exports.LoadingBar=e.LoadingBar;exports.Radio=e.Radio;exports.Required=e.Required;exports.Spacer=e.Spacer;exports.Tooltip=e.Tooltip;exports.ErrorMessage=r.ErrorMessage;exports.Switch=r.Switch;exports.Title=r.Title;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Tooltip.view-CHY5IFVx.cjs"),r=require("../../Title.view-dB9hK4Qx.cjs");exports.Badge=e.Badge;exports.Button=e.Button;exports.Checkbox=e.Checkbox;exports.Container=e.Container;exports.Label=e.Label;exports.LibraryCard=e.LibraryCard;exports.LoadingBar=e.LoadingBar;exports.Radio=e.Radio;exports.Required=e.Required;exports.Spacer=e.Spacer;exports.Tooltip=e.Tooltip;exports.ErrorMessage=r.ErrorMessage;exports.Switch=r.Switch;exports.Title=r.Title;
@@ -1,5 +1,5 @@
1
- import { B as r, a as e, C as o, b as i, L as t, c as d, d as b, R as c, e as n, S as p, T as B } from "../../Tooltip.view-CFhTAlxb.js";
2
- import { E as L, S, T } from "../../Title.view-DVRAw3Gj.js";
1
+ import { B as r, a as e, C as o, b as i, L as t, c as d, d as b, R as c, e as n, S as p, T as B } from "../../Tooltip.view-Dd6qerbv.js";
2
+ import { E as L, S, T } from "../../Title.view-D6BaKYtF.js";
3
3
  export {
4
4
  r as Badge,
5
5
  e as Button,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Tooltip.view-De9mbx2q.cjs"),t=require("../Title.view-6pDDXp2W.cjs"),i=require("../RequiredLabel.view-bs4uu8t3.cjs"),o=require("../Table.view-B9VoPu9A.cjs");exports.ActionButton=e.ActionButton;exports.Alert=e.dje;exports.Autocomplete=e.rde;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.LibraryCard=e.LibraryCard;exports.Loading=e.Loading;exports.LoadingBar=e.LoadingBar;exports.Modal=e.Modal;exports.MultiSelect=e.jye;exports.Radio=e.Radio;exports.Required=e.Required;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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Tooltip.view-CHY5IFVx.cjs"),t=require("../Title.view-dB9hK4Qx.cjs"),i=require("../RequiredLabel.view-Cc52Dk31.cjs"),o=require("../Table.view-D3ZSdJYz.cjs");exports.ActionButton=e.ActionButton;exports.Alert=e.dje;exports.Autocomplete=e.rde;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.LibraryCard=e.LibraryCard;exports.Loading=e.Loading;exports.LoadingBar=e.LoadingBar;exports.Modal=e.Modal;exports.MultiSelect=e.jye;exports.Radio=e.Radio;exports.Required=e.Required;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
- import { A as s, f as o, r as t, B as r, a as i, C as l, h as n, g as c, h as d, b as m, E as S, F as f, F as C, I as b, i as p, L as u, c as T, j as x, d as F, M as L, l as M, R as h, e as B, m as A, S as g, n as w, T as I, s as R, k as E } from "../Tooltip.view-CFhTAlxb.js";
2
- import { E as q, S as y, T as V } from "../Title.view-DVRAw3Gj.js";
3
- import { A as v, L as z, R as D } from "../RequiredLabel.view--zomsHqj.js";
4
- import { a as H, C as J, M as K, b as N, c as O, d as P, S as Q, e as U, f as W, T as X } from "../Table.view-B-hxaM0l.js";
1
+ import { A as s, f as o, r as t, B as r, a as i, C as l, h as n, g as c, h as d, b as m, E as S, F as f, F as C, I as b, i as p, L as u, c as T, j as x, d as F, M as L, l as M, R as h, e as B, m as A, S as g, n as w, T as I, s as R, k as E } from "../Tooltip.view-Dd6qerbv.js";
2
+ import { E as q, S as y, T as V } from "../Title.view-D6BaKYtF.js";
3
+ import { A as v, L as z, R as D } from "../RequiredLabel.view-BV0l8eIf.js";
4
+ import { a as H, C as J, M as K, b as N, c as O, d as P, S as Q, e as U, f as W, T as X } from "../Table.view-sEjI4dgZ.js";
5
5
  export {
6
6
  s as ActionButton,
7
7
  o as Alert,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Tooltip.view-De9mbx2q.cjs"),o=require("../../RequiredLabel.view-bs4uu8t3.cjs");exports.ActionButton=e.ActionButton;exports.Alert=e.dje;exports.Confirm=e.ConfirmModal;exports.ConfirmButton=e.ConfirmButton;exports.ConfirmModal=e.ConfirmModal;exports.Empty=e.Empty;exports.Frame=e.FrameView;exports.FrameView=e.FrameView;exports.Info=e.Info;exports.Input=e.Input;exports.Loading=e.Loading;exports.Modal=e.Modal;exports.MultiSelect=e.jye;exports.SectionTitle=e.SectionTitle;exports.Textarea=e.Textarea;exports.showConfirm=e.showConfirm;exports.showModal=e.showModal;exports.AlertInline=o.AlertInline;exports.LabelField=o.LabelField;exports.RequiredLabelView=o.RequiredLabelView;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../Tooltip.view-CHY5IFVx.cjs"),o=require("../../RequiredLabel.view-Cc52Dk31.cjs");exports.ActionButton=e.ActionButton;exports.Alert=e.dje;exports.Confirm=e.ConfirmModal;exports.ConfirmButton=e.ConfirmButton;exports.ConfirmModal=e.ConfirmModal;exports.Empty=e.Empty;exports.Frame=e.FrameView;exports.FrameView=e.FrameView;exports.Info=e.Info;exports.Input=e.Input;exports.Loading=e.Loading;exports.Modal=e.Modal;exports.MultiSelect=e.jye;exports.SectionTitle=e.SectionTitle;exports.Textarea=e.Textarea;exports.showConfirm=e.showConfirm;exports.showModal=e.showModal;exports.AlertInline=o.AlertInline;exports.LabelField=o.LabelField;exports.RequiredLabelView=o.RequiredLabelView;
@@ -1,5 +1,5 @@
1
- import { A as e, f as o, h as t, g as i, h as n, E as r, F as l, F as m, I as f, i as d, j as u, M as A, l as F, m as M, n as h, s as p, k as w } from "../../Tooltip.view-CFhTAlxb.js";
2
- import { A as I, L, R as c } from "../../RequiredLabel.view--zomsHqj.js";
1
+ import { A as e, f as o, h as t, g as i, h as n, E as r, F as l, F as m, I as f, i as d, j as u, M as A, l as F, m as M, n as h, s as p, k as w } from "../../Tooltip.view-Dd6qerbv.js";
2
+ import { A as I, L, R as c } from "../../RequiredLabel.view-BV0l8eIf.js";
3
3
  export {
4
4
  e as ActionButton,
5
5
  o as Alert,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../Tooltip.view-De9mbx2q.cjs"),e=require("../../Table.view-B9VoPu9A.cjs");exports.Autocomplete=t.rde;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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../Tooltip.view-CHY5IFVx.cjs"),e=require("../../Table.view-D3ZSdJYz.cjs");exports.Autocomplete=t.rde;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,5 +1,5 @@
1
- import { r as t } from "../../Tooltip.view-CFhTAlxb.js";
2
- import { a as s, C as l, M as c, b as S, c as r, d as i, S as n, e as b, f as d, T as f } from "../../Table.view-B-hxaM0l.js";
1
+ import { r as t } from "../../Tooltip.view-Dd6qerbv.js";
2
+ import { a as s, C as l, M as c, b as S, c as r, d as i, S as n, e as b, f as d, T as f } from "../../Table.view-sEjI4dgZ.js";
3
3
  export {
4
4
  t as Autocomplete,
5
5
  s as CheckboxField,
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Tooltip.view-De9mbx2q.cjs"),o=require("./Title.view-6pDDXp2W.cjs"),l=require("./RequiredLabel.view-bs4uu8t3.cjs"),t=require("./Table.view-B9VoPu9A.cjs"),i=require("./index-mEVOkuDx.cjs"),a=require("./hash-CJrPvUOz.cjs");exports.ActionButton=e.ActionButton;exports.Alert=e.dje;exports.Autocomplete=e.rde;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.IconSize=e.IconSize;exports.Info=e.Info;exports.Input=e.Input;exports.Label=e.Label;exports.LibraryCard=e.LibraryCard;exports.Loading=e.Loading;exports.LoadingBar=e.LoadingBar;exports.Modal=e.Modal;exports.MultiSelect=e.jye;exports.Radio=e.Radio;exports.Required=e.Required;exports.SectionTitle=e.SectionTitle;exports.Spacer=e.Spacer;exports.Textarea=e.Textarea;exports.Tooltip=e.Tooltip;exports.sg=e.sg;exports.showConfirm=e.showConfirm;exports.showModal=e.showModal;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.multiplyRemValues=i.multiplyRemValues;exports.resetStyles=i.resetStyles;exports.valuable=i.valuable;exports.getLabelText=a.getLabelText;exports.stableStringify=a.stableStringify;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Tooltip.view-CHY5IFVx.cjs"),o=require("./Title.view-dB9hK4Qx.cjs"),l=require("./RequiredLabel.view-Cc52Dk31.cjs"),t=require("./Table.view-D3ZSdJYz.cjs"),i=require("./index-mEVOkuDx.cjs"),a=require("./hash-CJrPvUOz.cjs");exports.ActionButton=e.ActionButton;exports.Alert=e.dje;exports.Autocomplete=e.rde;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.IconSize=e.IconSize;exports.Info=e.Info;exports.Input=e.Input;exports.Label=e.Label;exports.LibraryCard=e.LibraryCard;exports.Loading=e.Loading;exports.LoadingBar=e.LoadingBar;exports.Modal=e.Modal;exports.MultiSelect=e.jye;exports.Radio=e.Radio;exports.Required=e.Required;exports.SectionTitle=e.SectionTitle;exports.Spacer=e.Spacer;exports.Textarea=e.Textarea;exports.Tooltip=e.Tooltip;exports.sg=e.sg;exports.showConfirm=e.showConfirm;exports.showModal=e.showModal;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.multiplyRemValues=i.multiplyRemValues;exports.resetStyles=i.resetStyles;exports.valuable=i.valuable;exports.getLabelText=a.getLabelText;exports.stableStringify=a.stableStringify;
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
- import { A as s, f as t, r as o, B as r, a as l, C as i, h as n, g as c, h as m, b as d, E as p, F as S, F as f, p as b, I as u, i as x, L as T, c as C, j as L, d as F, M as g, l as B, R as M, e as h, m as A, S as R, n as I, T as w, o as y, s as E, k } from "./Tooltip.view-CFhTAlxb.js";
2
- import { E as z, S as V, T as q } from "./Title.view-DVRAw3Gj.js";
3
- import { A as G, L as H, R as D } from "./RequiredLabel.view--zomsHqj.js";
4
- import { a as K, C as N, M as O, b as P, c as Q, d as U, S as W, e as X, f as Y, T as Z } from "./Table.view-B-hxaM0l.js";
1
+ import { A as s, f as t, r as o, B as r, a as l, C as i, h as n, g as c, h as m, b as d, E as p, F as S, F as f, p as b, I as u, i as x, L as T, c as C, j as L, d as F, M as g, l as B, R as M, e as h, m as A, S as R, n as I, T as w, o as y, s as E, k } from "./Tooltip.view-Dd6qerbv.js";
2
+ import { E as z, S as V, T as q } from "./Title.view-D6BaKYtF.js";
3
+ import { A as G, L as H, R as D } from "./RequiredLabel.view-BV0l8eIf.js";
4
+ import { a as K, C as N, M as O, b as P, c as Q, d as U, S as W, e as X, f as Y, T as Z } from "./Table.view-sEjI4dgZ.js";
5
5
  import { a as $, c as aa, b as ea, d as sa, m as ta, r as oa, v as ra } from "./index-BU7Rzx2_.js";
6
6
  import { g as ia, s as na } from "./hash-BtT4jVLO.js";
7
7
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ufal-lccv/gpsub-ds",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
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": {