@ufal-lccv/gpsub-ds 0.0.5 → 0.0.6-alpha-1
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/{Checkbox.view-0u3rSqMa.cjs → Checkbox.view-CDJhnIP4.cjs} +4 -8
- package/dist/{Checkbox.view-DYht1CER.js → Checkbox.view-DEBTcr4E.js} +4 -8
- package/dist/{RequiredLabel.view-kxn4QDDK.cjs → RequiredLabel.view-CV4twgie.cjs} +1 -1
- package/dist/{RequiredLabel.view-CDDl5DoF.js → RequiredLabel.view-DeP7ncq9.js} +1 -1
- package/dist/{Table.view-hLZc_Vum.js → Table.view-BDXr7LNF.js} +124 -112
- package/dist/{Table.view-BsFLr6hO.cjs → Table.view-JyPK82wk.cjs} +2 -2
- package/dist/{Title.view-DcxnG8kT.cjs → Title.view-CX_Y7KM1.cjs} +1 -1
- package/dist/{Title.view-D5gtMnXH.js → Title.view-DK7iD7P1.js} +1 -1
- package/dist/components/atoms/index.cjs.js +1 -1
- package/dist/components/atoms/index.es.js +2 -2
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +4 -4
- package/dist/components/molecules/index.cjs.js +1 -1
- package/dist/components/molecules/index.es.js +2 -2
- package/dist/components/organisms/CollapseSection/CollapseSection.view.d.ts +2 -1
- package/dist/components/organisms/Form/CheckboxField.view.d.ts +1 -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 +4 -4
- 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`.
|
|
@@ -341,17 +341,13 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
341
341
|
display: flex;
|
|
342
342
|
align-items: center;
|
|
343
343
|
justify-content: center;
|
|
344
|
-
cursor: ${({disabled:e})=>e?"
|
|
344
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
345
345
|
position: relative;
|
|
346
346
|
transition: all 0.3s ease;
|
|
347
347
|
border-radius: ${({buttonType:e})=>e==="primary"?t.sg.borders.borderRadius.borderRadiusSm:t.sg.borders.borderRadius.borderExtraSmall};
|
|
348
348
|
padding: ${({buttonType:e})=>e==="primary"?t.sg.spacings.spacingInset.spacingInsetNano:"auto"};
|
|
349
349
|
border: ${({buttonType:e})=>e==="secondary"?"none":void 0};
|
|
350
350
|
|
|
351
|
-
&:disabled {
|
|
352
|
-
pointer-events: none;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
351
|
& > .default-icon,
|
|
356
352
|
& > .selected-icon {
|
|
357
353
|
height: ${({sizeProp:e})=>dt(e)};
|
|
@@ -450,7 +446,6 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
450
446
|
height: ${dt(r)} !important;
|
|
451
447
|
width: ${dt(r)} !important;
|
|
452
448
|
}
|
|
453
|
-
cursor: not-allowed;
|
|
454
449
|
`}
|
|
455
450
|
`,ei=E.button`
|
|
456
451
|
${Xn}
|
|
@@ -1351,6 +1346,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
1351
1346
|
position: relative;
|
|
1352
1347
|
width: ${({width:e})=>e};
|
|
1353
1348
|
height: ${({size:e})=>e==="Medium"?"2rem":"1.6rem"};
|
|
1349
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1354
1350
|
`,ot=E.input`
|
|
1355
1351
|
font-size: ${({size:e})=>e==="Small"?t.sg.icons.iconSizeSm:t.sg.icons.iconSizeMd};
|
|
1356
1352
|
accent-color: ${t.sg.colors.brandColors.colorBrandSoft};
|
|
@@ -1366,7 +1362,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
1366
1362
|
margin-left: ${({size:e})=>e==="Small"?"1.55rem":"2.3rem"};
|
|
1367
1363
|
|
|
1368
1364
|
&:hover {
|
|
1369
|
-
cursor: ${({disabled:e})=>e?"
|
|
1365
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1370
1366
|
}
|
|
1371
1367
|
`,As=E.div`
|
|
1372
1368
|
width: fit-content;
|
|
@@ -1414,4 +1410,4 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
1414
1410
|
fill: ${({disabled:e})=>e?t.sg.colors.neutralColors.colorNeutralClean:t.sg.colors.neutralColors.colorNeutralDark};
|
|
1415
1411
|
}
|
|
1416
1412
|
}
|
|
1417
|
-
`,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;
|
|
@@ -2661,17 +2661,13 @@ const Hn = E.div`
|
|
|
2661
2661
|
display: flex;
|
|
2662
2662
|
align-items: center;
|
|
2663
2663
|
justify-content: center;
|
|
2664
|
-
cursor: ${({ disabled: e }) => e ? "
|
|
2664
|
+
cursor: ${({ disabled: e }) => e ? "not-allowed" : "pointer"};
|
|
2665
2665
|
position: relative;
|
|
2666
2666
|
transition: all 0.3s ease;
|
|
2667
2667
|
border-radius: ${({ buttonType: e }) => e === "primary" ? t.borders.borderRadius.borderRadiusSm : t.borders.borderRadius.borderExtraSmall};
|
|
2668
2668
|
padding: ${({ buttonType: e }) => e === "primary" ? t.spacings.spacingInset.spacingInsetNano : "auto"};
|
|
2669
2669
|
border: ${({ buttonType: e }) => e === "secondary" ? "none" : void 0};
|
|
2670
2670
|
|
|
2671
|
-
&:disabled {
|
|
2672
|
-
pointer-events: none;
|
|
2673
|
-
}
|
|
2674
|
-
|
|
2675
2671
|
& > .default-icon,
|
|
2676
2672
|
& > .selected-icon {
|
|
2677
2673
|
height: ${({ sizeProp: e }) => vt(e)};
|
|
@@ -2777,7 +2773,6 @@ const Hn = E.div`
|
|
|
2777
2773
|
height: ${vt(r)} !important;
|
|
2778
2774
|
width: ${vt(r)} !important;
|
|
2779
2775
|
}
|
|
2780
|
-
cursor: not-allowed;
|
|
2781
2776
|
`}
|
|
2782
2777
|
`, ti = E.button`
|
|
2783
2778
|
${Kn}
|
|
@@ -5357,6 +5352,7 @@ const Ta = E.div`
|
|
|
5357
5352
|
position: relative;
|
|
5358
5353
|
width: ${({ width: e }) => e};
|
|
5359
5354
|
height: ${({ size: e }) => e === "Medium" ? "2rem" : "1.6rem"};
|
|
5355
|
+
cursor: ${({ disabled: e }) => e ? "not-allowed" : "pointer"};
|
|
5360
5356
|
`, ct = E.input`
|
|
5361
5357
|
font-size: ${({ size: e }) => e === "Small" ? t.icons.iconSizeSm : t.icons.iconSizeMd};
|
|
5362
5358
|
accent-color: ${t.colors.brandColors.colorBrandSoft};
|
|
@@ -5372,7 +5368,7 @@ const Ta = E.div`
|
|
|
5372
5368
|
margin-left: ${({ size: e }) => e === "Small" ? "1.55rem" : "2.3rem"};
|
|
5373
5369
|
|
|
5374
5370
|
&:hover {
|
|
5375
|
-
cursor: ${({ disabled: e }) => e ? "
|
|
5371
|
+
cursor: ${({ disabled: e }) => e ? "not-allowed" : "pointer"};
|
|
5376
5372
|
}
|
|
5377
5373
|
`, Aa = E.div`
|
|
5378
5374
|
width: fit-content;
|
|
@@ -5438,7 +5434,7 @@ const Ta = E.div`
|
|
|
5438
5434
|
...C
|
|
5439
5435
|
}, y) => {
|
|
5440
5436
|
const s = we(null);
|
|
5441
|
-
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(
|
|
5442
5438
|
Na,
|
|
5443
5439
|
{
|
|
5444
5440
|
htmlFor: `Checkbox-${o || e}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("./Checkbox.view-
|
|
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-
|
|
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 = ({
|