@ufal-lccv/gpsub-ds 0.1.13 → 0.1.15

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.
Files changed (44) hide show
  1. package/dist/RequiredLabel.view-CexnTqqz.js +165 -0
  2. package/dist/RequiredLabel.view-DnvcjRLU.cjs +1 -0
  3. package/dist/Table.styles-BRk1FZZV.cjs +10809 -0
  4. package/dist/{Datepicker.view-CtFthzt7.js → Table.styles-DxHVJ7GB.js} +29987 -27772
  5. package/dist/Table.view-BxfAmZZL.js +831 -0
  6. package/dist/Table.view-CjBHhEPM.cjs +1 -0
  7. package/dist/Title.view-CqocZrZS.cjs +1 -0
  8. package/dist/{Title.view-92ijSsKa.js → Title.view-MpwnA63M.js} +1 -1
  9. package/dist/components/atoms/index.cjs.js +1 -1
  10. package/dist/components/atoms/index.es.js +13 -14
  11. package/dist/components/index.cjs.js +1 -1
  12. package/dist/components/index.es.js +56 -58
  13. package/dist/components/molecules/Alert/Alert.view.d.ts +17 -1
  14. package/dist/components/molecules/Alert/index.d.ts +4 -1
  15. package/dist/components/molecules/Alert/showAlert.d.ts +3 -0
  16. package/dist/components/molecules/Alert/styles.d.ts +4 -0
  17. package/dist/components/molecules/index.cjs.js +1 -1
  18. package/dist/components/molecules/index.es.js +24 -24
  19. package/dist/components/organisms/Form/DateField.view.d.ts +1 -2
  20. package/dist/components/organisms/Form/MultiNumberField.view.d.ts +2 -1
  21. package/dist/components/organisms/Form/NumberField.view.d.ts +1 -1
  22. package/dist/components/organisms/MenuSelect/MenuSelect.view.d.ts +6 -1
  23. package/dist/components/organisms/index.cjs.js +1 -1
  24. package/dist/components/organisms/index.es.js +21 -22
  25. package/dist/helpers/index.cjs.js +1 -1
  26. package/dist/helpers/index.es.js +10 -11
  27. package/dist/index-BUIblOZj.cjs +7 -0
  28. package/dist/index-DpWkNNS6.js +81 -0
  29. package/dist/index.cjs.js +1 -1
  30. package/dist/index.es.js +65 -68
  31. package/dist/types/selectOption.d.ts +6 -1
  32. package/package.json +2 -1
  33. package/dist/Datepicker.view-BtTFVhzO.cjs +0 -10026
  34. package/dist/RequiredLabel.view-BSSSypSv.cjs +0 -1
  35. package/dist/RequiredLabel.view-Dvuw36LT.js +0 -130
  36. package/dist/Switch.view-BNDdSqXc.js +0 -50
  37. package/dist/Switch.view-D74Uztnx.cjs +0 -1
  38. package/dist/Table.view-B7gQuXFw.js +0 -2800
  39. package/dist/Table.view-Bqlpvq6P.cjs +0 -711
  40. package/dist/Title.view-xnJ37Vkk.cjs +0 -1
  41. package/dist/formatNumber-CJTnRyGn.cjs +0 -1
  42. package/dist/formatNumber-ENoyNPNn.js +0 -35
  43. package/dist/index-BU7Rzx2_.js +0 -47
  44. package/dist/index-mEVOkuDx.cjs +0 -7
@@ -0,0 +1,165 @@
1
+ import { O as o, V as C, W as j, X as F, J as r, Y as f, Q as I, b as x, Z as w, _ as E, $ as S, a0 as R, a1 as A, a2 as _, f as $, I as D, a3 as L } from "./Table.styles-DxHVJ7GB.js";
2
+ import { d as O } from "./index-DpWkNNS6.js";
3
+ import { createPortal as v } from "react-dom";
4
+ import { useState as W } from "react";
5
+ const B = ({
6
+ id: a,
7
+ type: l,
8
+ title: e,
9
+ description: n,
10
+ durationInMilliseconds: t = 3e3,
11
+ dataToCopy: i,
12
+ offset: d = { x: 0, y: 0 }
13
+ }) => {
14
+ const c = O.portal.add(a + Date.now() + Math.random()), p = () => {
15
+ try {
16
+ c.remove();
17
+ } catch {
18
+ console.error("Remoção indevida de alert.");
19
+ }
20
+ }, h = v(
21
+ /* @__PURE__ */ o.jsx(
22
+ C,
23
+ {
24
+ id: a,
25
+ type: l,
26
+ title: e,
27
+ description: n,
28
+ durationInMilliseconds: t,
29
+ destroy: p,
30
+ dataToCopy: i,
31
+ offset: d
32
+ }
33
+ ),
34
+ c
35
+ );
36
+ j.createRoot(c).render(h);
37
+ }, M = ({
38
+ width: a = "100%",
39
+ height: l = "fit-content",
40
+ type: e,
41
+ variant: n = "small",
42
+ title: t,
43
+ message: i,
44
+ margin: d,
45
+ open: c = !0,
46
+ onClose: p,
47
+ canClose: h = !0
48
+ }) => {
49
+ var u, g;
50
+ const [b, m] = W(c), s = {
51
+ info: {
52
+ backgroundColor: "#D5EBFD",
53
+ borderColor: r.colors.feedbackColors.colorFeedbackInfo,
54
+ icon: /* @__PURE__ */ o.jsx(
55
+ I,
56
+ {
57
+ color: r.colors.feedbackColors.colorFeedbackInfo,
58
+ height: "24px",
59
+ width: "24px"
60
+ }
61
+ )
62
+ },
63
+ success: {
64
+ backgroundColor: "#DAF9DB",
65
+ borderColor: r.colors.feedbackColors.colorFeedbackSuccess,
66
+ icon: /* @__PURE__ */ o.jsx(
67
+ f,
68
+ {
69
+ color: r.colors.feedbackColors.colorFeedbackSuccess,
70
+ height: "24px",
71
+ width: "24px"
72
+ }
73
+ )
74
+ },
75
+ warning: {
76
+ backgroundColor: "#FEEECF",
77
+ borderColor: r.colors.feedbackColors.colorFeedbackWarning
78
+ },
79
+ error: {
80
+ backgroundColor: "#FFE1E1",
81
+ borderColor: r.colors.feedbackColors.colorFeedbackError,
82
+ icon: /* @__PURE__ */ o.jsx(
83
+ F,
84
+ {
85
+ color: r.colors.feedbackColors.colorFeedbackError,
86
+ height: "24px",
87
+ width: "24px"
88
+ }
89
+ )
90
+ }
91
+ };
92
+ function k() {
93
+ m(!1), p == null || p();
94
+ }
95
+ return /* @__PURE__ */ o.jsx(o.Fragment, { children: b ? /* @__PURE__ */ o.jsxs(
96
+ x,
97
+ {
98
+ width: a,
99
+ height: l,
100
+ direction: "horizontal",
101
+ verticalAlign: t ? "top" : "center",
102
+ gap: r.spacings.spacingInline.spacingInlineAnt,
103
+ padding: n == "small" ? `${r.spacings.spacingStack.spacingStackXs} ${r.spacings.spacingInline.spacingInlineAnt}` : r.spacings.spacingInline.spacingInlineSm,
104
+ backgroundColor: (u = s == null ? void 0 : s[e]) == null ? void 0 : u.backgroundColor,
105
+ customStyles: {
106
+ border: `1px solid ${(g = s == null ? void 0 : s[e]) == null ? void 0 : g.borderColor}`,
107
+ borderRadius: r.borders.borderRadius.borderRadiusSm,
108
+ margin: d,
109
+ position: "relative"
110
+ },
111
+ children: [
112
+ e === "warning" ? /* @__PURE__ */ o.jsx(w, { children: /* @__PURE__ */ o.jsx(E, { width: "24px", height: "24px" }) }) : /* @__PURE__ */ o.jsx(o.Fragment, { children: s == null ? void 0 : s[e].icon }),
113
+ /* @__PURE__ */ o.jsxs(x, { width: "100%", flex: "1", height: "100%", children: [
114
+ /* @__PURE__ */ o.jsx(S, { children: t }),
115
+ /* @__PURE__ */ o.jsx(R, { children: i })
116
+ ] }),
117
+ h && /* @__PURE__ */ o.jsx(x, { children: /* @__PURE__ */ o.jsx(
118
+ A,
119
+ {
120
+ color: r.colors.neutralColors.colorNeutralCloudy,
121
+ cursor: "pointer",
122
+ onClick: k,
123
+ height: "20px",
124
+ width: "20px"
125
+ }
126
+ ) })
127
+ ]
128
+ }
129
+ ) : /* @__PURE__ */ o.jsx(o.Fragment, {}) });
130
+ }, X = ({
131
+ label: a,
132
+ labelRender: l,
133
+ infoProps: e = {},
134
+ withInfo: n = !0,
135
+ flex: t,
136
+ width: i = "100%",
137
+ isRequired: d = !1
138
+ }) => {
139
+ const c = {
140
+ tooltipProps: {
141
+ position: "top",
142
+ ...e == null ? void 0 : e.tooltipProps,
143
+ size: "Small"
144
+ }
145
+ };
146
+ return /* @__PURE__ */ o.jsxs(x, { width: i, direction: "horizontal", gap: "4px", flex: t, children: [
147
+ l ?? /* @__PURE__ */ o.jsxs(_, { children: [
148
+ a,
149
+ " ",
150
+ d ? /* @__PURE__ */ o.jsx($, {}) : null
151
+ ] }),
152
+ n && /* @__PURE__ */ o.jsx(D, { ...c })
153
+ ] });
154
+ }, J = ({
155
+ width: a = "100%",
156
+ flex: l,
157
+ label: e = "Obrigatório",
158
+ margin: n = "0 0 16px 0"
159
+ }) => /* @__PURE__ */ o.jsx(x, { width: a, flex: l, customStyles: { margin: n }, children: /* @__PURE__ */ o.jsx(L, { children: `* ${e}` }) });
160
+ export {
161
+ M as A,
162
+ X as L,
163
+ J as R,
164
+ B as s
165
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./Table.styles-BRk1FZZV.cjs"),b=require("./index-BUIblOZj.cjs"),h=require("react-dom"),E=require("react"),R=({id:s,type:t,title:r,description:n,durationInMilliseconds:l=3e3,dataToCopy:c,offset:a={x:0,y:0}})=>{const i=b.dom.portal.add(s+Date.now()+Math.random()),x=()=>{try{i.remove()}catch{console.error("Remoção indevida de alert.")}},d=h.createPortal(e.jsxRuntimeExports.jsx(e.AlertView,{id:s,type:t,title:r,description:n,durationInMilliseconds:l,destroy:x,dataToCopy:c,offset:a}),i);e.clientExports.createRoot(i).render(d)},C=({width:s="100%",height:t="fit-content",type:r,variant:n="small",title:l,message:c,margin:a,open:i=!0,onClose:x,canClose:d=!0})=>{var p,g;const[u,j]=E.useState(i),o={info:{backgroundColor:"#D5EBFD",borderColor:e.sg.colors.feedbackColors.colorFeedbackInfo,icon:e.jsxRuntimeExports.jsx(e.InfoFill_default,{color:e.sg.colors.feedbackColors.colorFeedbackInfo,height:"24px",width:"24px"})},success:{backgroundColor:"#DAF9DB",borderColor:e.sg.colors.feedbackColors.colorFeedbackSuccess,icon:e.jsxRuntimeExports.jsx(e.CheckCircleFill_default,{color:e.sg.colors.feedbackColors.colorFeedbackSuccess,height:"24px",width:"24px"})},warning:{backgroundColor:"#FEEECF",borderColor:e.sg.colors.feedbackColors.colorFeedbackWarning},error:{backgroundColor:"#FFE1E1",borderColor:e.sg.colors.feedbackColors.colorFeedbackError,icon:e.jsxRuntimeExports.jsx(e.ErrorFill_default,{color:e.sg.colors.feedbackColors.colorFeedbackError,height:"24px",width:"24px"})}};function m(){j(!1),x==null||x()}return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:u?e.jsxRuntimeExports.jsxs(e.Container,{width:s,height:t,direction:"horizontal",verticalAlign:l?"top":"center",gap:e.sg.spacings.spacingInline.spacingInlineAnt,padding:n=="small"?`${e.sg.spacings.spacingStack.spacingStackXs} ${e.sg.spacings.spacingInline.spacingInlineAnt}`:e.sg.spacings.spacingInline.spacingInlineSm,backgroundColor:(p=o==null?void 0:o[r])==null?void 0:p.backgroundColor,customStyles:{border:`1px solid ${(g=o==null?void 0:o[r])==null?void 0:g.borderColor}`,borderRadius:e.sg.borders.borderRadius.borderRadiusSm,margin:a,position:"relative"},children:[r==="warning"?e.jsxRuntimeExports.jsx(e.ContainerWarning,{children:e.jsxRuntimeExports.jsx(e.WarningFill_default,{width:"24px",height:"24px"})}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:o==null?void 0:o[r].icon}),e.jsxRuntimeExports.jsxs(e.Container,{width:"100%",flex:"1",height:"100%",children:[e.jsxRuntimeExports.jsx(e.Title$1,{children:l}),e.jsxRuntimeExports.jsx(e.Message,{children:c})]}),d&&e.jsxRuntimeExports.jsx(e.Container,{children:e.jsxRuntimeExports.jsx(e.Close_default,{color:e.sg.colors.neutralColors.colorNeutralCloudy,cursor:"pointer",onClick:m,height:"20px",width:"20px"})})]}):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})})},k=({label:s,labelRender:t,infoProps:r={},withInfo:n=!0,flex:l,width:c="100%",isRequired:a=!1})=>{const i={tooltipProps:{position:"top",...r==null?void 0:r.tooltipProps,size:"Small"}};return e.jsxRuntimeExports.jsxs(e.Container,{width:c,direction:"horizontal",gap:"4px",flex:l,children:[t??e.jsxRuntimeExports.jsxs(e.Label$1,{children:[s," ",a?e.jsxRuntimeExports.jsx(e.Required,{}):null]}),n&&e.jsxRuntimeExports.jsx(e.Info,{...i})]})},F=({width:s="100%",flex:t,label:r="Obrigatório",margin:n="0 0 16px 0"})=>e.jsxRuntimeExports.jsx(e.Container,{width:s,flex:t,customStyles:{margin:n},children:e.jsxRuntimeExports.jsx(e.Label$2,{children:`* ${r}`})});exports.AlertInline=C;exports.LabelField=k;exports.RequiredLabelView=F;exports.showAlert=R;