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

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.
@@ -182,6 +182,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
182
182
  font-family: ${t.sg.fonts.fontFamily.fontFamilyPrimary};
183
183
  font-size: ${({size:e})=>e==="Small"?t.sg.fonts.fontSize.fontSizeBodyMd:t.sg.fonts.fontSize.fontSizeBodyLg};
184
184
  font-weight: ${t.sg.fonts.fontWeight.fontWeightRegular};
185
+ white-space: nowrap;
185
186
  width: ${({width:e})=>e};
186
187
  min-height: ${({size:e})=>e==="Small"?"3.2rem":"4rem"};
187
188
  min-width: 'fit-content';
@@ -245,7 +246,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
245
246
  fill: ${({variant:e,disabled:o,error:r,isLoading:n})=>o?t.sg.colors.neutralColors.colorNeutralCloudy:r&&!n?t.sg.colors.feedbackColors.colorFeedbackError:e==="primary"?t.sg.colors.backgroundColors.colorBackgroundSnow:t.sg.colors.neutralColors.colorNeutralDark};
246
247
  }
247
248
  }
248
- `,tt=({name:e,type:o="button",variant:r="primary",width:n="100%",size:i="Large",disabled:c=!1,isLoading:l=!1,onClick:u,custom:f,icon:h,iconColor:p=t.sg.colors.neutralColors.colorNeutralDark,iconPosition:m="left",error:b,tooltipProps:$={},...y})=>{var te;const a=ce=>typeof ce=="string",v=(ce,I)=>d.jsx(t.Icon,{iconName:ce,color:I}),P={Small:"ProgressActivitySm",Large:"ProgressActivityAnt"},O=b&&!l&&v({Small:"ErrorSm",Large:"ErrorAnt"}[i],t.sg.colors.feedbackColors.colorFeedbackError),j=l&&v(P[i],t.sg.colors.neutralColors.colorNeutralDark),S=h&&!b&&!l&&m==="left"&&(a(h)?v(h,p):h),U=h&&!b&&!l&&m==="right"&&(a(h)?v(h,p):h),ee={position:"bottom",...$,isErrorTooltip:!!b,label:b??$.label,isActive:!!b&&!c||!!$.label&&!l,textAlign:"center",maxWidth:(te=$.customStyle)==null?void 0:te.maxWidth};return d.jsx(Ie,{id:"error-button",...ee,children:d.jsxs(gn,{type:o,width:n,size:i,disabled:c,variant:r,isLoading:l,error:b,onClick:()=>!l&&!c&&u(),style:f,id:`button-component-${e}`,...y,children:[O,j,S,e,U]})})};tt.displayName="Button";const hn={left:"flex-start",center:"center",right:"flex-end"},pn={top:"flex-start",center:"center",bottom:"flex-end"},mn={vertical:"column",horizontal:"row"},yn=E.div`
249
+ `,tt=({name:e,type:o="button",variant:r="primary",width:n="100%",size:i="Small",disabled:c=!1,isLoading:l=!1,onClick:u,custom:f,icon:h,iconColor:p=t.sg.colors.neutralColors.colorNeutralDark,iconPosition:m="left",error:b,tooltipProps:$={},...y})=>{var te;const a=ce=>typeof ce=="string",v=(ce,I)=>d.jsx(t.Icon,{iconName:ce,color:I}),P={Small:"ProgressActivitySm",Large:"ProgressActivityAnt"},O=b&&!l&&v({Small:"ErrorSm",Large:"ErrorAnt"}[i],t.sg.colors.feedbackColors.colorFeedbackError),j=l&&v(P[i],t.sg.colors.neutralColors.colorNeutralDark),S=h&&!b&&!l&&m==="left"&&(a(h)?v(h,p):h),U=h&&!b&&!l&&m==="right"&&(a(h)?v(h,p):h),ee={position:"bottom",...$,isErrorTooltip:!!b,label:b??$.label,isActive:!!b&&!c||!!$.label&&!l,textAlign:"center",maxWidth:(te=$.customStyle)==null?void 0:te.maxWidth};return d.jsx(Ie,{id:"error-button",...ee,children:d.jsxs(gn,{type:o,width:n,size:i,disabled:c,variant:r,isLoading:l,error:b,onClick:()=>!l&&!c&&u(),style:f,id:`button-component-${e}`,...y,children:[O,j,S,e,U]})})};tt.displayName="Button";const hn={left:"flex-start",center:"center",right:"flex-end"},pn={top:"flex-start",center:"center",bottom:"flex-end"},mn={vertical:"column",horizontal:"row"},yn=E.div`
249
250
  display: flex;
250
251
 
251
252
  background-color: ${e=>t.sg.colors.backgroundColors[`colorBackground${V.capitalizeFirstLetter(e.backgroundColor)}`]??e.backgroundColor??"transparent"};
@@ -340,17 +341,13 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
340
341
  display: flex;
341
342
  align-items: center;
342
343
  justify-content: center;
343
- cursor: ${({disabled:e})=>e?"default":"pointer"};
344
+ cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
344
345
  position: relative;
345
346
  transition: all 0.3s ease;
346
347
  border-radius: ${({buttonType:e})=>e==="primary"?t.sg.borders.borderRadius.borderRadiusSm:t.sg.borders.borderRadius.borderExtraSmall};
347
348
  padding: ${({buttonType:e})=>e==="primary"?t.sg.spacings.spacingInset.spacingInsetNano:"auto"};
348
349
  border: ${({buttonType:e})=>e==="secondary"?"none":void 0};
349
350
 
350
- &:disabled {
351
- pointer-events: none;
352
- }
353
-
354
351
  & > .default-icon,
355
352
  & > .selected-icon {
356
353
  height: ${({sizeProp:e})=>dt(e)};
@@ -449,7 +446,6 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
449
446
  height: ${dt(r)} !important;
450
447
  width: ${dt(r)} !important;
451
448
  }
452
- cursor: not-allowed;
453
449
  `}
454
450
  `,ei=E.button`
455
451
  ${Xn}
@@ -1350,6 +1346,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
1350
1346
  position: relative;
1351
1347
  width: ${({width:e})=>e};
1352
1348
  height: ${({size:e})=>e==="Medium"?"2rem":"1.6rem"};
1349
+ cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
1353
1350
  `,ot=E.input`
1354
1351
  font-size: ${({size:e})=>e==="Small"?t.sg.icons.iconSizeSm:t.sg.icons.iconSizeMd};
1355
1352
  accent-color: ${t.sg.colors.brandColors.colorBrandSoft};
@@ -1365,7 +1362,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
1365
1362
  margin-left: ${({size:e})=>e==="Small"?"1.55rem":"2.3rem"};
1366
1363
 
1367
1364
  &:hover {
1368
- cursor: ${({disabled:e})=>e?"default":"pointer"};
1365
+ cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
1369
1366
  }
1370
1367
  `,As=E.div`
1371
1368
  width: fit-content;
@@ -1413,4 +1410,4 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
1413
1410
  fill: ${({disabled:e})=>e?t.sg.colors.neutralColors.colorNeutralClean:t.sg.colors.neutralColors.colorNeutralDark};
1414
1411
  }
1415
1412
  }
1416
- `,Hr=A.forwardRef(({id:e,label:o,size:r="Medium",value:n,name:i,disabled:c=!1,width:l="100%",variant:u="Selected",onChange:f,gridRow:h,gridColumn:p,checked:m,checkColor:b="Default",...$},y)=>{const a=A.useRef(null);return d.jsx(Ts,{width:l,size:r,children:d.jsxs(Ns,{htmlFor:`Checkbox-${o||e}`,disabled:c,size:r,"data-testid":"checkbox-label",children:[d.jsx(ot,{type:"checkbox",disabled:c,id:`Checkbox-${o||e}`,size:r,"data-testid":"checkbox",value:n,checked:m,name:i,onChange:f,gridRow:h,gridColumn:p,...$,ref:v=>{a.current=v,typeof y=="function"?y(v):y&&(y.current=v)}}),d.jsx(As,{size:r,disabled:c,checkColor:b,children:u==="Selected"?d.jsx(t.Icon,{iconName:`CheckBoxFill1${r==="Small"?"Ant":"Sm"}`}):d.jsx(t.Icon,{iconName:`CheckboxLess${r==="Small"?"Ant":"Sm"}`})}),d.jsx(Ps,{size:r,disabled:c,children:d.jsx(t.Icon,{iconName:`CheckBoxOutlineBlankFill0${r==="Small"?"Ant":"Sm"}`})}),o]})})});Hr.displayName="Checkbox";exports.ActionButton=Nr;exports.Ae=z;exports.Badge=It;exports.Button=tt;exports.Checkbox=Hr;exports.ConfirmButton=Ar;exports.ConfirmModal=Mt;exports.Container=we;exports.ContainerWarning=oi;exports.Empty=Pr;exports.ErrorMessage=Ln;exports.FrameView=jr;exports.Info=Bt;exports.InfoFill_default=Ft;exports.Input=Or;exports.Label=zr;exports.Label$1=Wi;exports.Label$2=is;exports.Loading=Ir;exports.LoadingBar=Tr;exports.Message=ri;exports.Modal=Dt;exports.Radio=Br;exports.Required=Hi;exports.SectionTitle=Mr;exports.Spacer=Fe;exports.SwitchButton=Dr;exports.SwitchContainer=Ss;exports.SwitchLabel=xs;exports.SwitchToggle=Cs;exports.SwitchWrapper=bs;exports.Textarea=Lr;exports.Title=$s;exports.Title$1=ti;exports.Tooltip=Ie;exports.WarningFill_default=Mn;exports.We=Be;exports.getDefaultExportFromCjs=mr;exports.index=_s;exports.jsxRuntimeExports=d;exports.qe=E;exports.showConfirm=ht;exports.showModal=Fr;
1413
+ `,Hr=A.forwardRef(({id:e,label:o,size:r="Medium",value:n,name:i,disabled:c=!1,width:l="100%",variant:u="Selected",onChange:f,gridRow:h,gridColumn:p,checked:m,checkColor:b="Default",...$},y)=>{const a=A.useRef(null);return d.jsx(Ts,{width:l,size:r,disabled:c,children:d.jsxs(Ns,{htmlFor:`Checkbox-${o||e}`,disabled:c,size:r,"data-testid":"checkbox-label",children:[d.jsx(ot,{type:"checkbox",disabled:c,id:`Checkbox-${o||e}`,size:r,"data-testid":"checkbox",value:n,checked:m,name:i,onChange:f,gridRow:h,gridColumn:p,...$,ref:v=>{a.current=v,typeof y=="function"?y(v):y&&(y.current=v)}}),d.jsx(As,{size:r,disabled:c,checkColor:b,children:u==="Selected"?d.jsx(t.Icon,{iconName:`CheckBoxFill1${r==="Small"?"Ant":"Sm"}`}):d.jsx(t.Icon,{iconName:`CheckboxLess${r==="Small"?"Ant":"Sm"}`})}),d.jsx(Ps,{size:r,disabled:c,children:d.jsx(t.Icon,{iconName:`CheckBoxOutlineBlankFill0${r==="Small"?"Ant":"Sm"}`})}),o]})})});Hr.displayName="Checkbox";exports.ActionButton=Nr;exports.Ae=z;exports.Badge=It;exports.Button=tt;exports.Checkbox=Hr;exports.ConfirmButton=Ar;exports.ConfirmModal=Mt;exports.Container=we;exports.ContainerWarning=oi;exports.Empty=Pr;exports.ErrorMessage=Ln;exports.FrameView=jr;exports.Info=Bt;exports.InfoFill_default=Ft;exports.Input=Or;exports.Label=zr;exports.Label$1=Wi;exports.Label$2=is;exports.Loading=Ir;exports.LoadingBar=Tr;exports.Message=ri;exports.Modal=Dt;exports.Radio=Br;exports.Required=Hi;exports.SectionTitle=Mr;exports.Spacer=Fe;exports.SwitchButton=Dr;exports.SwitchContainer=Ss;exports.SwitchLabel=xs;exports.SwitchToggle=Cs;exports.SwitchWrapper=bs;exports.Textarea=Lr;exports.Title=$s;exports.Title$1=ti;exports.Tooltip=Ie;exports.WarningFill_default=Mn;exports.We=Be;exports.getDefaultExportFromCjs=mr;exports.index=_s;exports.jsxRuntimeExports=d;exports.qe=E;exports.showConfirm=ht;exports.showModal=Fr;
@@ -2136,6 +2136,7 @@ const hn = Xe`
2136
2136
  font-family: ${t.fonts.fontFamily.fontFamilyPrimary};
2137
2137
  font-size: ${({ size: e }) => e === "Small" ? t.fonts.fontSize.fontSizeBodyMd : t.fonts.fontSize.fontSizeBodyLg};
2138
2138
  font-weight: ${t.fonts.fontWeight.fontWeightRegular};
2139
+ white-space: nowrap;
2139
2140
  width: ${({ width: e }) => e};
2140
2141
  min-height: ${({ size: e }) => e === "Small" ? "3.2rem" : "4rem"};
2141
2142
  min-width: 'fit-content';
@@ -2211,7 +2212,7 @@ const hn = Xe`
2211
2212
  type: o = "button",
2212
2213
  variant: r = "primary",
2213
2214
  width: n = "100%",
2214
- size: i = "Large",
2215
+ size: i = "Small",
2215
2216
  disabled: c = !1,
2216
2217
  isLoading: l = !1,
2217
2218
  onClick: u,
@@ -2660,17 +2661,13 @@ const Hn = E.div`
2660
2661
  display: flex;
2661
2662
  align-items: center;
2662
2663
  justify-content: center;
2663
- cursor: ${({ disabled: e }) => e ? "default" : "pointer"};
2664
+ cursor: ${({ disabled: e }) => e ? "not-allowed" : "pointer"};
2664
2665
  position: relative;
2665
2666
  transition: all 0.3s ease;
2666
2667
  border-radius: ${({ buttonType: e }) => e === "primary" ? t.borders.borderRadius.borderRadiusSm : t.borders.borderRadius.borderExtraSmall};
2667
2668
  padding: ${({ buttonType: e }) => e === "primary" ? t.spacings.spacingInset.spacingInsetNano : "auto"};
2668
2669
  border: ${({ buttonType: e }) => e === "secondary" ? "none" : void 0};
2669
2670
 
2670
- &:disabled {
2671
- pointer-events: none;
2672
- }
2673
-
2674
2671
  & > .default-icon,
2675
2672
  & > .selected-icon {
2676
2673
  height: ${({ sizeProp: e }) => vt(e)};
@@ -2776,7 +2773,6 @@ const Hn = E.div`
2776
2773
  height: ${vt(r)} !important;
2777
2774
  width: ${vt(r)} !important;
2778
2775
  }
2779
- cursor: not-allowed;
2780
2776
  `}
2781
2777
  `, ti = E.button`
2782
2778
  ${Kn}
@@ -5356,6 +5352,7 @@ const Ta = E.div`
5356
5352
  position: relative;
5357
5353
  width: ${({ width: e }) => e};
5358
5354
  height: ${({ size: e }) => e === "Medium" ? "2rem" : "1.6rem"};
5355
+ cursor: ${({ disabled: e }) => e ? "not-allowed" : "pointer"};
5359
5356
  `, ct = E.input`
5360
5357
  font-size: ${({ size: e }) => e === "Small" ? t.icons.iconSizeSm : t.icons.iconSizeMd};
5361
5358
  accent-color: ${t.colors.brandColors.colorBrandSoft};
@@ -5371,7 +5368,7 @@ const Ta = E.div`
5371
5368
  margin-left: ${({ size: e }) => e === "Small" ? "1.55rem" : "2.3rem"};
5372
5369
 
5373
5370
  &:hover {
5374
- cursor: ${({ disabled: e }) => e ? "default" : "pointer"};
5371
+ cursor: ${({ disabled: e }) => e ? "not-allowed" : "pointer"};
5375
5372
  }
5376
5373
  `, Aa = E.div`
5377
5374
  width: fit-content;
@@ -5437,7 +5434,7 @@ const Ta = E.div`
5437
5434
  ...C
5438
5435
  }, y) => {
5439
5436
  const s = we(null);
5440
- return /* @__PURE__ */ d.jsx(Ta, { width: l, size: r, children: /* @__PURE__ */ d.jsxs(
5437
+ return /* @__PURE__ */ d.jsx(Ta, { width: l, size: r, disabled: c, children: /* @__PURE__ */ d.jsxs(
5441
5438
  Na,
5442
5439
  {
5443
5440
  htmlFor: `Checkbox-${o || e}`,
@@ -1 +1 @@
1
- "use strict";const r=require("./Checkbox.view-CCpqjFGz.cjs"),s=require("sbwb-ds");require("react");const b=({width:i="100%",height:l="auto",type:e,title:n,message:c,margin:a})=>{var t,d,x,u;const o={info:{backgroundColor:"#D5EBFD",borderColor:s.sg.colors.feedbackColors.colorFeedbackInfo,iconName:"InfoFill1Md"},success:{backgroundColor:"#DAF9DB",borderColor:s.sg.colors.feedbackColors.colorFeedbackSuccess,iconName:"CheckCircleFill1Md"},warning:{backgroundColor:"#FEEECF",borderColor:s.sg.colors.feedbackColors.colorFeedbackWarning},error:{backgroundColor:"#FFE1E1",borderColor:s.sg.colors.feedbackColors.colorFeedbackError,iconName:"ErrorFill1Md"}};return r.jsxRuntimeExports.jsxs(r.Container,{width:i,height:l,direction:"horizontal",verticalAlign:n?"top":"center",gap:s.sg.spacings.spacingInset.spacingInsetXs,padding:s.sg.spacings.spacingInline.spacingInlineSm,backgroundColor:(t=o==null?void 0:o[e])==null?void 0:t.backgroundColor,customStyles:{border:`1px solid ${(d=o==null?void 0:o[e])==null?void 0:d.borderColor}`,borderRadius:s.sg.borders.borderRadius.borderRadiusSm,margin:a},children:[e==="warning"?r.jsxRuntimeExports.jsx(r.ContainerWarning,{children:r.jsxRuntimeExports.jsx(r.WarningFill_default,{width:"20px",height:"20px"})}):r.jsxRuntimeExports.jsx(s.Icon,{iconName:(x=o==null?void 0:o[e])==null?void 0:x.iconName,color:(u=o==null?void 0:o[e])==null?void 0:u.borderColor}),r.jsxRuntimeExports.jsxs(r.Container,{width:"100%",flex:"1",children:[r.jsxRuntimeExports.jsx(r.Title$1,{children:n}),r.jsxRuntimeExports.jsx(r.Message,{children:c})]})]})},p=({label:i,labelRender:l,infoProps:e={},withInfo:n=!0,flex:c,width:a="100%",isRequired:o=!1})=>{const t={tooltipProps:{position:"top",...e==null?void 0:e.tooltipProps,size:"Small"}};return r.jsxRuntimeExports.jsxs(r.Container,{width:a,direction:"horizontal",gap:"4px",flex:c,children:[l??r.jsxRuntimeExports.jsxs(r.Label$1,{children:[i," ",o?r.jsxRuntimeExports.jsx(r.Required,{children:"*"}):null]}),n&&r.jsxRuntimeExports.jsx(r.Info,{...t})]})},j=({width:i="100%",flex:l,label:e="Obrigatório",margin:n="0 0 16px 0"})=>r.jsxRuntimeExports.jsx(r.Container,{width:i,flex:l,customStyles:{margin:n},children:r.jsxRuntimeExports.jsx(r.Label$2,{children:`* ${e}`})});exports.AlertInline=b;exports.LabelField=p;exports.RequiredLabelView=j;
1
+ "use strict";const r=require("./Checkbox.view-CDJhnIP4.cjs"),s=require("sbwb-ds");require("react");const b=({width:i="100%",height:l="auto",type:e,title:n,message:c,margin:a})=>{var t,d,x,u;const o={info:{backgroundColor:"#D5EBFD",borderColor:s.sg.colors.feedbackColors.colorFeedbackInfo,iconName:"InfoFill1Md"},success:{backgroundColor:"#DAF9DB",borderColor:s.sg.colors.feedbackColors.colorFeedbackSuccess,iconName:"CheckCircleFill1Md"},warning:{backgroundColor:"#FEEECF",borderColor:s.sg.colors.feedbackColors.colorFeedbackWarning},error:{backgroundColor:"#FFE1E1",borderColor:s.sg.colors.feedbackColors.colorFeedbackError,iconName:"ErrorFill1Md"}};return r.jsxRuntimeExports.jsxs(r.Container,{width:i,height:l,direction:"horizontal",verticalAlign:n?"top":"center",gap:s.sg.spacings.spacingInset.spacingInsetXs,padding:s.sg.spacings.spacingInline.spacingInlineSm,backgroundColor:(t=o==null?void 0:o[e])==null?void 0:t.backgroundColor,customStyles:{border:`1px solid ${(d=o==null?void 0:o[e])==null?void 0:d.borderColor}`,borderRadius:s.sg.borders.borderRadius.borderRadiusSm,margin:a},children:[e==="warning"?r.jsxRuntimeExports.jsx(r.ContainerWarning,{children:r.jsxRuntimeExports.jsx(r.WarningFill_default,{width:"20px",height:"20px"})}):r.jsxRuntimeExports.jsx(s.Icon,{iconName:(x=o==null?void 0:o[e])==null?void 0:x.iconName,color:(u=o==null?void 0:o[e])==null?void 0:u.borderColor}),r.jsxRuntimeExports.jsxs(r.Container,{width:"100%",flex:"1",children:[r.jsxRuntimeExports.jsx(r.Title$1,{children:n}),r.jsxRuntimeExports.jsx(r.Message,{children:c})]})]})},p=({label:i,labelRender:l,infoProps:e={},withInfo:n=!0,flex:c,width:a="100%",isRequired:o=!1})=>{const t={tooltipProps:{position:"top",...e==null?void 0:e.tooltipProps,size:"Small"}};return r.jsxRuntimeExports.jsxs(r.Container,{width:a,direction:"horizontal",gap:"4px",flex:c,children:[l??r.jsxRuntimeExports.jsxs(r.Label$1,{children:[i," ",o?r.jsxRuntimeExports.jsx(r.Required,{children:"*"}):null]}),n&&r.jsxRuntimeExports.jsx(r.Info,{...t})]})},j=({width:i="100%",flex:l,label:e="Obrigatório",margin:n="0 0 16px 0"})=>r.jsxRuntimeExports.jsx(r.Container,{width:i,flex:l,customStyles:{margin:n},children:r.jsxRuntimeExports.jsx(r.Label$2,{children:`* ${e}`})});exports.AlertInline=b;exports.LabelField=p;exports.RequiredLabelView=j;
@@ -1,4 +1,4 @@
1
- import { l as o, C as c, v as C, W as p, w as g, x as h, y as m, z as k, I as F, D as j } from "./Checkbox.view-DCFdmWxN.js";
1
+ import { l as o, C as c, v as C, W as p, w as g, x as h, y as m, z as k, I as F, D as j } from "./Checkbox.view-DEBTcr4E.js";
2
2
  import { sg as s, Icon as I } from "sbwb-ds";
3
3
  import "react";
4
4
  const S = ({